/* ==========================================================================
   garrettlyons.com — Mist palette (light) + forest night (dark)
   ========================================================================== */
:root,
:root[data-theme="light"] {
  --bg: #F3F5F2;
  --surface: #E4E9E3;
  --border: #D7DED6;
  --dots: #CDD5CC;
  --text: #1C2A20;
  --body: #34403A;
  --muted: #535E54;
  --accent: #C0622F;        /* clay: periods, handwritten notes, the disc */
  --status: #2F8A57;        /* "open to new roles" dot */
  --river: #2E6A8E;
  --forest: #2F5D3A;
  --foot-bg: #26402E;
  --foot-text: #F3F5F2;     /* footer text matches the page background */
  --foot-accent: #C0622F;
  color-scheme: light;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1400px;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root[data-theme="dark"] {
  --bg: #141A15;
  --surface: #1F2720;
  --border: #2A332B;
  --dots: #2C362D;
  --text: #F1ECE1;
  --body: #D6D2C6;
  --muted: #A9A797;
  --accent: #E08A5B;
  --status: #4CC27F;
  --river: #86B8D6;
  --forest: #7FBF8E;
  --foot-bg: #0E130F;
  --foot-text: #F1ECE1;
  --foot-accent: #E89A6B;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.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; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--text); color: var(--bg); text-decoration: none; }
.skip-link:focus { top: 12px; }
.mono-label { margin: 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.accent { color: var(--accent); }
.hand { font-family: var(--hand); color: var(--accent); font-weight: 600; display: inline-block; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); transition: background-color .4s ease; }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: clamp(15px, 4vw, 17px); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 0 4px; font-size: clamp(14px, 3.6vw, 16px); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 clamp(7px, 1.8vw, 14px); text-decoration: none; }
.nav a:hover { color: var(--muted); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.round-btn { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.round-btn:hover { border-color: var(--text); }
.theme-toggle { margin-left: 4px; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
.menu-btn { display: none; }
.icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }
.menu-btn[aria-expanded="true"] .icon-burger { display: none; }

.mobile-menu { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); box-shadow: 0 16px 32px rgba(0,0,0,.08); padding: 4px 16px 24px; display: flex; flex-direction: column; }
.mobile-menu a { display: flex; align-items: center; justify-content: space-between; min-height: 60px; font-size: 30px; letter-spacing: -.01em; text-decoration: none; border-bottom: 1px solid var(--border); }
.mobile-menu a span { font-size: 20px; color: var(--accent); }
.mobile-menu .theme-row { margin-top: 20px; align-self: flex-start; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); font: 500 16px var(--serif); display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.theme-row .label-light { display: none; }
:root[data-theme="dark"] .theme-row .label-light { display: inline; }
:root[data-theme="dark"] .theme-row .label-dark { display: none; }

@media (max-width: 599px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (min-width: 600px) {
  .mobile-menu { display: none !important; }
}

/* ---------- Homepage intro ---------- */
.intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: clamp(40px, 8vw, 64px); padding-bottom: clamp(40px, 8vw, 64px); }
.intro-text { display: flex; flex-direction: column; gap: 12px; max-width: 680px; }
.display { margin: 0; font-size: clamp(38px, 7.5vw, 56px); line-height: 1.05; letter-spacing: -.02em; font-weight: 500; }
.status { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status); }

/* ---------- Work ---------- */
.work { padding-bottom: clamp(72px, 12vw, 112px); }
.work-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; }
.work-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; }
.work-title h2 { margin: 0; font-size: clamp(30px, 6vw, 34px); font-weight: 500; letter-spacing: -.01em; }
.work-title .hand { font-size: clamp(21px, 5vw, 24px); transform: rotate(-3deg); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); font: 500 15px var(--serif); cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.filter[aria-pressed="false"]:hover { background: var(--surface); border-color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Exact 12-column rhythm: paired cards share one height and widths that sum to 100% */
.grid { display: flex; flex-wrap: wrap; gap: clamp(28px, 6vw, 40px) 24px; }
.card { display: flex; flex-direction: column; gap: 14px; min-width: min(100%, 300px); text-decoration: none; flex: 1 1 100%; }
.card.span-7 { flex-basis: calc((100% - 24px) * 7 / 12); }
.card.span-5 { flex-basis: calc((100% - 24px) * 5 / 12); }
.card.span-12 { flex-basis: 100%; }
.card-media { position: relative; overflow: hidden; height: clamp(260px, 60vw, 480px); border-radius: clamp(20px, 5vw, 28px); background: var(--surface); border: 1px solid var(--border); transition: background-color .4s ease; }
.card.span-12 .card-media { height: clamp(240px, 55vw, 440px); }
.card-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: clamp(18px, 4.6vw, 22px); color: var(--muted); background-image: radial-gradient(circle, var(--dots) 1.3px, transparent 1.6px); background-size: 22px 22px; transition: transform .7s var(--ease); }
.card-inner img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-inner { transform: scale(1.04); }
.lock { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); color: var(--text); display: flex; align-items: center; justify-content: center; opacity: .5; transition: opacity .3s ease, transform .35s var(--ease); }
.card:hover .lock, .card:focus-visible .lock { opacity: 1; transform: scale(1.1); }
.card-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }
.card-title { font-weight: 500; }
.card-tag { color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .card:hover .card-inner, .card:hover .lock { transform: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--foot-bg); color: var(--foot-text); transition: background-color .4s ease; }
.footer-inner { display: flex; flex-direction: column; gap: clamp(32px, 7vw, 44px); padding-top: clamp(56px, 10vw, 80px); padding-bottom: 28px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; }
.footer-row h2 { margin: 0; font-size: clamp(36px, 8vw, 44px); font-weight: 500; letter-spacing: -.01em; }
.footer-row h2 span { color: var(--foot-accent); }
.pill-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid currentColor; text-decoration: none; font-weight: 500; font-size: 16px; transition: background-color .2s ease, color .2s ease; }
.site-footer .pill-btn:hover { background: var(--foot-text); color: var(--foot-bg); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; }

