/* ============================================================
   c-annabel — portfolio site
   Palette: Shoreline (deep water). Type: Bricolage Grotesque
   (display), Lora (body), Albert Sans (chrome).
   ============================================================ */

/* Colour lives entirely in tokens, so the dark theme below is a value
   swap rather than a second stylesheet. The hero wave gradients are
   tokens too — their stop-colors are var() references in the SVG. */
:root {
  color-scheme: light;

  --sand: #f6f2e9;
  --sand-2: #efe9db;
  --surface: #ffffff;
  --ink: #1b242a;
  --ink-soft: #697472;
  --ink-mute: #8b8d80;
  --line: #e2dccb;
  --line-mid:  #72a6cef4;
  --water: #2f6690;
  --water-deep: #234f70;
  --teal: #3e9aa0;
  --petal: #d98ba0;
  --petal-ink: #7a3346;
  --petal-soft: #e3aabaef;
  --water-tint: #dcebf2;
  --teal-tint: #dff1f0;
  --petal-tint: #f6e1e6;
  --dark: #1b2a2e;
  --dark-soft: #b9c4c2;
  --shadow: 27, 36, 42;

  /* hero waves: front (nearest), mid, deep (furthest) */
  --wave-f1: #315281; --wave-f2: #446a99; --wave-f3: #5d88b2; --wave-f4: #79a7c7;
  --wave-m1: #4f82a4; --wave-m2: #68a1b8; --wave-m3: #86c0cd; --wave-m4: #b8dde3;
  --wave-d1: #6fb5c4; --wave-d2: #8fd0db; --wave-d3: #c5e9ee; --wave-d4: #edf9fa;
  --wave-foam: #ffffff;

  /* language bar — GitHub's own hues, with --water as the fallback */
  --lang-go: #00add8;
  --lang-python: #3572a5;
  --lang-javascript: #f1e05a;
  --lang-typescript: #3178c6;
  --lang-html: #e34c26;
  --lang-css: #563d7c;
  --lang-shell: #89e051;
  --lang-dockerfile: #384d54;
  --lang-makefile: #427819;
  --lang-starlark: #76d275;
  --lang-java: #b07219;
  --lang-cobol: #4d41b1;
  --lang-plsql: #dad8d8;
  --lang-powershell: #012456;
  --lang-c: #555555;
  --lang-c-2: #f34b7d;
  --lang-c-3: #178600;
  --lang-ruby: #701516;
  --lang-php: #4f5d95;
  --lang-rust: #dea584;
  --lang-kotlin: #a97bff;
  --lang-swift: #f05138;
  --lang-jupyter-notebook: #da5b0b;
  --lang-scss: #c6538c;
  --lang-vue: #41b883;
  --lang-sql: #e38c00;
  --lang-batchfile: #c1f12e;

  --display: "Familjen Grotesk", system-ui, sans-serif;
  --body: "Lora", Georgia, serif;
  --chrome: "Albert Sans", system-ui, sans-serif;

  --wrap: 1320px;
  --gutter: clamp(20px, 5vw, 48px);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --sand: #10181c;
  --sand-2: #162026;
  --surface: #16212a;
  --ink: #e7eef0;
  --ink-soft: #849ca0;
  --ink-mute: #78888b;
  --line: #253239;
  --water: #7fb3d5;
  --water-deep: #a8cee6;
  --teal: #5fbfc4;
  --petal: #e5a4b6;
  --petal-ink: #eebccb;
  --water-tint: #1a2c3a;
  --teal-tint: #14282b;
  --petal-tint: #2b1d23;
  --dark: #16232a;
  --dark-soft: #b9c4c2;
  --shadow: 0, 0, 0;

  --wave-f1: #1a2c45; --wave-f2: #24384f; --wave-f3: #2f4a63; --wave-f4: #3d5f78;
  --wave-m1: #24404f; --wave-m2: #2f5460; --wave-m3: #3d6b74; --wave-m4: #4d8590;
  --wave-d1: #2f5a63; --wave-d2: #3d7280; --wave-d3: #4f8f9b; --wave-d4: #63a8b2;
  --wave-foam: #bcdfe8;
}

