/* Nektar Meletakos — site styles. Self-hosted font, no external requests. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #fbfaf7;
  --bg-alt: #f3f1ea;
  --ink: #1b2430;
  --muted: #56606d;
  --rule: #e2ded3;
  --accent: #1e5a52;
  --accent-ink: #ffffff;
  --accent-soft: #e6efec;

  --display: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 66ch;
  --wrap: 1080px;
  --gutter: clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12171d;
    --bg-alt: #181e25;
    --ink: #e9e7e1;
    --muted: #a1a9b3;
    --rule: #2a323b;
    --accent: #7dbbae;
    --accent-ink: #0f1a18;
    --accent-soft: #1b2a28;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 20;
}
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 60px;
}
.brand {
  font-family: var(--display); font-weight: 600; font-size: 1.125rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.005em;
}
.header-end { display: flex; align-items: center; gap: 14px; }
.nav { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 22px); font-size: 0.9063rem; }
.nav a {
  color: var(--muted); text-decoration: none; padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.lang {
  color: var(--ink); border: 1px solid var(--rule); border-radius: 4px;
  padding: 3px 10px; font-size: 0.8125rem; letter-spacing: 0.04em; font-weight: 600;
  text-decoration: none; transition: border-color .2s ease, color .2s ease;
}
.lang:hover { border-color: var(--accent); color: var(--accent); }
.menu-btn {
  display: none; font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--ink);
  background: transparent; border: 1px solid var(--rule); border-radius: 4px;
  padding: 4px 12px; cursor: pointer;
}
.menu-btn:hover { border-color: var(--accent); }

/* scroll progress */
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
}

/* Compact layout: collapsible menu (only when JS is available) */
@media (max-width: 1020px) {
  .js .menu-btn { display: inline-block; }
  .js .site-header .wrap { flex-wrap: wrap; }
  .js .nav {
    display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px 0 14px; font-size: 1rem;
  }
  .js .nav.open { display: flex; }
  .js .nav a { padding: 11px 0; border-bottom: 1px solid var(--rule); }
  .js .nav a[aria-current="true"] { border-bottom-color: var(--rule); color: var(--accent); }
  .nav { flex-wrap: wrap; row-gap: 2px; }
  .site-header .wrap { padding-top: 6px; padding-bottom: 6px; }
}

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.js .hero .w, .js .hero [data-hero] {
  opacity: 0; animation: rise .85s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(var(--i, 0) * 65ms + 120ms);
}
@media (prefers-reduced-motion: reduce) {
  .js .hero .w, .js .hero [data-hero] { opacity: 1; animation: none; }
}

@view-transition { navigation: auto; }

.js [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .progress { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 10vw, 112px) 0 clamp(48px, 8vw, 88px); }
.eyebrow {
  font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 20px;
}
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 700; letter-spacing: -0.03em;
  max-width: 16em; margin-bottom: 24px;
}
.hero h1 .w { display: inline-block; }
.rotator { font-size: clamp(1.05rem, 1.5vw, 1.2rem); margin: -8px 0 30px; color: var(--ink); font-weight: 500; }
.rotator .rot {
  display: inline-block; color: var(--accent); font-weight: 650;
  transition: opacity .35s ease, transform .35s ease;
}
.rotator .rot.out { opacity: 0; transform: translateY(-6px); }
.rotator .rot.pre { opacity: 0; transform: translateY(6px); transition: none; }
.hero .lede {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--muted); max-width: 40em; margin-bottom: 32px;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 4px;
  font-weight: 600; font-size: 0.9688rem; text-decoration: none;
  border: 1px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); text-decoration: none; }

.facts {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--rule);
  font-size: 0.9375rem; color: var(--muted);
}
.facts strong { color: var(--ink); font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: clamp(44px, 7vw, 84px) 0; border-top: 1px solid var(--rule); scroll-margin-top: 56px; }
section.alt { background: var(--bg-alt); }

.split { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 240px 1fr; gap: 56px; }
}
.split > h2 { font-size: 1.5rem; }
@media (min-width: 900px) { .split > h2 { position: sticky; top: 92px; align-self: start; } }

.prose { max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }

/* definition-style lists */
.rows > li { padding: 22px 0; border-top: 1px solid var(--rule); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows h3 { font-size: 1.1875rem; margin-bottom: 6px; }
.rows p { margin: 0; color: var(--muted); max-width: var(--measure); }
.rows .meta { margin-top: 8px; font-size: 0.9rem; color: var(--ink); }

.formats > li {
  display: grid; gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--rule);
}
.formats > li:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 640px) { .formats > li { grid-template-columns: 220px 1fr; } }
.formats strong { font-weight: 600; }
.formats span { color: var(--muted); }
.note { margin-top: 22px; font-size: 0.9375rem; color: var(--muted); max-width: var(--measure); }

.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 18px; }
.tools li {
  border: 1px solid var(--rule); background: var(--bg); border-radius: 999px;
  padding: 5px 14px; font-size: 0.9375rem; font-weight: 500;
}
section.alt .tools li { background: var(--bg); }

/* ---------- Experience ---------- */
.timeline > li { padding: 24px 0; border-top: 1px solid var(--rule); display: grid; gap: 6px 32px; }
.timeline > li:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 700px) { .timeline > li { grid-template-columns: 150px 1fr; } }
.when { color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.timeline h3 { font-size: 1.125rem; }
.org { color: var(--muted); font-size: 0.9688rem; margin: 2px 0 10px; }
.timeline ul.pts { list-style: disc; padding-left: 1.15em; max-width: var(--measure); }
.timeline ul.pts li { margin: 0 0 6px; }
.timeline ul.pts li::marker { color: var(--accent); }

.subhead {
  font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
  margin: 44px 0 20px;
}
.subhead:first-child { margin-top: 0; }

/* ---------- Credentials ---------- */
.creds { display: grid; gap: 28px 48px; }
@media (min-width: 700px) { .creds { grid-template-columns: 1fr 1fr; } }
.creds h3 { font-size: 1rem; font-family: var(--sans); font-weight: 600; margin-bottom: 8px; letter-spacing: 0; }
.creds li { margin-bottom: 8px; color: var(--ink); }
.creds li span { color: var(--muted); display: block; font-size: 0.9375rem; }

/* ---------- Contact ---------- */
.contact-line { font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2.125rem); margin: 0 0 18px; }
.contact-line a { color: var(--accent); }
.contact-meta { color: var(--muted); }
.contact-meta li { margin-bottom: 4px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; font-size: 0.875rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ---------- Print ---------- */
@media print {
  :root { --bg: #fff; --bg-alt: #fff; --ink: #000; --muted: #333; --rule: #ccc; --accent: #000; }
  .site-header, .actions, .skip { display: none; }
  body { font-size: 10.5pt; line-height: 1.45; }
  section { padding: 16px 0; break-inside: avoid-page; }
  .hero { padding: 0 0 16px; }
  .split { grid-template-columns: 150px 1fr; gap: 24px; }
  .split > h2 { position: static; }
  a { color: #000; text-decoration: none; }
}

@media (min-width: 900px) { .note-wide { grid-column: 2; margin-top: 0; } }

/* ---------- Portrait ---------- */
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; } }
.portrait { margin: 0; order: 2; max-width: 300px; }
@media (min-width: 900px) { .portrait { order: 0; } }
.portrait img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%;
  border-radius: 6px; border: 1px solid var(--rule);
}

/* ---------- Outcomes ---------- */
.rows .outcome { margin-top: 10px; font-size: 0.9688rem; color: var(--ink); }
.rows .outcome b { color: var(--accent); font-weight: 650; }

/* ---------- Feedback ---------- */
.stats { display: grid; gap: 22px 36px; margin-bottom: 36px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat .num { font-family: var(--display); font-size: clamp(2.25rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.stat .num small { font-size: 0.45em; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.stat .lbl { margin-top: 8px; color: var(--muted); font-size: 0.9375rem; }
.quotes { display: grid; gap: 20px; margin: 0 0 22px; }
@media (min-width: 640px) { .quotes { grid-template-columns: 1fr 1fr; gap: 32px; } }
.quotes blockquote { margin: 0; padding-left: 18px; border-left: 2px solid var(--accent); }
.quotes p { margin: 0 0 6px; font-family: var(--display); font-size: 1.125rem; line-height: 1.4; font-weight: 500; }
.quotes cite { font-style: normal; font-size: 0.875rem; color: var(--muted); }
