:root {
  --bg: #0a0a0c;
  --surface: #131316;
  --card: #16161a;
  --text: #e8e8ec;
  --text-dim: #a8a8b0;
  --text-faint: #7a7a85;
  --accent: #d4a574;
  --border: rgba(255,255,255,0.07);
  --hairline: rgba(255,255,255,0.06);
  --divider: rgba(255,255,255,0.08);
  --max: 1360px;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', ui-serif, Georgia, serif;
  --r-card: 16px;
  --r-pill: 24px;
  --weave-rgb: 232,232,236;
  --frame: rgba(212,165,116,0.32);
  --frame-hover: rgba(212,165,116,0.58);
  --weave-opacity: 0.6;
}

/* ---- Light theme ---- */
:root[data-theme="light"] {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --card: #ffffff;
  --text: #16161a;
  --text-dim: #4c4b54;
  --text-faint: #77757f;
  --accent: #9a6633;
  --border: rgba(0,0,0,0.10);
  --hairline: rgba(0,0,0,0.10);
  --divider: rgba(0,0,0,0.12);
  --weave-rgb: 26,24,30;
  --frame: rgba(154,102,51,0.38);
  --frame-hover: rgba(154,102,51,0.65);
  --weave-opacity: 0.55;
}
:root[data-theme="light"] .tool { box-shadow: 0 6px 22px rgba(0,0,0,0.08); }
:root[data-theme="light"] .tool-shot { filter: none; }
:root[data-theme="light"] .nav-wrap {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
#weave { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: var(--weave-opacity); }
.nav, main, footer { position: relative; z-index: 1; }
.nav {
  display: flex; justify-content: flex-end; align-items: center;
  padding: 1.25rem clamp(1.5rem, 4vw, 3rem); max-width: var(--max); margin: 0 auto;
}
.nav-wrap {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-wrap.scrolled { border-bottom-color: rgba(255,255,255,0.07); }
/* Every nav link stays at every width. The rule that used to hide all but the
   pill was survivable when the hero carried its own Résumé button; with the
   hero gone the nav is the only route to the résumé and the about page, so
   hiding either one strands a phone visitor. Three short items fit. */


nav a {
  font-family: var(--sans); font-size: 0.85rem;
  color: var(--text-dim); text-decoration: none; margin-left: 2rem;
  transition: color 0.2s var(--ease);
}
nav a:hover { color: var(--accent); }
.nav-cta { margin-left: 2rem; padding: 0.5rem 1.1rem; border-radius: var(--r-pill); background: var(--accent); color: var(--bg); font-weight: 600; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); color: var(--bg); }
main { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem); }
.eyebrow {
  font-family: var(--sans); font-weight: 600; font-size: 0.75rem;
  color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.12em;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px var(--accent); animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.btn {
  display: inline-block;
  font-family: var(--sans); font-weight: 600; font-size: 0.9rem;
  padding: 0.75rem 1.75rem; background: var(--accent); color: var(--bg);
  text-decoration: none; border: 0; cursor: pointer;
  border-radius: var(--r-pill); letter-spacing: 0.01em;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn.ghost { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--hairline); }
.btn.ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--text-dim); color: var(--text); }
.btn.copper { background: var(--accent); color: var(--bg); border: 0; }
.btn.copper:hover { background: var(--accent); }

section { padding: 8rem 0; }
.section-head { margin-bottom: 4rem; max-width: 100%; }
.section-head h1, .section-head h2, .about h2 {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; margin: 1rem 0;
}
/* The work is now the first thing on the page, so it opens at the top of the
   viewport rather than a section-break down the page. */
.work-first { padding-top: 3.5rem; }
.section-lede { color: var(--text-dim); font-size: 1.05rem; max-width: 64ch; }
.tools {
  display: flex; flex-direction: column;
  gap: 3.25rem;
}
.tool {
  background: var(--card);
  border: 1px solid var(--hairline); border-radius: var(--r-card);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.tool[hidden] { display: none; }
.tool:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0,0,0,0.5); }