/* Disc button (opens the course) */
.disc-btn { width: 56px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--foot-accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.disc-btn .ink { stroke: var(--foot-text); }
.disc-btn .speed { opacity: .7; transition: opacity .25s ease, transform .35s var(--ease); }
.disc-btn .disc-g { transition: transform .35s var(--ease); }
.disc-btn .spin { transform-box: view-box; transform-origin: 31px 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.disc-btn:hover .disc-g, .disc-btn:focus-visible .disc-g { transform: translateX(3px); }
.disc-btn:hover .speed, .disc-btn:focus-visible .speed { opacity: 1; transform: translateX(-2px); }
.disc-btn:hover .spin, .disc-btn:focus-visible .spin { animation: spin .6s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .disc-btn:hover .disc-g, .disc-btn:hover .speed, .disc-btn:focus-visible .disc-g, .disc-btn:focus-visible .speed { transform: none; }
  .disc-btn:hover .spin, .disc-btn:focus-visible .spin { animation: none; }
}

/* ---------- Disc golf course ---------- */
@keyframes open-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.course { display: flex; flex-direction: column; gap: 14px; animation: open-up .45s var(--ease) both; }
.course-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; }
.course-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.course-title .hud-label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.course-title .hud-name { font-family: var(--hand); font-weight: 600; font-size: 30px; line-height: 1.1; }
.course-title .hud-note { font-size: 15px; opacity: .85; }
.course-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-family: var(--mono); font-size: 12px; }
.next-btn { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--foot-text); color: var(--foot-bg); font: 500 15px var(--serif); cursor: pointer; }
.text-btn { min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--foot-text); font: 12px var(--mono); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; cursor: pointer; }
.text-btn:hover, .text-btn:focus-visible { text-decoration-color: currentColor; }