/* The boot script in <head> always sets data-theme, so this only applies
   for a visitor with JavaScript disabled. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --sand: #10181c; --sand-2: #162026; --surface: #16212a;
    --ink: #e7eef0; --ink-soft: #a6b7ba; --ink-mute: #78888b; --line: #253239;
    --water: #7fb3d5; --water-deep: #a8cee6; --teal: #5fbfc4;
    --petal: #e5a4b6; --petal-ink: #eebccb;
    --water-tint: #1a2c3a; --teal-tint: #14282b; --petal-tint: #2b1d23;
    --dark: #16232a; --shadow: 0, 0, 0;
    --wave-f1: #1a2c45; --wave-f2: #24384f; --wave-f3: #2f4a63; --wave-f4: #3d5f78;
    --wave-m1: #24404f; --wave-m2: #2f5460; --wave-m3: #3d6b74; --wave-m4: #4d8590;
    --wave-d1: #2f5a63; --wave-d2: #3d7280; --wave-d3: #4f8f9b; --wave-d4: #63a8b2;
    --wave-foam: #bcdfe8;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

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

/* Shared chrome ------------------------------------------------ */
.eyebrow {
  font-family: var(--chrome);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--water);
}

.section { padding-block: clamp(60px, 9vw, 108px); }
.section + .section { border-top: 1px solid var(--line); }

.section-head { font-family: var(--display); font-weight: 600; font-size: clamp(1.85rem, 4vw, 2.6rem); letter-spacing: -0.015em; margin-top: 0.5rem; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-link { font-family: var(--chrome); font-weight: 600; font-size: 0.88rem; color: var(--water); white-space: nowrap; padding-bottom: 8px; }
.section-link:hover { color: var(--water-deep); }

/* hide-when-empty */
[hidden] { display: none !important; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--sand) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  --nav-gap: clamp(16px, 2.2vw, 26px);
  max-width: var(--wrap); margin: 0 auto; padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--nav-gap);
}
.nav-brand { display: flex; align-items: center; gap: 11px; }
.nav-brand img.seal { width: 50px; height: 50px; border-radius: 50%; }
.nav-brand img.wm { height: 30px; width: auto; }
.nav-links { display: flex; margin-left: auto; gap: var(--nav-gap); font-family: var(--chrome); font-weight: 500; font-size: 1.2rem; }
.nav-links a { text-transform: capitalize; color: var(--ink-soft); padding-bottom: 3px; border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); border-color: var(--water); }
.nav-toggle { display: none; }

/* ============================================================
   HERO + OCEAN WAVE MOTION
   ============================================================ */
.hero-band { position: relative; overflow: hidden; }

.hero-waves {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.wave { will-change: transform; }
.wave-deep    { animation: drift-deep 12s ease-in-out infinite; }
.wave-mid     { animation: drift-mid 12s ease-in-out infinite; animation-delay: 1s; }
.wave-shallow { animation: drift-shallow 12s ease-in-out infinite; animation-delay: 1.6s; }
.foam-front   { animation: foam-front 12s ease-in-out infinite; animation-delay: 1.6s; opacity: 0; }
.foam-back    { animation: foam-back 12s ease-in-out infinite; animation-delay: 1s; opacity: 0; }

@keyframes drift-deep {
  0%, 100% { transform: translate(16%, -7%); }
  50%      { transform: translate(5%, 0%); }
}
@keyframes drift-mid {
  0%, 100% { transform: translate(14%, -9%); }
  50%      { transform: translate(5%, -1%); }
}
@keyframes drift-shallow {
  0%, 100% { transform: translate(17%, -12%); }
  50%      { transform: translate(4%, -3%); }
}
@keyframes foam-front {
  0%, 100% { transform: translate(18%, -12.5%); opacity: 0; }
  38%      { opacity: 0.95; }
  55%      { transform: translate(4.5%, -3.2%); opacity: 0.9; }
  74%      { opacity: 0; }
}
@keyframes foam-back {
  0%, 100% { transform: translate(15%, -9.5%); opacity: 0; }
  46%      { opacity: 0.75; }
  60%      { transform: translate(3%, -1.4%); opacity: 0.7; }
  80%      { opacity: 0; }
}

.hero { position: relative; padding-block: clamp(64px, 12vw, 130px); }
.hero .eyebrow { margin-bottom: 22px; font-size: 0.82rem; }
.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.8rem, 8vw, 5rem); line-height: 1.0;
  letter-spacing: -0.03em; max-width: 12ch;
}
.hero .sub {
  font-family: var(--chrome); font-weight: 500;
  font-size: clamp(1.15rem, 2.7vw, 1.55rem); color: var(--water);
  margin-top: 26px;
}
.hero .sub .dot { color: var(--teal); }
.hero .lead {
  font-family: var(--chrome); 
  font-size: clamp(1rem, 1.6vw, 1.1rem); color: var(--ink-soft);
  max-width: 50ch; margin-top: 50px;
}
.hero .lead em { font-style: normal; color: var(--petal); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  font-family: var(--chrome); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid var(--water);
  cursor: pointer; transition: background .15s, color .15s, transform .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-solid { background: var(--water); color: #fff; }
.btn-solid:hover { background: var(--water-deep); border-color: var(--water-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--water-deep); }
.btn-ghost:hover { background: var(--water-tint); transform: translateY(-1px); }

/* ============================================================
   STATUS BAR
   ============================================================ */
.status { background: var(--teal-tint); border: none; }
.status-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 20px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px;
  font-family: var(--chrome); font-size: 0.96rem;
}
.status .label { font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.85rem; color: var(--water-deep); }
.status .item { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.status .item svg { width: 16px; height: 16px; color: var(--teal); flex: none; }
.status .place { margin-left: auto; color: var(--ink-soft); }
.status .place strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   JOURNEY TIMELINE
   ============================================================ */
.timeline-track {
  margin-top: 34px; position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 8px;
}
.timeline-track::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: 6px;
  height: 2px; background: var(--line);
}
.tl-stop { position: relative; padding-top: 22px; }
.tl-stop::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--teal); border: 2.5px solid var(--sand);
  box-shadow: 0 0 0 1.5px var(--teal);
}
.tl-stop.now::before { background: var(--petal); box-shadow: 0 0 0 1.5px var(--petal); }
.tl-place { font-family: var(--display); font-weight: 600; font-size: 1.12rem; }
.tl-stop.now .tl-place { color: var(--petal-ink); }
.tl-role { font-family: var(--chrome); font-size: 1.0rem; color: var(--ink-soft); margin-top: 3px; }

/* ============================================================
   HOW I THINK
   ============================================================ */
.think-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 3vw, 34px); }
.think-card .ic {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--water-tint); color: var(--water-deep);
  display: grid; place-items: center; margin-bottom: 14px;
}
.think-card .ic svg { width: 30px; height: 30px; }
.think-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin-bottom: 7px; }
.think-card p { font-family: var(--chrome); font-size: 1.0rem; color: var(--ink-soft); line-height: 1.6; }

/* =============================================================
   FEATURED PROJECT
   ============================================================ */
.featured { background: var(--dark); color: #fff; border-radius: 20px; overflow: hidden; margin-top: 8px; }
.featured-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(20px, 4vw, 48px); padding: clamp(20px, 3vw, 30px); align-items: center; }
.featured-visual {
  aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: #12201f; border: 1px solid rgba(255,255,255,.08);
  display: grid; place-items: center;
}

.featured-visual img { width: 100%; height: 100%; object-fit: cover; }
.featured-visual .ph { font-family: var(--chrome); font-size: 0.8rem; color: var(--dark-soft); }
.featured .eyebrow { color: var(--teal);}
.featured h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 2.5vw, 2rem); margin: 0px 0 0px; }
.featured .meta { font-family: var(--chrome); font-size: 0.9rem; color: var(--dark-soft); margin-bottom: 10px; }
.featured .summary { font-family: var(--chrome); font-size: 0.95rem; color: #e8ede9; line-height: 1.5; margin-bottom: 10px; }
.featured-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 26px; margin-bottom: 10px; }
.fb .fb-label { font-family: var(--chrome); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.fb p { font-size: 0.94rem; color: #cdd6d3; line-height: 1.55; }
.featured-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.featured-stack span { font-family: var(--chrome); font-size: 0.8rem; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.08); color: #dfe6e3; }
.featured .link { font-family: var(--chrome); font-weight: 500; font-size: 0.85rem; color: #fff; display: inline-flex; gap: 5px; align-items: center; border-bottom: 1.5px solid rgba(255,255,255,.4); padding-bottom: 2px; }
.featured .link:hover { border-color: #fff; }

/* ============================================================
   SELECTED PROJECTS GRID
   ============================================================ */
.proj-grid::-webkit-scrollbar { display: none; }
.proj-grid {
  margin-top: 34px; display: flex; gap: clamp(16px, 2.5vw, 24px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 4px;
}
.proj-scroll { position: relative; }
.proj-arrow {
  position: absolute; top: 50%; transform: translateY(-75%);
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  display: grid; place-items: center; cursor: pointer;
  transition: opacity .2s, background .15s;
  z-index: 2;
}
.proj-arrow:hover { background: var(--water-tint); border-color: var(--water); }
.proj-arrow svg { width: 24px; height: 24px; color: var(--ink); }
.proj-arrow[hidden] { display: none !important; }
.proj-prev { left: 16px; }
.proj-next { right: 16px; }

.proj-card { flex: 0 0 calc(50% - 12px); scroll-snap-align: start; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .16s, box-shadow .16s, border-color .16s; display: flex; flex-direction: column; }

.proj-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -18px rgba(var(--shadow), .45); border-color: var(--water); }
.proj-card .thumb { aspect-ratio: 3 / 2; background: var(--water-tint); display: grid; place-items: center; overflow: hidden; position: relative; }

.proj-card .thumb video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; object-position: top;}
.featured-visual video { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

.proj-card:nth-child(even) .thumb { background: var(--petal-tint); }
.proj-card:nth-child(even) .thumb .ph { color: var(--petal-ink); }

.proj-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.proj-card .thumb .ph { font-family: var(--chrome); font-size: 0.86rem; color: var(--water-deep); }

.proj-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.proj-body .cat { font-family: var(--chrome); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--teal); }
.proj-body h3 { font-family: var(--display); font-weight: 600; font-size: 1.34rem; }
.proj-body p { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.55; flex: 1; }
.proj-body .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.proj-body .year { font-family: var(--chrome); font-size: 0.88rem; color: var(--water); }
.proj-body .go { font-family: var(--chrome); font-weight: 600; font-size: 0.88rem; color: var(--ink); display: inline-flex; gap: 5px; }

.btn-card {
  display: flex; align-items: center; justify-content:center ; gap: 8px;
  width: 50%; padding: 8px 0; margin-top: 5px;
  font-family: var(--chrome); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--water-deep);
  border-radius: 10px; transition: background .15s, color .15s;
}
.btn-card:hover { background: var(--water-tint); }
.btn-card svg { width: 15px; height: 15px; }

.proj-card.placeholder { border-style: dashed; border-color: var(--ink-mute); background: transparent; align-items: center; justify-content: center; min-height: 240px; text-align: center; }
.proj-card.placeholder p { font-family: var(--chrome); font-weight: 600; font-size: 0.96rem; color: var(--ink-mute); padding: 20px; }
.proj-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.proj-stack span { font-family: var(--chrome); font-size: 0.72rem; padding: 4px 10px; border-radius: 999px; background: var(--water-tint); color: var(--water-deep); }

/* ============================================================
   WORK LIST
   ============================================================ */
.work-list { margin-top: 30px; border-top: 1px solid var(--line); }
.work-row { display: grid; grid-template-columns: 130px 1fr; gap: 22px; align-items: baseline; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.work-when { font-family: var(--chrome); font-weight: 600; font-size: 0.9 2rem; color: var(--ink-mute); }
.work-what { font-family: var(--display); font-weight: 600; font-size: 1.26rem; }
.work-role { font-family: var(--chrome); font-size: 1rem; font-weight: 200; color: var(--ink-soft); }

/* ============================================================
   ABOUT / SKILLS / ACHIEVEMENTS (split columns)
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 6vw, 72px); }
.about-grid #skills { margin-top: 40px; }
.about-copy p { font-family: var(--chrome); font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 14px; max-width: 60ch; }
.about-copy p:last-child { margin-bottom: 0; }

.stack-col + .stack-col { margin-top: 24px; }
.stack-col h4 { font-family: var(--chrome); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { font-family: var(--chrome); font-weight: 500; font-size: 0.9rem; padding: 5px 12px; border-radius: 999px; background: var(--water-tint); color: var(--water-deep); }

.ach-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.ach { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 12px; text-align: center; }
.ach .v { font-family: var(--display); font-weight: 600; font-size: 1.55rem; color: var(--ink); }
.ach .l { font-family: var(--chrome); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); margin-top: 3px; }

/* ============================================================
   NOW
   ============================================================ */
.now-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.now-item .verb { font-family: var(--chrome); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--petal-ink); margin-bottom: 5px; }
.now-item .what { font-size: 1.06rem; color: var(--ink-soft); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.quote-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.quote p { font-size: 1.1rem; color: var(--ink); line-height: 1.6; }
.quote .who { font-family: var(--chrome); font-size: 0.9rem; color: var(--ink-soft); margin-top: 12px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 64px); }
.contact-copy p { font-family: var(--chrome); font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; margin-bottom: 22px; }
.contact-links { display: flex; flex-direction: column; gap: 10px; font-family: var(--chrome); font-size: 1.02rem; }
.contact-links a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); width: fit-content; border-bottom: 1.5px solid transparent; padding-bottom: 2px; transition: color .15s, border-color .15s; }
.contact-links a:hover { color: var(--water); border-color: var(--water); }
.contact-links svg { width: 17px; height: 17px; color: var(--water); }