@media (max-width: 600px) {
  .tool-slim { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
.tool-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.tag {
  font-family: var(--sans); font-weight: 700; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent);
}
.status { font-family: var(--sans); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.tool h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 1.5rem; margin-bottom: 0.75rem; }
.tool h3 a {
  color: inherit;
  text-decoration: none;
}
.tool h3 a:hover { color: var(--accent); }
.tool p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 2rem; }
.tool-foot {
  display: flex; align-items: center; justify-content: flex-start;
  flex-wrap: wrap; gap: 1rem;
  border-top: 1px solid var(--divider); padding-top: 1.25rem;
}
.tool-foot .mono { font-family: var(--sans); font-size: 0.8rem; color: var(--text-faint); }
.tool-foot a.mono {
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.tool-foot a.mono:hover { color: var(--accent); }

.brief-btn {
  font-family: var(--sans); font-weight: 600; font-size: 0.8rem;
  color: var(--text); background: rgba(255,255,255,0.05);
  border: 1px solid var(--hairline);
  padding: 0.55rem 1.1rem; text-decoration: none;
  border-radius: var(--r-pill);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.brief-btn:hover { background: rgba(255,255,255,0.09); border-color: var(--text-dim); }
.brief-btn.primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}
.brief-btn.primary:hover { opacity: 0.9; background: var(--accent); }
.brief-btn.live { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.brief-btn.live:hover { background: var(--accent); opacity: 0.9; }

.about p { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 1.25rem; }
.contact { text-align: center; padding: 10rem 0; }

.email {
  font-family: var(--sans); font-weight: 500; font-size: 1.1rem;
  color: var(--accent); text-decoration: none; cursor: pointer;
  border-bottom: 1px solid transparent; transition: border-color 0.3s var(--ease);
}
.email:hover { border-color: var(--accent); }
.contact-links { margin-top: 1.75rem; display: flex; gap: 1.5rem; justify-content: center; }


footer {
  border-top: 1px solid var(--hairline);
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  max-width: var(--max); margin: 0 auto; text-align: center;
}
footer p { font-family: var(--sans); font-size: 0.75rem; color: var(--text-faint); letter-spacing: 0.02em; }

.toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--accent); color: var(--bg);
  padding: 0.85rem 1.5rem;
  font-family: var(--sans); font-weight: 500; font-size: 0.85rem;
  border-radius: 6px; opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
  z-index: 1000; pointer-events: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .tools { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  /* Three links plus the theme toggle have to share a phone's width now that
     none of them are hidden, so the gaps tighten instead of an item dropping. */
  nav a { margin-left: 0.85rem; }
  .nav-cta { margin-left: 0.85rem; padding: 0.45rem 0.85rem; }
  .theme-btn { margin-left: 0.75rem; }
  section { padding: 5rem 0; }
  .tools { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none !important; }
  #weave { display: none; }
  .tool:hover { transform: none; }
}

.foot-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.foot-links a { font-family: var(--sans); font-weight: 600; font-size: 0.85rem; padding: 0.5rem 1.25rem; border-radius: var(--r-pill); background: var(--accent); color: var(--bg); text-decoration: none; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.foot-links a:hover { opacity: 0.9; transform: translateY(-1px); color: var(--bg); }

/* About-me contact block */
.avail {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-faint);
  display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem;
}
.contact-lede { color: var(--text-dim); margin-bottom: 0.75rem; }
.email {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 1.05rem;
  color: var(--accent); text-decoration: none; margin-bottom: 1.75rem;
  border-bottom: 1px solid transparent; transition: border-color 0.2s var(--ease);
}
.email:hover { border-bottom-color: var(--accent); }
.contact-links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Card screenshots */
.tool:hover > .tool-shot { filter: saturate(1) brightness(1); }
/* cards with no screenshot keep their original top padding */

/* ---- About me page ---- */
.about-page { padding: 2.5rem 0 2rem; }
.about-title {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; margin: 0 0 2rem;
}
.about-cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 4rem; align-items: start; }
.about-prose p { color: var(--text-dim); font-size: 1rem; line-height: 1.55; margin-bottom: 1rem; }
.about-side { border-left: 1px solid var(--hairline); padding-left: 3rem; }
@media (max-width: 860px) {
  .about-cols { grid-template-columns: 1fr; gap: 3rem; }
  .about-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--hairline); padding-top: 2.5rem; }
}

