/* creedhaymond.com — shared styles (spec v3, palette option A) */

:root {
  color-scheme: light dark;

  /* Color — light */
  --bg: #FAF8F5;        /* warmer white */
  --surface: #F1EEE9;
  --hairline: #E2DDD6;
  --headline: #282365;   /* Blackberry Haze */
  --text: #2B2B2B;
  --text-2: #5E5E5E;
  --link: #26408B;       /* Indigo Depth */
  --link-hover: #26408B;
  --underline: #00A3FF;  /* Electric Blue */
  --btn: #00A3FF;
  --btn-hover: #33B5FF;
  --btn-text: #282365;
  --outline: #26408B;
  --chip-bg: #D9E2EC;    /* Silver Mist */
  --chip-text: #26408B;
  --focus: #26408B;
  --accent: #00A3FF;
  --nav-bg: rgba(250, 248, 245, 0.78);
  --marker: #B3E0FF;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(48px, 9vw, 96px);
  --fs-h1: clamp(40px, 6vw, 72px);
  --fs-h2: clamp(26px, 3.2vw, 36px);
  --fs-sub: clamp(21px, 2.2vw, 28px);
  --fs-body: 17px;
  --fs-small: 15px;
  --fs-caption: 14px;
  --fs-stat: clamp(56px, 8vw, 88px);

  /* Spacing (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px; --s11: 160px;

  --gutter: 24px;
  --max: 1080px;
  --text-max: 720px;
  --nav-h: 52px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F12;
    --surface: #1B1B21;
    --hairline: #2E2E36;
    --headline: #FCFCFC;
    --text: #EDEDED;
    --text-2: #B0B0B0;
    --link: #00A3FF;
    --link-hover: #90AFDE; /* Frosted Horizon */
    --underline: #90AFDE;
    --outline: #00A3FF;
    --chip-bg: #26408B;
    --chip-text: #FCFCFC;
    --focus: #00A3FF;
    --nav-bg: rgba(15, 15, 18, 0.78);
    --marker: #26408B;
  }
}

@media (min-width: 735px) {
  :root { --gutter: 48px; --fs-body: 19px; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + var(--s4)); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { color: var(--headline); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--s4); }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 4px; text-decoration-thickness: 1px; }

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

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--bg); color: var(--link); padding: var(--s3) var(--s4); border-radius: 999px;
  font-weight: 600;
}
.skip-link:focus { top: var(--s3); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-nav.scrolled { border-bottom-color: var(--hairline); }
.nav-inner {
  max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
}
.nav-name { color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.nav-name:hover { color: var(--text); text-decoration: none; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s5); }
.nav-links a { color: var(--text-2); font-size: var(--fs-small); display: inline-flex; align-items: center; min-height: 44px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 500; }
.menu-btn {
  display: none; background: none; border: 0; padding: 0 var(--s2); min-height: 44px; min-width: 44px;
  font: inherit; font-size: var(--fs-small); color: var(--text); cursor: pointer;
}

/* No JS on small screens: links wrap into a scrollable row */
@media (max-width: 734px) {
  .nav-links { gap: var(--s4); overflow-x: auto; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .js .nav-links { display: none; }
  .js .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
}

/* Mobile menu sheet */
.menu-sheet {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
  background: var(--bg);
  padding: var(--s7) var(--gutter);
  display: none;
}
.menu-sheet.open { display: block; }
.menu-sheet ul { list-style: none; margin: 0; padding: 0; }
.menu-sheet li + li { margin-top: var(--s3); }
.menu-sheet a {
  display: block; font-size: clamp(28px, 8vw, 36px); font-weight: 600; letter-spacing: -0.015em;
  color: var(--headline); padding: var(--s2) 0;
}
.menu-sheet a[aria-current="page"] { color: var(--link); }
body.menu-open { overflow: hidden; }
@media (min-width: 735px) { .menu-sheet { display: none !important; } }

/* Layout */
body { min-height: 100svh; display: flex; flex-direction: column; }
main { display: block; flex: 1 0 auto; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--text-max); margin-left: auto; margin-right: auto; }

.screen {
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--s7) 0;
}
@media (min-width: 735px) { .screen { padding: var(--s8) 0; } }
.screen.short { min-height: 0; }
.center { text-align: center; }
.center .narrow, .center .lede { margin-left: auto; margin-right: auto; }