.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-family: var(--chrome); font-size: 0.9rem; color: var(--ink-mute); margin-top: 10px; margin-bottom: 5px; }
.form-field input, .form-field textarea {
  width: 100%; font-family: var(--chrome); font-size: 0.92rem;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--water); outline-offset: 1px; }
#form-status { font-family: var(--chrome); font-size: 0.9rem; margin-left: 10px; margin-top: 10px; min-height: 1.2em; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--dark); color: var(--dark-soft); padding: 40px var(--gutter) 40px; text-align: center; }
.footer .wm { height: 25px; width: auto; margin: 0 auto 5px; opacity: .9; }
.footer .wm + p { margin-top: 2px; }
.footer p { font-family: var(--chrome); margin-top: 20px; font-size: 0.94rem; line-height: 1.7; }
.footer .counter { margin-top: 14px; font-size: 0.84rem; color: rgba(185,196,194,.6); }
.footer .collab { font-size: 0.78rem; color: rgba(185,196,194,.4); margin-top: 10px; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--sand); flex-direction: column; padding: 12px var(--gutter) 18px; border-bottom: 1px solid var(--line); gap: 14px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: grid; place-items: center; width: 38px; height: 38px; background: none; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
  .nav-toggle svg { width: 20px; height: 20px; color: var(--ink); }
  .nav-cta { height: 32px; padding: 0 11px; font-size: 1rem; gap: 6px; }
  .nav-cta svg { display: none; }
  :root[data-theme="dark"] .nav-links { background: var(--dark); border-color: var(--line); }
}

@media (max-width: 860px) {
  .hero-waves { left: 28%; width: 72%; }

  .think-grid { grid-template-columns: 1fr 1fr; }
  .featured-inner { grid-template-columns: 1fr; }
  .proj-card { flex: 0 0 calc(50% - 10px); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: repeat(3, 1fr); }
  .now-grid { grid-template-columns: 1fr 1fr; }
  .timeline-track { grid-auto-flow: row; grid-auto-columns: auto; gap: 0; }
  .timeline-track::before { display: none; }
  .tl-stop { padding: 14px 0 14px 24px; }
  .tl-stop::before { top: 16px; }
  .tl-stop::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: -14px; width: 2px; background: var(--line); }
  .tl-stop:last-child::after { display: none; }
}

@media (max-width: 560px) {
  .hero-waves { left: 45%; width: 55%; opacity: 0.9; }
  .proj-card { flex: 0 0 85%; }
  .think-grid { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  .now-grid { grid-template-columns: 1fr; }
  .featured-blocks { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 1fr; gap: 3px; }
  .status .place { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .wave { animation: none !important; }
  .wave-deep    { transform: translate(10%, -2.5%); }
  .wave-mid     { transform: translate(13%, -5%); }
  .wave-shallow { transform: translate(10.5%, -7.5%); }
  .foam-front   { transform: translate(11%, -7.8%); opacity: 0.5; }
  .foam-back    { transform: translate(9%, -5.5%); opacity: 0.35; }

  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .proj-card:hover, .btn:hover { transform: none; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--water); color: #fff; font-family: var(--chrome);
  font-weight: 600; font-size: 0.9rem; padding: 12px 20px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:where(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--water); outline-offset: 3px; border-radius: 4px;
}

/* ============================================================
   THEME TOGGLE + NAV ACTIONS
   ============================================================ */
.nav-actions { display: flex; align-items: center; gap: var(--nav-gap); order: 3; }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 5px;
  height: 35px; padding: 0 15px; flex: none;
  font-family: var(--chrome); font-weight: 500; font-size: 1.2rem;
  color: var(--ink-soft); border: 1.5px solid var(--petal-soft); border-radius: 10px;
  transition: color .15s, border-color .15s, background .15s; 
}
.nav-cta:hover, .nav-cta:focus-visible { color: var(--petal-ink); border-color: var(--petal); background: var(--petal-tint); }
.nav-cta svg { width: 17px; height: 17px; }

.theme-toggle {
  width: 35px; height: 35px; flex: none; margin-bottom: 5px;
  display: grid; place-items: center;
  background: none; border: 1.5px solid var(--line-mid); border-radius: 10px;
  color: var(--ink-soft); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--water); border-color: var(--water); background: var(--water-tint); }
