/* Mystic Forest — design-system tokens and component classes, per
   design_handoff_mystic_forest/. Fonts self-hosted (repo already self-hosts). */

/* latin-ext */
@font-face {
  font-family: 'Climate Crisis';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/climate-crisis-400-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Climate Crisis';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/climate-crisis-400-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/figtree-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/figtree-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/figtree-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/figtree-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/figtree-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/figtree-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --color-bg: #03423b;
  --color-surface: #1e5650;
  --color-text: #f5ead8;
  --color-accent: #e6ff5e;
  --color-accent-2: #f12bfc;
  --color-accent-3: #ffbd59;
  --color-divider: color-mix(in srgb, var(--color-text) 22%, transparent);

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #fbf8f4;
  --color-neutral-200: #f1ebe1;
  --color-neutral-300: #e0d7c8;
  --color-neutral-400: #c7bcaa;
  --color-neutral-500: #a59a89;
  --color-neutral-600: #847a6b;
  --color-neutral-700: #635b50;
  --color-neutral-800: #453f37;
  --color-neutral-900: #2a2621;

  --color-accent-100: #fbffe6;
  --color-accent-200: #f4ffbf;
  --color-accent-300: #eeff8f;
  --color-accent-400: #e6ff5e;
  --color-accent-500: #cfe93f;
  --color-accent-600: #adc422;
  --color-accent-700: #839614;
  --color-accent-800: #5b690d;
  --color-accent-900: #384008;

  --color-accent-2-100: #ffe9ff;
  --color-accent-2-200: #ffcaff;
  --color-accent-2-300: #fda3ff;
  --color-accent-2-400: #f76bfe;
  --color-accent-2-500: #f12bfc;
  --color-accent-2-600: #cf16d8;
  --color-accent-2-700: #a010a8;
  --color-accent-2-800: #720b78;
  --color-accent-2-900: #470748;

  --color-accent-3-100: #fff6e6;
  --color-accent-3-200: #ffebc6;
  --color-accent-3-300: #ffda97;
  --color-accent-3-400: #ffc974;
  --color-accent-3-500: #ffbd59;
  --color-accent-3-600: #eba033;
  --color-accent-3-700: #bd7c1d;
  --color-accent-3-800: #8c5a11;
  --color-accent-3-900: #5a390a;

  --font-heading: "Climate Crisis", system-ui, sans-serif;
  --font-heading-weight: 400;
  --font-body: "Figtree", system-ui, sans-serif;

  --space-1: 4.4px;
  --space-2: 8.8px;
  --space-3: 13.2px;
  --space-4: 17.6px;
  --space-6: 26.4px;
  --space-8: 35.2px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  /* Elevation — derived from the ground: ink-tinted ambient darkness. */
  --shadow-sm: 0 1px 2px color-mix(in srgb, #011d1a 32%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #011d1a 38%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #011d1a 46%, transparent);
}

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  text-wrap: pretty;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}

a { color: var(--color-accent-700); text-underline-offset: 3px; text-decoration: none; }
a:hover { color: var(--color-accent-800); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

img { display: block; max-width: 100%; }

.washed { filter: saturate(0.78) contrast(0.93) brightness(1.04) opacity(0.98); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: 999px;
  transition: background 150ms ease, color 150ms ease;
}
.btn-primary { background: var(--color-accent); color: var(--color-accent-900); }
.btn-primary:hover { background: var(--color-accent-300); color: var(--color-accent-900); text-decoration: none; }
.btn-primary:active { background: var(--color-accent-500); }

.btn-accent-2 { background: var(--color-accent-2); color: var(--color-accent-2-900); }
.btn-accent-2:hover { background: var(--color-accent-2-300); color: var(--color-accent-2-900); text-decoration: none; }
.btn-accent-2:active { background: var(--color-accent-2-700); color: var(--color-accent-2-100); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); text-decoration: none; }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }

.btn-contact-cream { background: var(--color-accent-3); color: var(--color-accent-3-800); }
.btn-contact-cream:hover { background: var(--color-accent-3-300); color: var(--color-accent-3-800); text-decoration: none; }
.btn-contact-outline { background: transparent; color: var(--color-text); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--color-text) 60%, transparent); }
.btn-contact-outline:hover { background: color-mix(in srgb, var(--color-text) 14%, transparent); color: var(--color-text); text-decoration: none; }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-200); color: var(--color-accent-900); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }
.tag-neutral { background: var(--color-neutral-200); color: var(--color-neutral-800); }

/* — cards — */
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); margin: 0 0 10px; }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) max(24px, calc((100% - 1200px) / 2 + 24px));
  position: sticky; top: 0; z-index: 20; background: var(--color-bg);
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
  display: flex; align-items: center;
}
.nav-brand-logo-png { height: 28px; width: auto; display: block; }
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

.nav-links { display: contents; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 40px; height: 40px; padding: 0; margin-left: auto;
  background: transparent; border: none; border-radius: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--color-text); transition: transform 200ms ease, opacity 200ms ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--color-bg); padding: 8px 24px 24px;
    border-top: 1px solid var(--color-divider); box-shadow: var(--shadow-md);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a:not(.btn) { padding: 14px 4px; font-size: 16px; border-bottom: 1px solid var(--color-divider); }
  .nav-links .btn { margin-top: 10px; width: 100%; }
}