/* social/résumé badges (folded in from the old hello page) */
.hello-links { margin-top: 1.5rem; display: flex; gap: 2rem; flex-wrap: wrap; }
.hello-ic { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; text-decoration: none; }
.hello-badge {
  width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: var(--card); border: 1px solid var(--border);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.hello-badge svg { width: 34px; height: 34px; display: block; }
img.hello-badge { object-fit: cover; }
.hello-ic:hover .hello-badge { transform: translateY(-4px); border-color: rgba(212,165,116,0.55); box-shadow: 0 10px 28px rgba(0,0,0,0.4); }
.hello-cap { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); transition: color 0.22s var(--ease); }
.hello-ic:hover .hello-cap { color: var(--accent); }


/* right rail spacing on the about page */
.about-side .avail { margin-bottom: 1rem; }
.about-side .contact-lede { margin-bottom: 0.9rem; }
.about-side .email { margin-bottom: 0.5rem; }




/* ================= Work cards — one app per row =================
   Screenshot on one side, copy on the other, alternating down the page.
   Single source of truth: earlier .tool layout rules were removed. */
.tools { display: flex; flex-direction: column; gap: 3.25rem; }

.tool {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas: "shot meta" "shot title" "shot body" "shot foot";
  align-content: start;
  padding: 0; overflow: hidden;
  border: 1px solid rgba(212,165,116,0.32);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.tool:hover { border-color: rgba(212,165,116,0.55); }
.tool > .tool-shot {
  grid-area: shot;
  width: 100%; height: 100%;
  margin: 0; border: 0; border-radius: 0;
  border-right: 1px solid var(--frame);
  object-fit: cover; object-position: top center;
  aspect-ratio: 16 / 10;                 /* never let the copy column stretch the shot */
  filter: saturate(0.95) brightness(0.96);
  transition: filter 0.35s var(--ease);
}
.tool > .tool-meta { grid-area: meta; margin: 2.5rem 2.5rem 1.25rem; }
.tool > h3         { grid-area: title; margin: 0 2.5rem 0.9rem; font-size: 1.85rem; }
.tool > p          { grid-area: body;  margin: 0 2.5rem 1.75rem; font-size: 1rem; line-height: 1.65; }
.tool > .tool-foot { grid-area: foot;  margin: 0 2.5rem 2.5rem; }

/* mirror every other card */
.tool--flip {
  grid-template-columns: 1fr 1.15fr;
  grid-template-areas: "meta shot" "title shot" "body shot" "foot shot";
}
.tool--flip > .tool-shot {
  border-right: 0; border-left: 1px solid var(--frame);
}

/* a card with no screenshot (TailTracker) spans the full width */
.tool:not(:has(.tool-shot)) {
  grid-template-columns: 1fr;
  grid-template-areas: "meta" "title" "body" "foot";
}

@media (max-width: 880px) {
  .tool, .tool--flip {
    grid-template-columns: 1fr;
    grid-template-areas: "shot" "meta" "title" "body" "foot";
  }
  .tool > .tool-shot, .tool--flip > .tool-shot {
    aspect-ratio: 16 / 10; height: auto;
    border: 0; border-bottom: 1px solid var(--frame);
  }
  .tool > .tool-meta { margin-top: 1.75rem; }
}

/* Gold frame on the work cards. Scoped to .tools > .tool so it beats the
   legacy .tool hairline rule without needing !important. */
.tools > .tool { border: 1px solid var(--frame); }
.tools > .tool:hover { border-color: var(--frame-hover); }

/* Card action row: Brief / Anatomy / Stack / Launch */
.tool-foot { gap: 0.6rem; }
.tool-foot .brief-btn { font-size: 0.82rem; padding: 0.5rem 0.95rem; }


/* theme toggle button */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-left: 1.5rem; padding: 0;
  border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid var(--hairline);
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.theme-btn svg { width: 16px; height: 16px; display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }
:root:not([data-theme="light"]) .theme-btn .sun { display: none; }


/* the work section opens the page, so it does not get a full section gap above it.
   This id selector outranks .work-first, which is why the value lives here. */
#work { padding-top: 3rem; }


/* the shot-less card spans full width — keep its copy at a readable measure */
.tool:not(:has(.tool-shot)) > p,
.tool:not(:has(.tool-shot)) > h3 { max-width: 46rem; }
