/* HWM site. Layout concept: editorial index, wide bone canvas, one oversized headline with the Marine period as the signature, a single wave line as the only ornament. */
@font-face { font-family: "PJS Local"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/PlusJakartaSans-Bold.ttf") format("truetype"); }
@font-face { font-family: "PJS Local"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/PlusJakartaSans-ExtraBold.ttf") format("truetype"); }
:root {
  --bone: #F6F4EF;
  --carbon: #111111;
  --marine: #2B5B84;
  --stone: #B8B0A2;
  --bg: #F6F4EF;
  --fg: #111111;
  --muted: #5E5A52;
  --rule: #DDD8CD;
  --panel: #FFFFFF;
  --accent: #2B5B84;
  --btn-bg: #111111;
  --btn-fg: #F6F4EF;
  --display: "PJS Local", "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111; --fg: #F6F4EF; --muted: #B5B0A5; --rule: #2C2C2C; --panel: #181818;
    --accent: #6F9CC4; --btn-bg: #F6F4EF; --btn-fg: #111111; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111111; --fg: #F6F4EF; --muted: #B5B0A5; --rule: #2C2C2C; --panel: #181818;
  --accent: #6F9CC4; --btn-bg: #F6F4EF; --btn-fg: #111111; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }

/* logo swap, driven by the same theme switches as the tokens */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* nav */
.nav { border-bottom: 1px solid var(--rule); }
.nav .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 18px; }
.nav .brand img { height: 22px; width: auto; }
.nav ul { display: flex; flex-wrap: wrap; gap: 6px 26px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a.link { text-decoration: none; font-size: 15px; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.btn {
  display: inline-block; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 15px;
  background: var(--btn-bg); color: var(--btn-fg); padding: 12px 22px; border-radius: 999px; border: 1px solid var(--btn-bg);
}
.btn:hover { background: transparent; color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* type */
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 8.5vw, 6.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.2; font-weight: 700; }
.dot { display: inline-block; width: 0.15em; height: 0.15em; border-radius: 50%; background: var(--accent); margin-left: 0.07em; vertical-align: baseline; }
.kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.lede { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 40rem; color: var(--fg); margin: 26px 0 0; }
.sub { font-family: var(--display); font-weight: 700; font-size: clamp(1.05rem, 2vw, 1.3rem); margin: 22px 0 0; max-width: 34rem; }
p { max-width: 42rem; }

/* sections */
.hero { padding-block: clamp(48px, 9vw, 112px) clamp(40px, 6vw, 72px); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.wave { display: block; width: 100%; height: 40px; color: var(--accent); }
section { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--rule); }
section > .wrap > h2 + p, .section-intro { margin-top: 18px; color: var(--muted); }

.chain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 2px solid var(--fg); }
.chain > div { padding: 22px 20px 8px 0; min-width: 0; }
.chain > div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.chain .step { font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.03em; }
.chain p { margin: 10px 0 0; font-size: 15.5px; color: var(--muted); }

.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--rule); }
.formats > div { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.formats h3 { display: flex; align-items: baseline; gap: 10px; }
.formats p { margin: 8px 0 0; font-size: 15.5px; color: var(--muted); }
.tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.band { background: var(--fg); color: var(--bg); border-top: 0; }
.band .kicker, .band .section-intro { color: var(--stone); }
.band .btn { background: var(--bg); color: var(--fg); border-color: var(--bg); }
.band .btn:hover { background: transparent; color: var(--bg); }
.band .btn.ghost { background: transparent; color: var(--bg); border-color: var(--bg); }
.band .btn.ghost:hover { background: var(--bg); color: var(--fg); }
.band .dot { background: #6F9CC4; }
.band .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* article pages */
.article { padding-block: clamp(40px, 7vw, 80px); }
.article h1 { font-size: clamp(2.3rem, 6.5vw, 4.6rem); max-width: 14ch; }
.meta { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--muted); margin-top: 22px; }
.callout { margin-top: 34px; padding: 18px 20px; border: 1px solid var(--rule); border-left: 4px solid var(--accent); background: var(--panel); max-width: 44rem; font-size: 15.5px; }
.callout p { margin: 0; }
.tablewrap { overflow-x: auto; margin-top: 28px; border-top: 2px solid var(--fg); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15.5px; }
th, td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td:first-child { font-family: var(--display); font-weight: 700; padding-right: 20px; }
.visa-list { margin-top: 28px; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.visa-list > div { padding: 24px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 12px 40px; }
.visa-list h3 { margin: 0; }
.visa-list p { margin: 0 0 10px; }
.visa-list p:last-child { margin-bottom: 0; }
.facts { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.mistakes { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); max-width: 46rem; }
.mistakes li { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.mistakes b { font-family: var(--display); font-weight: 700; }
.sources { font-size: 14.5px; color: var(--muted); }
.sources li { margin-bottom: 6px; }
.seats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 2px solid var(--fg); }
.seats > div { padding: 24px 24px 12px 0; min-width: 0; }
.seats > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.seats p { margin: 12px 0 0; font-size: 15.5px; color: var(--muted); }
.seat-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: block; }

footer { border-top: 1px solid var(--rule); padding-block: 40px 56px; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; align-items: flex-start; }
footer img { height: 20px; width: auto; margin-bottom: 14px; }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); text-decoration: underline; }
footer p { margin: 0; }

@media (max-width: 820px) {
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .chain > div:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 8px; padding-top: 22px; }
  .formats, .seats { grid-template-columns: 1fr; }
  .seats > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .split, .visa-list > div { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .chain { grid-template-columns: 1fr; }
  .chain > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .chain > div:nth-child(3) { border-top: 1px solid var(--rule); }
  body { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .nav, footer, .band, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .logo-dark { display: none !important; } .logo-light { display: block !important; }
}

footer .fine { display: block; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 13.5px; }
footer .fine p { max-width: 52rem; }
footer .fine a { text-decoration: underline; }
.policy { margin-top: 44px; border-top: 2px solid var(--fg); max-width: 52rem; }
.policy > div { padding: 24px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 8px 36px; }
.policy h3 { margin: 0; }
.policy p { margin: 0; }
.sponsor-label { display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--accent); color: var(--accent); padding: 2px 8px; border-radius: 3px; margin-right: 4px; vertical-align: 1px; }
@media (max-width: 820px) { .policy > div { grid-template-columns: 1fr; } }

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-bottom: clamp(48px, 7vw, 88px); }
.project { padding: clamp(24px, 4vw, 44px); border: 1px solid var(--rule); border-radius: 4px; display: flex; flex-direction: column; min-width: 0; }
.project h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.project .pline { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 18px 0 0; }
.project p { max-width: 36rem; }
.project .status { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--muted); margin-top: auto; padding-top: 20px; }
.project .actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }
.project.ansim { background: #173A2E; border-color: #173A2E; color: #F6F4EF; }
.project.ansim .kicker, .project.ansim .status { color: #B9C8BF; }
.project.ansim .btn { background: #F6F4EF; color: #173A2E; border-color: #F6F4EF; }
.project.ansim .btn:hover { background: transparent; color: #F6F4EF; }
.project.ansim h2 { letter-spacing: 0.02em; }
.project.savant { background: var(--panel); }
@media (max-width: 820px) { .projects { grid-template-columns: 1fr; } }

.guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: clamp(48px, 7vw, 88px); }
.guide { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 26px; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); text-decoration: none; color: var(--fg); }
a.guide:hover { border-color: var(--fg); }
.guide h3 { font-size: 1.5rem; }
.guide p { margin: 0; color: var(--muted); font-size: 15.5px; }
.guide-tags { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.guide-foot { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.guide .go { color: var(--fg); font-family: var(--display); font-weight: 700; font-size: 15px; }
.guide.soon { background: transparent; border-style: dashed; }
@media (max-width: 960px) { .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .guides { grid-template-columns: 1fr; } }

/* guide visuals */
.stats { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; margin-top:34px; background:var(--rule); border:1px solid var(--rule); }
.stats div { background:var(--bg); padding:18px 16px; }
.stats b { display:block; font-weight:800; font-size:clamp(1.4rem,3.4vw,2rem); color:var(--accent); }
.stats span { display:block; font-size:13.5px; color:var(--muted); margin-top:4px; }
.figure { margin:22px 0 0; max-width:44rem; }
.figure figcaption { font-size:13.5px; color:var(--muted); margin-top:8px; }
.chart { width:100%; height:auto; display:block; }
.chart .c-lab { font:600 13px Inter,system-ui,sans-serif; fill:var(--fg); }
.chart .c-val { font:500 12.5px "JetBrains Mono",monospace; fill:var(--muted); }
.chart .c-track { fill:var(--panel); }
.chart .c-bar { fill:var(--stone); }
.chart .c-bar.hl { fill:var(--accent); }
.flow { margin-top:22px; max-width:44rem; }
.flow-q { display:inline-block; background:var(--fg); color:var(--bg); padding:10px 16px; font-weight:700; }
.flow-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; margin-top:12px; border-left:2px solid var(--fg); padding-left:14px; }
.flow-a { border:1px solid var(--rule); background:var(--panel); padding:12px 14px; }
.flow-a b { display:block; font-size:14.5px; }
.flow-a span { display:block; margin-top:6px; color:var(--accent); font-weight:700; font-size:14px; }
.flow-a.hl { border-color:var(--accent); }
.flow-a.warn span { color:var(--muted); }
@media (max-width:620px){ .stats{grid-template-columns:repeat(2,1fr);} .chart .c-lab{font-size:15px} .chart .c-val{font-size:14px} }

/* channels */
.channels { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin-top:28px; }
.channel { display:flex; flex-direction:column; gap:6px; padding:22px; border:1px solid var(--rule); border-radius:4px; background:var(--panel); text-decoration:none; color:var(--fg); min-width:0; }
.channel:hover { border-color:var(--fg); }
.ch-name { font-family:var(--display); font-weight:800; font-size:1.2rem; overflow-wrap:anywhere; }
.ch-handle { font-family:var(--mono); font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); }
.channel p { margin:6px 0 0; color:var(--muted); font-size:15px; }

/* editorial photography slots */
.photo { position:relative; margin:0; aspect-ratio:var(--r,4/5); background:var(--panel); overflow:hidden; border-radius:2px; width:100%; }
.photo i { position:absolute; inset:0; background-size:cover; background-position:center; background-repeat:no-repeat; }
.photo .slot { position:absolute; inset:0; display:none; align-items:center; justify-content:center; text-align:center; font:500 11.5px "JetBrains Mono",monospace; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding:12px; }
html.slots .photo .slot { display:flex; }
.photo.in-card { margin-bottom:18px; }
.hero-split { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:clamp(28px,5vw,72px); align-items:end; }
.hero-split .photo { max-width:460px; justify-self:end; }
.project .photo { margin-bottom:22px; }
.project.ansim .photo { background:rgba(246,244,239,.08); }
.guide .photo { margin-bottom:8px; }
.article .photo { margin-top:30px; max-width:44rem; }
@media (max-width:820px){ .hero-split{grid-template-columns:1fr;} .hero-split .photo{max-width:none;justify-self:stretch;} }

/* softer editorial layer */
:root { --soft: #ECE7DD; --radius: 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --soft: #1B1A18; } }
:root[data-theme="dark"] { --soft: #1B1A18; }
section.soft { background: var(--soft); border-top: 0; }
.band { background: var(--soft); color: var(--fg); }
.band .kicker, .band .section-intro { color: var(--muted); }
.band .btn { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.band .btn:hover { background: transparent; color: var(--fg); }
.band .dot { background: var(--accent); }
.photo { background: var(--soft); border-radius: var(--radius); }
.photo.arch { border-radius: 999px 999px var(--radius) var(--radius); }
.photo.wide { border-radius: var(--radius); }
.project, .guide, .channel, .callout, .flow-a { border-radius: var(--radius); }
.callout { border-left-width: 1px; }
.project.savant { background: var(--soft); border-color: var(--soft); }
.hero-split .photo { max-width: 420px; }
.essays { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.essay { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3.5vw, 40px); background: var(--soft); border-radius: var(--radius); text-decoration: none; color: var(--fg); min-width: 0; }
.essay h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.12; }
.essay p { margin: 0; color: var(--muted); font-size: 15.5px; }
.essay .go, .work .go { margin-top: auto; padding-top: 10px; font-family: var(--display); font-weight: 700; font-size: 15px; }
.essay:hover { box-shadow: inset 0 0 0 1px var(--fg); }
.essay-tag, .work-tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.work { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--fg); min-width: 0; }
.work .photo { margin-bottom: 10px; }
.work p { margin: 0; color: var(--muted); font-size: 15.5px; }
.work:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.record { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.record > div { padding: 22px; background: var(--soft); border-radius: var(--radius); min-width: 0; }
.record p { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.record a { text-decoration: none; }
.fineprint { margin-top: 28px; font-size: 14.5px; color: var(--muted); max-width: 46rem; }
.elsewhere { margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.formats { border-top-color: rgba(0,0,0,.12); }
@media (max-width: 960px) { .record { grid-template-columns: repeat(2, minmax(0, 1fr)); } .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .essays { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .record, .works { grid-template-columns: 1fr; } }
section.soft .photo, .project.savant .photo { background: var(--bg); }
.work .photo { box-shadow: inset 0 0 0 1px var(--rule); }

/* social icons */
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social a { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--rule); color: var(--fg); text-decoration: none; }
.social a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); text-decoration: none; }
.social svg { width: 19px; height: 19px; }
.foot-right { display: flex; flex-direction: column; gap: 22px; align-items: flex-end; }
.foot-right ul { justify-content: flex-end; }
.band .social { margin-top: 24px; }
@media (max-width: 820px) { .foot-right { align-items: flex-start; } .foot-right ul { justify-content: flex-start; } }