/* — layout — */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 24px) 96px; }

/* — hero — */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: clamp(32px, 5vw, 56px); align-items: center;
  padding: clamp(48px, 7vw, 88px) 0 64px;
}
.hero-eyebrow {
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  color: var(--color-accent-3-700); margin: 0 0 20px;
}
.hero-title {
  font-family: var(--font-heading); font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.09; margin: 0; margin-left: -0.028em;
}
.hero-title span { display: block; }
.hero-lede {
  font-size: 18px; line-height: 30px; max-width: 46ch; margin: 28px 0 0;
  color: color-mix(in srgb, var(--color-text) 84%, transparent);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.hero-portrait-wrap { position: relative; width: 100%; max-width: 400px; justify-self: end; }
.hero-portrait-blob {
  position: absolute; left: -48px; bottom: -32px; width: 160px; height: 160px;
  border-radius: 50%; background: var(--color-accent-3); z-index: 0;
}
.hero-portrait {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 767px) {
  .hero { grid-template-columns: 1fr; }
  .hero-portrait-wrap { max-width: 220px; margin: 12px auto 0; justify-self: center; }
  .hero-portrait-blob { width: 100px; height: 100px; left: -24px; bottom: -18px; }
}

/* — work section — */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 32px;
}
.section-title {
  font-family: var(--font-heading); font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.15; margin: 0; margin-left: -0.028em;
}
.section-sub {
  font-size: 15px; line-height: 24px; margin: 0; max-width: 40ch;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}

.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }

.work-card {
  display: block; padding: 0; overflow: hidden; border-radius: 28px;
  background: var(--color-surface); color: inherit; text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); text-decoration: none; color: inherit; }

.work-card-media { height: 240px; overflow: hidden; }
.work-card-media-inner { width: 100%; height: 100%; transition: transform 320ms ease; }
.work-card:hover .work-card-media-inner { transform: scale(1.05); }
.work-card-media img { width: 100%; height: 100%; object-fit: cover; }
.work-card-media img[data-fit="contain"] { object-fit: contain; background: var(--color-neutral-100); }

.work-card-media-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px; font-size: 13px; letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--color-neutral-900) 55%, transparent);
  background: linear-gradient(135deg, var(--color-neutral-200), var(--color-neutral-300));
}

.work-card-body { padding: 28px 28px 32px; }
.work-card-title { font-family: var(--font-heading); font-size: 26px; line-height: 32px; margin: 0; }
.work-card-desc {
  font-size: 15px; line-height: 25px; margin: 12px 0 20px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.work-card-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* — impact numbers — */
.impact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px 24px; justify-items: center; padding: 88px 0 72px;
}
.impact-bubble {
  border-radius: 50%; display: grid; place-content: center; justify-items: center;
  text-align: center; padding: 34px; box-sizing: border-box;
}
.impact-bubble p:first-child { font-family: var(--font-heading); margin: 0; }
.impact-bubble p:last-child {
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  margin: 12px 0 0; max-width: 14ch; text-wrap: balance;
}

/* — about — */
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: clamp(32px, 5vw, 64px); align-items: start; padding: 32px 0 24px;
}
.about-eyebrow {
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  color: var(--color-accent-700); margin: 0 0 20px;
}
.about-title {
  font-family: var(--font-heading); font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.22; margin: 0; margin-left: -0.028em;
}
.about-body {
  font-size: 17px; line-height: 28px; margin: 24px 0 0;
  color: color-mix(in srgb, var(--color-text) 84%, transparent);
}
.about-body + .about-body { margin-top: 20px; }

.about-sidebar { display: flex; flex-direction: column; gap: 28px; }
.about-sidebar-label {
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  margin: 0 0 14px; color: color-mix(in srgb, var(--color-text) 65%, transparent);
}
.timeline { display: flex; flex-direction: column; gap: 14px; }
.timeline-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: baseline; }
.timeline-years { font-size: 14px; font-weight: 600; color: var(--color-accent-700); }
.timeline-role { font-size: 16px; line-height: 24px; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* — contact — */
.contact-section { padding: 72px 0 0; }
.contact-panel {
  background: var(--color-accent-900); color: var(--color-text); border-radius: 32px;
  padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 64px);
}
.contact-title {
  font-family: var(--font-heading); font-size: clamp(28px, 3.6vw, 36px);
  line-height: 1.22; margin: 0; max-width: 28ch;
}
.contact-lede {
  font-size: 16px; line-height: 26px; margin: 18px 0 0; max-width: 52ch;
  color: color-mix(in srgb, var(--color-text) 86%, transparent);
}
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.contact-footer {
  font-size: 13px; line-height: 24px; margin: 32px 0 0;
  color: color-mix(in srgb, var(--color-text) 62%, transparent);
}

/* — scroll reveal (progressive enhancement, see script.js) — */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 620ms ease, transform 620ms ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }
