:root {
  --canvas: #d9d0c2;
  --bg: #f3eee5;
  --surface: #fbf8f1;
  --surface-2: #e2d9ca;
  --surface-3: #c8bda9;
  --ink: #1a1916;
  --ink-soft: #6a6258;
  --ink-faint: #958b7e;
  --line: #d2c6b5;
  --line-strong: #b9aa95;
  --merlot: #562c33;
  --merlot-deep: #3f2026;
  --olive: #8c876d;
  --olive-deep: #68644e;
  --brass: #ad8f59;
  --charcoal: #171714;
  --charcoal-2: #22211d;
  --cream: #f7f0e4;
  --success: #4b8b68;
  --shadow-soft: 0 20px 60px rgba(55, 43, 31, 0.10);
  --shadow-strong: 0 30px 80px rgba(31, 25, 19, 0.18);
  --frame-radius: 34px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 13px;
  --max: 1380px;
}

html[data-theme="dark"] {
  --canvas: #070706;
  --bg: #100f0d;
  --surface: #171512;
  --surface-2: #211d18;
  --surface-3: #2d2821;
  --ink: #f5ede1;
  --ink-soft: #b0a698;
  --ink-faint: #7c7368;
  --line: #342f28;
  --line-strong: #4a4236;
  --merlot: #6f3a43;
  --merlot-deep: #4d252c;
  --olive: #66614b;
  --olive-deep: #4e4a38;
  --brass: #c3a36a;
  --charcoal: #090908;
  --charcoal-2: #12110f;
  --cream: #f4eadb;
  --success: #72b08d;
  --shadow-soft: 0 18px 56px rgba(0, 0, 0, 0.24);
  --shadow-strong: 0 30px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .25s ease, color .25s ease;
}
body.menu-open { overflow: hidden; }
::selection { background: var(--merlot); color: var(--cream); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }

.site-frame {
  width: min(calc(100% - 36px), var(--max));
  margin: 18px auto 28px;
  overflow: clip;
  border: 1px solid color-mix(in srgb, var(--line-strong) 70%, transparent);
  border-radius: var(--frame-radius);
  background: var(--bg);
  box-shadow: 0 28px 90px rgba(34, 25, 17, .16);
  transition: background .25s ease, border-color .25s ease;
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 4000;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brass), var(--merlot));
}

.section { position: relative; }
.section-kicker {
  margin: 0 0 14px;
  color: var(--brass);
  font: 600 11px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.section-kicker-light { color: #efe1c9; }
.section-kicker-dark { color: #c7a86d; }

/* NAV */
.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  padding: 0 34px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(16px);
  transition: background .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 1px 0 color-mix(in srgb, var(--line) 80%, transparent); }
.nav-shell {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  position: relative;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.brand-word {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .28em;
}
.brand-star { color: var(--brass); font-size: 13px; }
.brand small {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: var(--ink-faint);
  font: 600 7px/1 "IBM Plex Mono", monospace;
  letter-spacing: .38em;
  text-align: center;
}
.nav-menu { display: flex; align-items: center; gap: 3px; }
.nav-link,
.nav-github {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.nav-link:hover,
.nav-link.active { color: var(--ink); background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.nav-github {
  margin-left: 8px;
  padding-inline: 16px;
  color: var(--cream);
  background: var(--charcoal);
}
.nav-github:hover { transform: translateY(-1px); background: var(--merlot); }
.theme-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-left: 6px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.theme-button:hover { background: var(--surface); transform: rotate(12deg); }
.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}
.mobile-menu-button span { display: block; width: 100%; height: 1px; margin: 5px 0; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }

/* HERO */
.hero-section {
  position: relative;
  min-height: 760px;
  padding: 34px 48px 0;
  background:
    radial-gradient(circle at 76% 15%, color-mix(in srgb, var(--brass) 12%, transparent), transparent 27%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 35%, transparent), transparent 46%),
    var(--bg);
}
.hero-section::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink-soft);
  font: 600 10px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: .15em;
}
.hero-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.hero-title-wrap { position: relative; margin-top: 28px; }
.hero-super {
  position: relative;
  z-index: 0;
  color: var(--ink);
  font: 400 clamp(78px, 12.2vw, 176px)/.76 "Instrument Serif", Georgia, serif;
  letter-spacing: -.055em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(470px, 1.08fr);
  gap: 44px;
  align-items: end;
  margin-top: -4px;
}
.hero-copy { align-self: center; max-width: 600px; padding: 50px 0 62px 12px; }
.hero-label {
  margin: 0 0 18px;
  color: var(--brass);
  font: 600 11px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: .16em;
}
.hero-copy h1 {
  margin: 0;
  max-width: 600px;
  font: 400 clamp(52px, 6vw, 86px)/.92 "Instrument Serif", Georgia, serif;
  letter-spacing: -.035em;
}
.hero-copy h1 em { display: block; color: var(--merlot); font-weight: 400; }
html[data-theme="dark"] .hero-copy h1 em { color: var(--brass); }
.hero-lead {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button-dark { color: var(--cream); background: var(--charcoal); }
.button-dark:hover { background: var(--merlot); }
.button-link { color: var(--ink); background: transparent; border-color: var(--line-strong); }
.button-link:hover { background: var(--surface); }
.hero-signature {
  margin-top: 26px;
  color: color-mix(in srgb, var(--ink) 68%, transparent);
  font: italic 400 29px/1 "Instrument Serif", Georgia, serif;
}
.hero-showcase { position: relative; min-height: 470px; display: grid; place-items: end center; }
.hero-showcase-arch {
  position: relative;
  width: min(100%, 610px);
  min-height: 430px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-strong) 75%, transparent);
  border-radius: 180px 180px 28px 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.16), transparent 45%),
    var(--olive);
  box-shadow: var(--shadow-strong);
}
.hero-showcase-arch::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px);
  background-size: 34px 34px;
}
.hero-preview-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 14px;
  color: #f6eee0;
  font: 600 9px/1 "IBM Plex Mono", monospace;
  letter-spacing: .12em;
}
.hero-preview-screen {
  position: relative;
  z-index: 1;
  min-height: 318px;
  display: grid;
  grid-template-columns: 62px 1fr;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  background: #171715;
  box-shadow: 0 30px 60px rgba(17,15,12,.28);
}
.hero-preview-sidebar { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 18px 10px; border-right: 1px solid #2d2b26; background: #121210; }
.hero-preview-sidebar b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #1a1712; background: #d0b47b; font-size: 10px; }
.hero-preview-sidebar span { width: 18px; height: 4px; border-radius: 99px; background: #3c3932; }
.hero-preview-main { padding: 34px 34px 24px; color: #f5efe5; }
.preview-eyebrow { color: #b9a88d; font: 600 8px/1.2 "IBM Plex Mono", monospace; letter-spacing: .14em; }
.preview-heading { max-width: 360px; margin-top: 20px; font: 400 26px/1.05 "Instrument Serif", Georgia, serif; }
.preview-answer { height: 38px; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 0 14px; border: 1px solid #38352f; border-radius: 8px; color: #aaa297; font: 500 10px/1 "IBM Plex Mono", monospace; }
.preview-answer i { display: block; flex: 1; height: 3px; border-radius: 999px; background: #33302b; }
.preview-answer.active { color: #1b1813; border-color: #d0b47b; background: #d0b47b; }
.preview-answer.active i { background: rgba(27,24,19,.25); }
.preview-monitor { display: flex; justify-content: space-between; margin-top: 24px; color: #cab998; font: 500 8px/1 "IBM Plex Mono", monospace; }
.hero-float-card {
  position: absolute;
  right: -12px;
  bottom: 34px;
  z-index: 4;
  width: 188px;
  padding: 23px 22px;
  border-radius: 24px;
  color: #f8efe2;
  background: var(--merlot-deep);
  box-shadow: 0 24px 54px rgba(31,22,18,.25);
}
.hero-float-card span { display: block; color: #c8b8a2; font: 600 8px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; }
.hero-float-card strong { display: block; margin-top: 12px; font: 400 25px/1.05 "Instrument Serif", Georgia, serif; }
.hero-float-card i { position: absolute; top: 18px; right: 18px; color: #d6b87f; font-style: normal; }
.hero-stamp {
  position: absolute;
  left: -24px;
  bottom: 18px;
  z-index: 4;
  width: 106px;
  height: 106px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.hero-stamp span { position: absolute; inset: 10px; display: grid; place-items: center; font: 500 6px/1 "IBM Plex Mono", monospace; letter-spacing: .12em; text-align: center; }
.hero-stamp b { font: 400 30px/1 "Instrument Serif", Georgia, serif; }
.hero-ornament { position: absolute; color: var(--brass); opacity: .7; }
.hero-ornament-a { top: 146px; right: 52px; }
.hero-ornament-b { top: 210px; left: 35px; font-size: 10px; }
.hero-facts {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 -48px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
}
.hero-facts div { padding: 22px 32px; border-right: 1px solid var(--line); }
.hero-facts div:last-child { border-right: 0; }
.hero-facts strong { display: block; font: 400 20px/1.1 "Instrument Serif", Georgia, serif; }
.hero-facts span { display: block; margin-top: 5px; color: var(--ink-faint); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }

/* ABOUT */
.about-section { margin: 0; padding: 66px 48px; color: #f7efe2; background: var(--olive-deep); }
.about-grid { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(360px, 1.25fr) minmax(230px, .7fr); gap: 38px; align-items: center; }
.about-art { position: relative; min-height: 360px; }
.about-frame { position: relative; height: 320px; overflow: hidden; border: 1px solid rgba(255,255,255,.30); border-radius: 72px 18px 72px 18px; background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.02)); }
.about-frame::after { content: ""; position: absolute; inset: 24px; border: 1px solid rgba(255,255,255,.12); border-radius: 54px 12px 54px 12px; }
.about-monogram { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 400 118px/1 "Instrument Serif", Georgia, serif; color: rgba(250,240,221,.92); }
.about-code-line { position: absolute; left: 36px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.20); }
.line-1 { top: 60px; width: 62px; } .line-2 { top: 78px; width: 94px; } .line-3 { right: 35px; left: auto; bottom: 76px; width: 76px; } .line-4 { right: 35px; left: auto; bottom: 58px; width: 110px; } .line-5 { right: 35px; left: auto; bottom: 40px; width: 46px; }
.about-corner { position: absolute; left: 32px; bottom: 28px; font: 600 8px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; color: rgba(255,255,255,.55); }
.about-seal { position: absolute; left: -14px; bottom: 0; width: 98px; height: 98px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: var(--charcoal); color: #d4b983; font: 600 7px/1.5 "IBM Plex Mono", monospace; letter-spacing: .08em; text-align: center; }
.about-copy h2 { margin: 0; max-width: 650px; font: 400 clamp(42px, 4.8vw, 68px)/.95 "Instrument Serif", Georgia, serif; letter-spacing: -.025em; }
.about-copy h2 em { color: #e2c89a; font-weight: 400; }
.about-copy > p:not(.section-kicker) { max-width: 620px; margin: 20px 0 0; color: rgba(250,243,231,.75); font-size: 13px; line-height: 1.8; }
.about-points { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; margin-top: 24px; }
.about-points span { color: rgba(250,243,231,.92); font-size: 10px; font-weight: 600; }
.about-note { position: relative; min-height: 250px; padding: 30px 28px; overflow: hidden; border-radius: 70px 18px 70px 18px; color: var(--ink); background: #f4eee3; }
.about-note span { color: #887b68; font: 600 8px/1 "IBM Plex Mono", monospace; letter-spacing: .15em; }
.about-note p {     color: black; position: relative; z-index: 2; margin: 74px 0 0; font: 400 21px/1.25 "Instrument Serif", Georgia, serif; }
.note-flower { position: absolute; right: -8px; bottom: -28px; color: rgba(86,44,51,.14); font-size: 150px; transform: rotate(-22deg); }

/* PROJECTS */
.projects-section { padding: 72px 48px 78px; color: #f4ede2; background: var(--charcoal); }
.projects-heading { display: grid; grid-template-columns: 1.2fr .6fr; gap: 50px; align-items: end; padding-bottom: 28px; border-bottom: 1px solid #39362f; }
.projects-heading h2 { margin: 0; max-width: 780px; font: 400 clamp(46px, 5.6vw, 78px)/.94 "Instrument Serif", Georgia, serif; letter-spacing: -.03em; }
.projects-heading h2 em { color: #d1b781; font-weight: 400; }
.projects-heading > p { margin: 0; color: #aaa293; font-size: 12px; line-height: 1.75; }
.project-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 24px 0 32px; }
.project-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-button { min-height: 34px; padding: 0 12px; border: 1px solid #3d3a34; border-radius: 999px; color: #a9a193; background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.filter-button:hover, .filter-button.active { color: #1a1712; border-color: #d0b47b; background: #d0b47b; }
.project-search { min-width: 220px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid #48443c; color: #8c857a; }
.project-search input { width: 100%; height: 36px; border: 0; outline: 0; color: #eee6da; background: transparent; font-size: 10px; }
.project-search input::placeholder { color: #777167; }
.project-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.project-card {
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #35332e;
  border-radius: 18px;
  background: #1f1e1a;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: #635b4b; background: #24221e; }
.project-card.featured-primary { grid-column: span 8; }
.project-card.featured-secondary { grid-column: span 4; }
.project-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #34312c; color: #817b70; font: 600 8px/1.2 "IBM Plex Mono", monospace; letter-spacing: .10em; }
.project-kind { color: #c6b08b; }
.project-card-body { display: flex; flex-direction: column; min-height: 100%; }
.project-copy { padding: 20px 20px 8px; }
.project-copy h3 { margin: 0; color: #f6efe4; font: 400 35px/1 "Instrument Serif", Georgia, serif; letter-spacing: -.02em; }
.featured-primary .project-copy h3 { font-size: clamp(42px, 4vw, 62px); }
.project-subtitle { margin: 8px 0 0; color: #d2c6b4; font-size: 11px; font-weight: 600; }
.project-summary { max-width: 620px; margin: 12px 0 0; color: #928b80; font-size: 11px; line-height: 1.65; }

.project-quick-details {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: 0;
  margin-top: 17px;
  border-top: 1px solid #34312c;
  border-bottom: 1px solid #34312c;
}
.project-quick-details > div { min-width: 0; padding: 12px 14px 12px 0; }
.project-quick-details > div + div { padding-left: 14px; border-left: 1px solid #34312c; }
.project-quick-details span {
  display: block;
  margin-bottom: 5px;
  color: #777166;
  font: 600 7px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: .12em;
}
.project-quick-details strong {
  display: block;
  color: #d9cdbd;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.45;
}

.project-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.tech-pill { padding: 6px 8px; border: 1px solid #3b3832; border-radius: 999px; color: #b0a99e; font: 500 8px/1 "IBM Plex Mono", monospace; }
.project-preview { margin: 18px 18px 0; overflow: hidden; border-radius: 12px; background: #121210; }
.preview-window { min-height: 210px; position: relative; overflow: hidden; }
.featured-primary .preview-window { min-height: 340px; }
.preview-topbar { height: 34px; display: flex; align-items: center; gap: 5px; padding: 0 12px; border-bottom: 1px solid #2d2b27; background: #171612; }
.preview-topbar i { width: 6px; height: 6px; border-radius: 50%; background: #625d54; }
.preview-body { min-height: 176px; }
.featured-primary .preview-body { min-height: 306px; }
.preview-sentri .preview-body { display: grid; grid-template-columns: 1.55fr .65fr; }
.preview-question { padding: 24px; }
.preview-question small, .preview-monitor small { color: #948975; font: 600 7px/1.2 "IBM Plex Mono", monospace; letter-spacing: .1em; }
.preview-question strong { display: block; max-width: 440px; margin: 18px 0 15px; color: #f4ebdf; font: 400 26px/1.08 "Instrument Serif", Georgia, serif; }
.preview-option { height: 34px; display: flex; align-items: center; gap: 10px; margin-top: 7px; padding: 0 10px; border: 1px solid #322f29; border-radius: 7px; color: #817b70; font: 500 8px/1 "IBM Plex Mono", monospace; }
.preview-option.active { color: #1d1913; border-color: #d0b47b; background: #d0b47b; }
.preview-monitor { padding: 24px 18px; border-left: 1px solid #2f2c27; background: #171612; }
.preview-camera { height: 110px; display: grid; place-items: center; margin: 16px 0; border: 1px solid #302d28; border-radius: 10px; color: #6f695f; background: linear-gradient(135deg,#1c1a17,#11110f); font: 600 7px/1 "IBM Plex Mono", monospace; }
.preview-status { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: #aaa194; font-size: 8px; }
.preview-status i { width: 6px; height: 6px; border-radius: 50%; background: #72a687; }
.preview-pet .preview-body { display: grid; grid-template-columns: .65fr 1.35fr; padding: 24px; gap: 20px; background: linear-gradient(145deg,#4b352d,#171512 65%); }
.preview-pet-avatar { min-height: 150px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 54px 14px 54px 14px; color: #f2dbc6; font: 400 56px/1 "Instrument Serif", Georgia, serif; background: rgba(255,255,255,.06); }
.preview-pet-panel small { color: #a98e7f; font: 600 7px/1.2 "IBM Plex Mono", monospace; }
.preview-bar { margin-top: 14px; }
.preview-bar label { display: flex; justify-content: space-between; color: #b8ada0; font-size: 8px; }
.preview-bar > i { display: block; width: var(--bar); height: 4px; margin-top: 5px; border-radius: 99px; background: #c79c7c; }
.preview-admin .preview-body { display: grid; grid-template-columns: 58px 1fr; padding: 0; background: #161918; }
.preview-admin-nav { padding: 20px 12px; border-right: 1px solid #2b302d; background: #101211; }
.preview-admin-nav span { display: block; height: 5px; margin: 13px 0; border-radius: 99px; background: #38423c; }
.preview-admin-content { padding: 24px; }
.preview-admin-row { display: grid; grid-template-columns: 1fr .45fr .3fr; gap: 8px; margin-bottom: 10px; }
.preview-admin-row i { height: 20px; border-radius: 5px; background: #25302a; }
.preview-admin-row:nth-child(2) i { background: #2b342f; }
.preview-generic .preview-body { display: grid; place-items: center; min-height: 176px; background: radial-gradient(circle at 50% 45%, #4c4032 0, #1c1a17 45%, #11110f 100%); }
.preview-generic-mark { width: 96px; height: 96px; display: grid; place-items: center; border: 1px solid #6b5f4f; border-radius: 50%; color: #c8ad7c; }
.preview-generic-mark span { font: 400 38px/1 "Instrument Serif", Georgia, serif; }
.project-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-top: 1px solid #34312c; }
.project-link, .github-link { color: #e0d3c1; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.project-link span, .github-link span { color: #d0b47b; }
.github-link { color: #8e887e; }
.empty-projects { grid-column: 1 / -1; padding: 60px; border: 1px solid #34312c; border-radius: 16px; color: #989085; text-align: center; }

/* SKILLS */
.skills-section { padding: 78px 48px; background: var(--bg); }
.skills-header { display: grid; grid-template-columns: 1.2fr .7fr; gap: 50px; align-items: end; margin-bottom: 34px; }
.skills-header .section-kicker { grid-column: 1 / -1; margin-bottom: -22px; }
.skills-header h2 { margin: 0; max-width: 760px; font: 400 clamp(46px, 5.6vw, 78px)/.94 "Instrument Serif", Georgia, serif; letter-spacing: -.03em; }
.skills-header h2 em { color: var(--merlot); font-weight: 400; }
html[data-theme="dark"] .skills-header h2 em { color: var(--brass); }
.skills-header > p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.skills-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.skill-card { grid-column: span 2; min-height: 310px; padding: 25px 24px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 84%, transparent); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.skill-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.skill-card-featured { grid-column: span 4; background: var(--surface-2); }
.skill-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 26px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--merlot); font: 400 19px/1 "Instrument Serif", Georgia, serif; }
html[data-theme="dark"] .skill-icon { color: var(--brass); }
.skill-card > span { color: var(--ink-faint); font: 600 8px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; }
.skill-card h3 { margin: 10px 0 0; font: 400 34px/1 "Instrument Serif", Georgia, serif; }
.skill-card p { max-width: 390px; margin: 12px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.65; }
.skill-card ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0 0; padding: 0; list-style: none; }
.skill-card li { padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font: 500 8px/1 "IBM Plex Mono", monospace; }

/* JOURNEY */
.journey-section { padding: 74px 48px 82px; border-top: 1px solid var(--line); background: var(--surface); }
.journey-title { display: grid; grid-template-columns: 1.15fr .65fr; gap: 50px; align-items: end; }
.journey-title h2 { margin: 0; font: 400 clamp(46px, 5vw, 72px)/.95 "Instrument Serif", Georgia, serif; }
.journey-title h2 em { color: var(--merlot); font-weight: 400; }
html[data-theme="dark"] .journey-title h2 em { color: var(--brass); }
.journey-title > p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.journey-line { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; margin-top: 56px; }
.journey-line::before { content: ""; position: absolute; left: 6%; right: 6%; top: 25px; height: 1px; background: var(--line-strong); }
.journey-line article { position: relative; padding-top: 66px; }
.journey-number { position: absolute; top: 0; left: 0; z-index: 2; width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); background: var(--surface); font: 500 11px/1 "IBM Plex Mono", monospace; }
.journey-line article:nth-child(5) .journey-number { color: #fff; border-color: var(--merlot); background: var(--merlot); }
.journey-line article > span { color: var(--brass); font: 600 7px/1.2 "IBM Plex Mono", monospace; letter-spacing: .13em; }
.journey-line h3 { margin: 9px 0 0; font: 400 25px/1 "Instrument Serif", Georgia, serif; }
.journey-line p { margin: 10px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.6; }

/* CONTACT */
.contact-section { display: grid; grid-template-columns: .8fr 1.25fr .7fr; gap: 40px; align-items: center; min-height: 430px; padding: 58px 48px; overflow: hidden; color: #f8eee1; background: var(--merlot-deep); }
.contact-section::before { content: ""; position: absolute; inset: 0; opacity: .10; background-image: radial-gradient(circle at 70% 20%, #fff 0 1px, transparent 1.5px); background-size: 42px 42px; }
.contact-art { position: relative; min-height: 280px; display: grid; place-items: center; }
.contact-orbit { width: 250px; height: 250px; border: 1px solid rgba(240,220,190,.25); border-radius: 50%; box-shadow: inset 0 0 0 24px rgba(255,255,255,.025); }
.contact-orbit::before, .contact-orbit::after { content: ""; position: absolute; left: 50%; top: 50%; width: 190px; height: 1px; background: rgba(240,220,190,.18); transform-origin: center; }
.contact-orbit::before { transform: translate(-50%,-50%) rotate(38deg); }
.contact-orbit::after { transform: translate(-50%,-50%) rotate(-38deg); }
.contact-star { position: absolute; color: #d6ba84; font-size: 26px; }
.contact-ft { position: absolute; color: rgba(248,238,225,.94); font: 400 72px/1 "Instrument Serif", Georgia, serif; }
.contact-copy { position: relative; z-index: 2; }
.contact-copy h2 { margin: 0; max-width: 670px; font: 400 clamp(48px, 5.2vw, 76px)/.92 "Instrument Serif", Georgia, serif; letter-spacing: -.03em; }
.contact-copy h2 em { color: #d9bf8c; font-weight: 400; }
.contact-copy > p { max-width: 570px; margin: 20px 0 0; color: rgba(248,238,225,.72); font-size: 12px; line-height: 1.75; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button-cream { color: #251c19; background: #f7ead7; }
.button-cream:hover { background: #fff7ec; }
.button-outline-light { color: #f7ead7; border-color: rgba(247,234,215,.35); background: transparent; }
.button-outline-light:hover { border-color: #f7ead7; }
.contact-side { position: relative; z-index: 2; padding-left: 28px; border-left: 1px solid rgba(247,234,215,.22); }
.contact-side > span { color: #d9bf8c; font: 600 8px/1 "IBM Plex Mono", monospace; letter-spacing: .15em; }
.contact-side p { margin: 15px 0; color: rgba(247,234,215,.72); font-size: 10px; line-height: 1.65; }
.contact-side button { padding: 0; border: 0; color: #f7ead7; background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }

/* FOOTER */
.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 30px 48px; border-top: 1px solid #24221f; color: #c9c0b4; background: #141412; }
.footer-brand { display: grid; gap: 4px; }
.footer-brand strong { color: #f3eadf; font-size: 13px; letter-spacing: .22em; }
.footer-brand strong span { color: #c4a66f; margin: 0 4px; }
.footer-brand small { color: #69635b; font: 500 7px/1 "IBM Plex Mono", monospace; letter-spacing: .2em; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a, .footer-end { color: #827b72; font-size: 9px; }
.site-footer nav a:hover, .footer-end a:hover { color: #e6d9c7; }
.footer-end { display: grid; justify-items: end; gap: 5px; }
.footer-end a { color: #d4bd90; font-weight: 800; }

.back-to-top { position: fixed; right: 24px; bottom: 92px; z-index: 1800; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-soft); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; cursor: pointer; }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* REVEALS */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 1180px) {
  .site-frame { width: min(calc(100% - 24px), var(--max)); margin-top: 12px; }
  .site-header { padding-inline: 26px; }
  .hero-section, .about-section, .projects-section, .skills-section, .journey-section, .contact-section { padding-left: 36px; padding-right: 36px; }
  .hero-grid { grid-template-columns: minmax(0,.9fr) minmax(420px,1.1fr); gap: 28px; }
  .hero-super { font-size: clamp(76px, 11.7vw, 150px); }
  .about-grid { grid-template-columns: .8fr 1.2fr; }
  .about-note { grid-column: 1 / -1; min-height: auto; border-radius: 18px; }
  .about-note p { margin-top: 28px; }
  .project-card { grid-column: span 6; }
  .project-card.featured-primary { grid-column: 1 / -1; }
  .project-card.featured-secondary { grid-column: span 6; }
  .skills-grid { grid-template-columns: repeat(4, 1fr); }
  .skill-card, .skill-card-featured { grid-column: span 2; }
  .contact-section { grid-template-columns: .6fr 1.4fr; }
  .contact-side { grid-column: 1 / -1; padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(247,234,215,.2); }
}

@media (max-width: 900px) {
  .site-frame { width: calc(100% - 16px); margin: 8px auto 18px; border-radius: 24px; }
  .site-header { padding-inline: 22px; }
  .nav-shell { min-height: 68px; }
  .mobile-menu-button { display: block; }
  .nav-menu { position: absolute; top: 68px; left: 14px; right: 14px; display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-strong); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s ease; }
  .nav-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link, .nav-github { padding: 12px 14px; border-radius: 10px; }
  .nav-github { margin-left: 0; }
  .theme-button { width: 100%; border-radius: 10px; margin-left: 0; }
  .mobile-menu-button.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .mobile-menu-button.open span:nth-child(2) { opacity: 0; }
  .mobile-menu-button.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .hero-section { min-height: auto; padding-top: 28px; }
  .hero-super { font-size: clamp(68px, 15vw, 116px); }
  .hero-grid { grid-template-columns: 1fr; margin-top: 8px; }
  .hero-copy { padding: 20px 0 16px; }
  .hero-showcase { min-height: 430px; }
  .hero-showcase-arch { max-width: 650px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div:nth-child(2) { border-right: 0; }
  .hero-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .about-grid { grid-template-columns: 1fr 1.2fr; }
  .projects-heading, .skills-header, .journey-title { grid-template-columns: 1fr; gap: 18px; }
  .skills-header .section-kicker { grid-column: auto; margin-bottom: 0; }
  .project-controls { align-items: stretch; flex-direction: column; }
  .project-search { min-width: 0; width: 100%; }
  .journey-line { grid-template-columns: 1fr 1fr; }
  .journey-line::before { display: none; }
  .journey-line article { padding: 16px 0 0 66px; min-height: 118px; }
  .journey-number { top: 10px; }
  .contact-section { grid-template-columns: 1fr; }
  .contact-art { min-height: 180px; }
  .contact-orbit { width: 170px; height: 170px; }
  .contact-ft { font-size: 54px; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer nav { justify-content: center; flex-wrap: wrap; }
  .footer-brand, .footer-end { justify-items: center; }
}

@media (max-width: 640px) {
  .site-frame { width: 100%; margin: 0; border: 0; border-radius: 0; }
  .site-header { padding-inline: 18px; }
  .brand-word { font-size: 13px; letter-spacing: .2em; }
  .brand small { font-size: 6px; }
  .hero-section, .about-section, .projects-section, .skills-section, .journey-section, .contact-section { padding-left: 20px; padding-right: 20px; }
  .hero-section { padding-top: 24px; }
  .hero-kicker { font-size: 8px; }
  .hero-super { white-space: normal; font-size: clamp(62px, 22vw, 104px); line-height: .8; }
  .hero-copy h1 { font-size: clamp(48px, 14vw, 68px); }
  .hero-lead { font-size: 12px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .hero-showcase { min-height: 370px; }
  .hero-showcase-arch { min-height: 360px; padding: 14px; border-radius: 100px 100px 22px 22px; }
  .hero-preview-screen { min-height: 260px; grid-template-columns: 44px 1fr; }
  .hero-preview-sidebar { padding-inline: 6px; }
  .hero-preview-main { padding: 24px 18px 18px; }
  .preview-heading { font-size: 20px; }
  .hero-float-card { right: 4px; bottom: 12px; width: 150px; padding: 18px; }
  .hero-float-card strong { font-size: 20px; }
  .hero-stamp { left: 0; width: 82px; height: 82px; }
  .hero-facts { margin: 0 -20px; }
  .hero-facts div { padding: 17px 18px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-art { min-height: 280px; }
  .about-frame { height: 260px; }
  .about-monogram { font-size: 92px; }
  .about-points { grid-template-columns: 1fr; }
  .projects-heading h2, .skills-header h2, .journey-title h2, .contact-copy h2 { font-size: clamp(44px, 13vw, 62px); }
  .project-card, .project-card.featured-primary, .project-card.featured-secondary { grid-column: 1 / -1; }
  .project-copy h3, .featured-primary .project-copy h3 { font-size: 38px; }
  .preview-sentri .preview-body { grid-template-columns: 1fr; }
  .preview-monitor { display: none; }
  .featured-primary .preview-window { min-height: 260px; }
  .featured-primary .preview-body { min-height: 226px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card, .skill-card-featured { grid-column: 1; min-height: auto; }
  .journey-line { grid-template-columns: 1fr; gap: 8px; }
  .contact-section { padding-top: 44px; padding-bottom: 44px; }
  .site-footer { padding: 26px 20px; }
  .back-to-top { right: 14px; bottom: 80px; }
}

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


/* Project detail affordance */
.project-card-footer .project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #665d4d;
  border-radius: 999px;
  background: #2a2722;
  color: #f3e9da;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.project-card-footer .project-link:hover {
  transform: translateY(-1px);
  border-color: #b99b64;
  background: #332f28;
}
html[data-theme="light"] .hero-super { color: var(--ink); }

@media (max-width: 680px) {
  .project-quick-details { grid-template-columns: 1fr; }
  .project-quick-details > div { padding: 11px 0; }
  .project-quick-details > div + div { padding-left: 0; border-left: 0; border-top: 1px solid #34312c; }
}

/* ==========================================================
   FINAL POLISH / ACCESSIBILITY / PROJECT ARCHIVE
========================================================== */

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

.skip-link {
  position: fixed;
  left: 18px;
  top: 14px;
  z-index: 6000;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--cream);
  background: var(--charcoal);
  font-size: 10px;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

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

/* Stronger hierarchy for the three most complete projects. */
.project-card.featured-primary { grid-column: 1 / -1; }
.project-card.featured-secondary { grid-column: span 6; }

.preview-topbar { position: relative; }
.preview-topbar > span {
  margin-left: auto;
  color: #746d62;
  font: 600 6.5px/1 "IBM Plex Mono", monospace;
  letter-spacing: .10em;
}

.preview-option > span {
  display: block;
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: #34312b;
}
.preview-option.active > span { background: rgba(29,25,19,.22); }

.preview-bar > i {
  width: 100%;
  opacity: .82;
  background: linear-gradient(90deg, #c79c7c 0 66%, rgba(199,156,124,.16) 66% 100%);
}
.preview-bar:nth-of-type(3) > i { background: linear-gradient(90deg, #c79c7c 0 78%, rgba(199,156,124,.16) 78% 100%); }
.preview-bar:nth-of-type(4) > i { background: linear-gradient(90deg, #c79c7c 0 58%, rgba(199,156,124,.16) 58% 100%); }
.preview-bar:nth-of-type(5) > i { background: linear-gradient(90deg, #c79c7c 0 46%, rgba(199,156,124,.16) 46% 100%); }

.preview-admin-nav {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.preview-admin-nav strong {
  color: #d0b47b;
  font: 600 10px/1 "IBM Plex Mono", monospace;
  letter-spacing: .08em;
}
.preview-admin-nav span {
  height: auto;
  margin: 0;
  color: #7f8a82;
  background: none;
  font: 500 7px/1.2 "IBM Plex Mono", monospace;
}
.preview-admin-row {
  align-items: center;
  grid-template-columns: 1.2fr .45fr .3fr;
  min-height: 34px;
  padding-bottom: 8px;
  border-bottom: 1px solid #242a26;
}
.preview-admin-row strong {
  color: #8f9a92;
  font: 500 7px/1.3 "IBM Plex Mono", monospace;
}

.preview-generic .preview-body {
  grid-template-columns: auto 1fr;
  gap: 22px;
  padding: 28px;
}
.preview-generic-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.preview-generic-copy strong {
  color: #efe5d7;
  font: 400 23px/1.05 "Instrument Serif", Georgia, serif;
}
.preview-generic-copy span {
  color: #8e8578;
  font: 500 7px/1.5 "IBM Plex Mono", monospace;
  letter-spacing: .06em;
}

/* Compact archive keeps all project history visible without 14 giant cards. */
.project-archive {
  margin-top: 54px;
  border-top: 1px solid #3a3731;
}
.project-archive[hidden] { display: none; }
.archive-heading {
  display: grid;
  grid-template-columns: 1fr .58fr;
  gap: 42px;
  align-items: end;
  padding: 38px 0 24px;
}
.archive-heading span {
  display: block;
  margin-bottom: 9px;
  color: #c7a86d;
  font: 600 8px/1 "IBM Plex Mono", monospace;
  letter-spacing: .14em;
}
.archive-heading h3 {
  margin: 0;
  color: #f4ede2;
  font: 400 clamp(34px, 4vw, 54px)/.98 "Instrument Serif", Georgia, serif;
}
.archive-heading p {
  margin: 0;
  color: #969084;
  font-size: 10px;
  line-height: 1.75;
}
.archive-list { border-top: 1px solid #37342f; }
.archive-row {
  display: grid;
  grid-template-columns: 42px minmax(190px, 1.35fr) minmax(120px, .75fr) minmax(160px, 1fr) 56px auto;
  gap: 16px;
  align-items: center;
  min-height: 78px;
  padding: 13px 0;
  border-bottom: 1px solid #34312c;
  transition: background .18s ease, padding .18s ease;
}
.archive-row:hover {
  padding-inline: 12px;
  background: #1d1c18;
}
.archive-index,
.archive-type,
.archive-stack,
.archive-year {
  color: #827c72;
  font: 500 7.5px/1.45 "IBM Plex Mono", monospace;
  letter-spacing: .04em;
}
.archive-index { color: #c1a46f; }
.archive-project { min-width: 0; }
.archive-project > a {
  display: block;
  color: #f0e8dc;
  font: 400 23px/1.05 "Instrument Serif", Georgia, serif;
}
.archive-project > span {
  display: block;
  margin-top: 5px;
  color: #817b71;
  font-size: 8px;
}
.archive-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
}
.archive-actions a {
  color: #d5bd8d;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.archive-actions a:hover { color: #f2e8d8; }

@media (max-width: 980px) {
  .archive-row {
    grid-template-columns: 34px minmax(180px, 1.3fr) minmax(140px, 1fr) 52px auto;
  }
  .archive-type { display: none; }
}

@media (max-width: 720px) {
  .archive-heading { grid-template-columns: 1fr; gap: 12px; }
  .archive-row {
    grid-template-columns: 32px 1fr auto;
    gap: 10px 12px;
    padding: 16px 0;
  }
  .archive-row:hover { padding-inline: 0; background: transparent; }
  .archive-project { grid-column: 2; }
  .archive-year { grid-column: 3; grid-row: 1; align-self: start; padding-top: 4px; }
  .archive-stack { grid-column: 2 / -1; }
  .archive-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 640px) {
  .project-card.featured-secondary { grid-column: 1 / -1; }
  .preview-generic .preview-body { grid-template-columns: 1fr; place-items: center; text-align: center; }
  .preview-topbar > span { display: none; }
}