.field { position: relative; height: 300px; border-radius: 22px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  background-color: #24432F; background-image: radial-gradient(circle, rgba(255,255,255,.07) 1.2px, rgba(0,0,0,0) 1.6px); background-size: 12px 12px; }
.field-layers { position: absolute; inset: 0; }
.fairway { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.pond { position: absolute; border-radius: 50%; background-color: rgba(46,106,142,.85); background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 2px, rgba(0,0,0,0) 2px 14px); }
.island { position: absolute; border-radius: 50%; background: #3B6E46; border: 4px solid #CDBF94; }
.drop { position: absolute; width: 48px; height: 48px; border-radius: 8px; border: 2px dashed rgba(255,255,255,.55); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,.8); }
.teepad { position: absolute; border-radius: 10px; background: rgba(240,232,214,.18); }
.tree { position: absolute; border-radius: 50%; background: #3A6A45; border: 2px solid rgba(233,226,208,.4); box-shadow: 0 5px 10px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; }
.tree > div { width: 64%; height: 64%; border-radius: 50%; background: #548F60; margin: -10% 0 0 -10%; }
.basket { position: absolute; width: 56px; height: 56px; }
.disc { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); box-shadow: 0 3px 6px rgba(0,0,0,.3), inset 0 0 0 3px rgba(255,255,255,.35), inset 0 0 0 8px rgba(0,0,0,.08); pointer-events: none; }
.aim { position: absolute; height: 0; border-top: 2px dashed rgba(255,255,255,.75); transform-origin: 0 0; pointer-events: none; }
.wind { position: absolute; left: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 9px; border-radius: 12px; background: rgba(28,28,26,.82); color: #fff; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; pointer-events: none; }
.wind svg { flex: 0 0 24px; }
.wind .bar { width: 1px; height: 14px; background: rgba(255,255,255,.6); }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.85); } 60% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 100% { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.field-msg { position: absolute; left: 50%; top: 16px; z-index: 3; margin: 0; padding: 8px 18px; border-radius: 999px; background: var(--bg); color: var(--text); font-family: var(--hand); font-weight: 600; font-size: 22px; line-height: 1.1; white-space: nowrap; transform: translateX(-50%); }
.field-msg.big { font-size: 34px; }
.field-msg.pop { animation: pop .45s var(--ease) both; }
.done { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; background: rgba(20,30,22,.45); }
.done-card { max-width: 360px; margin: 16px; padding: 22px 26px; border-radius: 20px; background: var(--bg); color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.done-card .hand { font-size: 34px; line-height: 1; color: var(--text); }
.done-card .muted { color: var(--muted); font-size: 15px; }
.done-card button { margin-top: 6px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--accent); color: var(--bg); font: 500 16px var(--serif); cursor: pointer; }

.card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-family: var(--mono); font-size: 12px; opacity: .9; }
.card-row .chips { display: contents; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); }
.chip.current { border-color: var(--foot-text); }
.chip-num { opacity: .75; }
.chip-score { font-weight: 500; }
.card-row .right { margin-left: auto; display: inline-flex; gap: 14px; opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  .course, .field-msg.pop { animation: none; }
}

/* ---------- About page ---------- */
.about-intro { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 56px); align-items: flex-start; padding-top: clamp(32px, 7vw, 72px); padding-bottom: clamp(56px, 9vw, 88px); }
.portrait-col { flex: 1 1 300px; max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.portrait { aspect-ratio: 4 / 5; overflow: hidden; border-radius: clamp(20px, 5vw, 28px); background: var(--surface); border: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: center; background-image: radial-gradient(circle, var(--dots) 1.3px, transparent 1.6px); background-size: 22px 22px; }
.portrait img { width: 90%; height: auto; margin-top: 32px; }
.portrait-col .hand { font-size: clamp(21px, 5vw, 24px); transform: rotate(-2deg); align-self: flex-start; }
.bio { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: clamp(20px, 4vw, 28px); padding-top: 8px; }
.bio .lede { margin: 0; max-width: 720px; font-size: clamp(21px, 4.6vw, 26px); line-height: 1.4; }
.bio-body { max-width: 680px; display: flex; flex-direction: column; gap: 18px; font-size: clamp(17px, 3.8vw, 19px); line-height: 1.65; color: var(--body); }
.bio-body p { margin: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.btn-primary:hover { background: var(--text); color: var(--bg); }
.btn-secondary { border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); }
.toolkit { padding-bottom: clamp(48px, 8vw, 72px); }
.toolkit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; border-top: 1px solid var(--border); padding-top: 32px; }
.toolkit-row h2 { margin: 0; font-size: 28px; font-weight: 500; }
.chips-list { flex: 3 1 320px; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; font-weight: 500; margin: 0; padding: 0; list-style: none; }
.chips-list li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); }
.currently { padding-bottom: clamp(64px, 10vw, 104px); }
.currently-strip { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 16px 22px; border-radius: 18px; background: var(--surface); font-size: 14px; transition: background-color .4s ease; }
.currently-strip > span { display: inline-flex; align-items: center; gap: 8px; }
.currently-strip .k { color: var(--muted); }
.currently-strip .v { font-weight: 600; }