/* Type */
.display { font-size: var(--fs-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; }
.h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; max-width: 14ch; }
.center .h1, .center .display { margin-left: auto; margin-right: auto; }
.h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
.sub { font-size: var(--fs-sub); font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; color: var(--text-2); margin-top: var(--s4); max-width: 30ch; }
.center .sub { margin-left: auto; margin-right: auto; }
.lede { margin-top: var(--s5); max-width: 60ch; }
.body-2 { color: var(--text-2); }
.eyebrow { font-size: var(--fs-small); font-weight: 600; color: var(--link); letter-spacing: 0; }
.currently { margin-top: var(--s5); font-size: var(--fs-small); color: var(--text-2); }
.currently-label { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--text); }

/* Soft marker highlight on one word per headline */
.mark { position: relative; z-index: 0; white-space: nowrap; }
.mark::after {
  content: ""; position: absolute; z-index: -1;
  left: -0.08em; right: -0.08em; bottom: 0.04em; height: 0.38em;
  border-radius: 999px; background: var(--marker);
}

/* Buttons & links */
.actions { margin-top: var(--s6); display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.center .actions { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px; border-radius: 999px;
  font-size: 17px; font-weight: 600; line-height: 1;
  background: var(--btn); color: var(--btn-text);
  border: 1.5px solid transparent;
  transition: background-color 180ms ease, transform 120ms ease;
}
.btn:hover { background: var(--btn-hover); color: var(--btn-text); text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-outline { background: transparent; color: var(--outline); border-color: var(--outline); }
.btn-outline:hover { background: transparent; color: var(--outline); }
.more { font-weight: 500; display: inline-flex; align-items: center; min-height: 44px; }
.more::after { content: "›"; margin-left: 6px; display: inline-block; transition: transform 160ms ease; font-size: 1.15em; line-height: 1; }
.more:hover::after { transform: translateX(2px); }

/* Hero photo */
.hero { padding-top: var(--s7); padding-bottom: var(--s7); }
@media (min-width: 735px) { .hero { padding-top: var(--s8); } }
.hero-photo { margin: var(--s6) auto 0; max-width: 720px; }
.hero-photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 60% 40%; border-radius: 20px; }
@media (min-width: 735px) { .hero-photo { margin-top: var(--s7); } .hero-photo img { border-radius: 24px; } }

/* Side quests */
.trio { list-style: none; padding: 0; margin: var(--s7) 0 0; display: grid; gap: var(--s4); }
.trio li { background: var(--surface); border-radius: 20px; padding: var(--s6) var(--s5); }
.trio .h2 { font-size: clamp(22px, 2.6vw, 28px); }
.trio p { margin-top: var(--s2); color: var(--text-2); font-size: var(--fs-small); }
@media (min-width: 735px) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Stats */
.stats { list-style: none; padding: 0; margin: var(--s7) 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7) var(--s5); }
.stat-num { display: block; font-size: var(--fs-stat); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--headline); }
.center .stats { max-width: 640px; margin-left: auto; margin-right: auto; }
.center .stat-label { margin-left: auto; margin-right: auto; }
.stat-label { display: block; margin-top: var(--s3); font-size: var(--fs-small); color: var(--text-2); max-width: 22ch; }

/* Timeline */
.timeline { list-style: none; margin: var(--s7) 0 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--hairline);
}
.stop { position: relative; padding-left: var(--s6); }
.stop + .stop { margin-top: var(--s6); }
.stop::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
}
.stop .h2 { font-size: clamp(26px, 3.2vw, 36px); }
.stop .meta { margin-top: var(--s1); font-size: var(--fs-small); color: var(--text-2); }
.stop .stop-head { margin-top: var(--s4); font-weight: 600; color: var(--text); }
.stop p.copy { margin-top: var(--s2); }
@media (min-width: 1069px) {
  .timeline::before { left: 243px; }
  .stop { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 var(--s7); padding-left: 0; }
  .stop::before { left: 239px; }
  .stop-label { position: sticky; top: calc(var(--nav-h) + var(--s5)); align-self: start; text-align: right; }
  .stop-label .h2 { font-size: 26px; }
  .stop-body { padding-left: 0; }
  .stop .stop-head { margin-top: 0; }
}

/* Project cards */
.cards { display: grid; gap: var(--s6); }
.card {
  background: var(--surface); border-radius: 20px; padding: var(--s6) var(--s5);
}
@media (min-width: 735px) { .card { border-radius: 28px; padding: var(--s7); } }
.card-head { display: flex; align-items: center; gap: var(--s3); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--bg); color: var(--link);
}
.card-icon svg { width: 24px; height: 24px; }
.card .chip {
  display: inline-block; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-text);
}
.card .h1 { margin-top: var(--s4); font-size: clamp(36px, 5vw, 56px); max-width: none; }
.card .sub { margin-top: var(--s3); }
.card .copy { margin-top: var(--s5); max-width: 60ch; }
.card .copy p + p { margin-top: var(--s4); }
.card .actions { margin-top: var(--s5); }
.card-media { margin: calc(-1 * var(--s6)) calc(-1 * var(--s5)) var(--s6); border-radius: 20px 20px 0 0; overflow: hidden; aspect-ratio: 16 / 10; }
@media (min-width: 735px) { .card-media { margin: calc(-1 * var(--s7)) calc(-1 * var(--s7)) var(--s7); border-radius: 28px 28px 0 0; } }

/* AI skills list (Career) */
.ai-list { list-style: none; padding: 0; margin: var(--s6) auto 0; max-width: 34ch; text-align: center; }
.ai-list li { padding: var(--s4) 0; border-bottom: 1px solid var(--hairline); font-size: clamp(19px, 2vw, 22px); font-weight: 500; color: var(--text); }
.ai-list li:last-child { border-bottom: 0; }

/* Now */
.now-list { margin: var(--s7) 0 0; padding: 0; border-top: 1px solid var(--hairline); }
.now-row { padding: var(--s5) 0; border-bottom: 1px solid var(--hairline); display: grid; gap: var(--s2); }
.now-row dt { font-weight: 600; color: var(--headline); }
.now-row dd { margin: 0; color: var(--text-2); }
@media (min-width: 735px) { .now-row { grid-template-columns: 180px minmax(0, 1fr); gap: var(--s5); padding: var(--s6) 0; } }

/* Contact */
.fine { margin-top: var(--s6); font-size: var(--fs-caption); color: var(--text-2); }
.copy-email { margin-top: var(--s2); background: none; border: 0; font: inherit; color: var(--link); cursor: pointer; padding: 0; min-height: 44px; font-weight: 500; }
.copy-email:hover { text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); background: var(--surface); font-size: var(--fs-small); color: var(--text-2); }
.site-footer .wrap { padding-top: var(--s7); padding-bottom: var(--s6); }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--link); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 36px; overflow-wrap: anywhere; }
.footer-grid { display: grid; gap: var(--s6); }
.footer-name { display: inline-block; font-size: 17px; font-weight: 600; color: var(--headline) !important; }
.footer-about p { margin-top: var(--s2); max-width: 36ch; }
.footer-contact { margin-top: var(--s2) !important; display: flex; flex-wrap: wrap; column-gap: var(--s5); }
.footer-head { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--text); margin-bottom: var(--s2); }
.footer-pages ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: var(--s7); max-width: 260px; }
.footer-bottom { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); justify-content: space-between; font-size: var(--fs-caption); }
@media (min-width: 735px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s8); align-items: stretch; }
  .footer-about { display: flex; flex-direction: column; align-items: flex-start; }
  .footer-contact { margin-top: auto !important; padding-top: var(--s2); }
}

/* Motion: fade-up on scroll */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 80ms; }
.js .reveal.d2 { transition-delay: 160ms; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