.theme-toggle svg { width: 24px; height: 24px; display: block; }
.theme-toggle .ico { display: grid; place-items: center; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: grid; }

/* Brand wordmark follows the theme (the light asset already existed for
   the dark footer). */
.nav-brand .wm-light { display: none; }
:root[data-theme="dark"] .nav-brand .wm-dark { display: none; }
:root[data-theme="dark"] .nav-brand .wm-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .ico-moon { display: none; }
  :root:not([data-theme]) .theme-toggle .ico-sun { display: grid; }
  :root:not([data-theme]) .nav-brand .wm-dark { display: none; }
  :root:not([data-theme]) .nav-brand .wm-light { display: block; }
}

/* ============================================================
   SHARED BITS
   ============================================================ */
.section-sub { font-size: 1.04rem; color: var(--ink-soft); margin-top: 10px; max-width: 60ch; }
.link-more {
  font-family: var(--chrome); font-weight: 600; font-size: 0.95rem;
  color: var(--water); display: inline-flex; align-items: center; gap: 6px; margin-top: 24px;
  border-bottom: 1.5px solid transparent; padding-bottom: 2px;
}
.link-more:hover { border-color: var(--water); }
.link-more svg { width: 17px; height: 17px; }

.badge {
  font-family: var(--chrome); font-weight: 600; font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--petal-tint); color: var(--petal-ink);
}

/* ============================================================
   FEATURED - additions
   ============================================================ */
.featured-tagline {
  display: block; font-family: var(--chrome); font-weight: 500;
  font-size: 0.86rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin-top: 4px;
}
.featured-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.featured-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.featured-cta .btn-ghost:hover { background: rgba(255,255,255,.1); }
.featured-cta svg { width: 17px; height: 17px; }

.proj-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.proj-body .go svg { width: 15px; height: 15px; }

/* ============================================================
   LIVE FROM GITHUB
   ============================================================ */
.gh-panel { margin-top: 30px; }
.gh-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gh-stamp { font-family: var(--chrome); font-size: 0.82rem; color: var(--ink-mute); }
.gh-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }

.gh-repo {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.gh-repo:hover { transform: translateY(-2px); border-color: var(--water); box-shadow: 0 12px 28px -20px rgba(var(--shadow), .5); }
.gh-repo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gh-repo-head h4 { font-family: var(--chrome); font-weight: 600; font-size: 1.02rem; color: var(--ink); word-break: break-word; }
.gh-repo-head svg { width: 16px; height: 16px; color: var(--ink-mute); flex: none; }
.gh-desc { font-size: 0.94rem; color: var(--ink-soft); line-height: 1.5; flex: 1; }

.lang-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--line); }
.lang-bar .seg { display: block; height: 100%; }
.lang-keys { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lang-key { font-family: var(--chrome); font-size: 0.76rem; color: var(--ink-mute); display: inline-flex; align-items: center; gap: 5px; }
.lang-key i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.gh-meta { display: flex; gap: 14px; font-family: var(--chrome); font-size: 0.8rem; color: var(--ink-mute); border-top: 1px solid var(--line); padding-top: 10px; }

/* ============================================================
   NOTES
   ============================================================ */
.note-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.note-grid-full { margin-top: 40px; }
.note-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.note-card:hover { transform: translateY(-3px); border-color: var(--water); box-shadow: 0 12px 28px -20px rgba(var(--shadow), .5); }
.note-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--chrome); font-size: 0.78rem; color: var(--ink-mute); letter-spacing: 0.04em; }
.note-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.26rem; line-height: 1.25; color: var(--ink); }
.note-card p { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.55; flex: 1; }
.note-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.note-tags span { font-family: var(--chrome); font-size: 0.74rem; padding: 3px 9px; border-radius: 999px; background: var(--teal-tint); color: var(--teal); }
.empty-note { margin-top: 30px; font-size: 1.05rem; color: var(--ink-mute); }

/* ============================================================
   CONTACT - three icon links, no URLs on screen
   ============================================================ */
.icon-links { list-style: none; display: flex; gap: 14px; margin-top: 4px; }
.icon-link {
  position: relative;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border: 1.5px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink-soft);
  transition: color .16s, border-color .16s, background .16s, transform .16s;
}
.icon-link svg { width: 24px; height: 24px; display: block; }
.icon-link:hover, .icon-link:focus-visible {
  color: var(--water-deep); border-color: var(--water);
  background: var(--water-tint); transform: translateY(-2px);
}
.icon-tip {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  font-family: var(--chrome); font-size: 0.74rem; letter-spacing: 0.05em;
  color: var(--ink-mute); white-space: nowrap;
  opacity: 0; transition: opacity .16s; pointer-events: none;
}
.icon-link:hover .icon-tip, .icon-link:focus-visible .icon-tip { opacity: 1; }

/* ============================================================
   CASE STUDY / NOTE / 404 PAGES
   ============================================================ */
body.page .hero-band { display: none; }
.prose-page { max-width: 820px; }
.center-page { text-align: center; }

.back-link {
  font-family: var(--chrome); font-weight: 600; font-size: 0.9rem;
  color: var(--ink-mute); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px;
}
.back-link:hover { color: var(--water); }
.back-link svg { width: 16px; height: 16px; transform: rotate(180deg); }
.prose-page > .back-link:last-child { margin: 44px 0 0; }

.page-head { font-family: var(--display); font-weight: 600; font-size: clamp(2.1rem, 5vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; margin-top: 0.4rem; }
.page-sub { font-size: 1.16rem; color: var(--ink-soft); margin-top: 16px; max-width: 60ch; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--chrome); font-size: 0.85rem; color: var(--ink-mute); margin-top: 18px; }
.page-cta { margin-top: 24px; }
.page-cta svg { width: 17px; height: 17px; }
.prose-page .featured-stack { margin-top: 20px; }
.prose-page .featured-stack span { background: var(--water-tint); color: var(--water-deep); }
.page-visual { margin-top: 34px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--sand-2); }
.page-visual img { width: 100%; height: auto; }

/* Long-form body copy */
.prose { margin-top: 38px; font-size: 1.1rem; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.01em; margin-top: 2em; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 1.24rem; margin-top: 1.7em; }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { color: var(--ink-mute); }
.prose a { color: var(--water); border-bottom: 1.5px solid color-mix(in srgb, var(--water) 40%, transparent); }
.prose a:hover { border-color: var(--water); }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--ink-soft); }
.prose li + li { margin-top: 0.45em; }
.prose blockquote {
  border-left: 3px solid var(--teal); background: var(--teal-tint);
  padding: 16px 20px; border-radius: 0 12px 12px 0; font-size: 1.02rem;
}
.prose blockquote p { color: var(--ink-soft); }
.prose blockquote > * + * { margin-top: 0.8em; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em; padding: 2px 6px; border-radius: 6px;
  background: var(--water-tint); color: var(--water-deep);
}
.prose pre {
  background: var(--dark); color: #e8ede9; border-radius: 12px;
  padding: 18px 20px; overflow-x: auto; font-size: 0.92rem; line-height: 1.6;
}
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* ============================================================
   RESPONSIVE - new components
   ============================================================ */
@media (max-width: 860px) {
  .prose-page { max-width: none; }
}

@media (max-width: 560px) {
  .nav-inner { flex-wrap: wrap; }
  .icon-links { gap: 12px; }
  .icon-link { width: 52px; height: 52px; }
  .gh-grid, .note-grid { grid-template-columns: 1fr; }
  .featured-cta .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .gh-repo:hover, .note-card:hover, .icon-link:hover { transform: none; }
}
