/* ==========================================================================
   Portfolio v2 — terminal theme
   Dark CRT shell with phosphor-green accents + boot / reveal animations.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #090d0b;
  --bg-2: #0c120e;
  --surface: #101712;
  --surface-2: #141d17;
  --ink: #d9e8df;
  --ink-soft: #a3bcae;
  --muted: #6b8578;
  --line: #1c2a22;
  --line-strong: #294036;
  --accent: #00e08a;
  --accent-strong: #4dffbe;
  --accent-dim: #059669;
  --accent-soft: rgba(0, 224, 138, 0.12);
  --accent-glow: rgba(0, 224, 138, 0.35);
  --on-accent: #04170e;
  --red: #ff5f57;
  --amber: #febc2e;
  --green: #28c840;
  --radius: 14px;
  --radius-sm: 10px;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
  --container: 1100px;
  --container-narrow: 780px;
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 82% -10%, rgba(0, 224, 138, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(0, 224, 138, 0.05), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* CRT overlay: scanlines + vignette + moving sweep */
.crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
  opacity: 0.32;
  mix-blend-mode: multiply;
}
.crt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 32%, transparent 58%, rgba(0, 0, 0, 0.5) 100%);
}
.crt::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(0, 224, 138, 0.05), transparent);
  animation: crt-sweep 7s linear infinite;
}
@keyframes crt-sweep {
  0% { transform: translateY(0); }
  100% { transform: translateY(440%); }
}

::selection { background: rgba(0, 224, 138, 0.3); color: #eafff5; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #22352a; border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2f4c3c; }

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

a { color: var(--accent); text-decoration: none; transition: color 0.16s ease; }
a:hover { color: var(--accent-strong); }

h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.14;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

p { margin: 0 0 1.1em; }

.icon { width: 20px; height: 20px; display: block; flex: none; }

/* Shared: blinking block cursor + prompt */
.cursor-block {
  display: inline-block;
  width: 0.55em;
  height: 1.02em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: blink 1.06s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.prompt { color: var(--accent); font-weight: 700; }
.sub-hash { color: var(--muted); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(20px, 4vw, 36px); }
.container.narrow { max-width: var(--container-narrow); }

main { display: block; }

/* ---------- 3. Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, #12f39d, #00c97c);
  color: var(--on-accent);
  box-shadow: 0 10px 30px -12px var(--accent-glow);
}
.btn-primary:hover { color: var(--on-accent); transform: translateY(-2px); box-shadow: 0 16px 38px -12px var(--accent-glow); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 0 22px -8px var(--accent-glow); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.text-link::before { content: '> '; color: var(--accent); }
.text-link:hover { color: var(--accent-strong); }
.text-link .icon { width: 15px; height: 15px; }

/* ---------- 4. Header / term bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(9, 13, 11, 0.82);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}

.term-lights { display: flex; gap: 8px; flex: none; }
.term-lights i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.term-lights i:nth-child(1) { background: var(--red); }
.term-lights i:nth-child(2) { background: var(--amber); }
.term-lights i:nth-child(3) { background: var(--green); }

.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-user { color: var(--accent); }
.brand-dot { color: var(--muted); }
.brand-path { color: var(--ink-soft); }

.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-link {
  position: relative;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav-prompt { color: var(--muted); }
.nav-link:hover { color: var(--ink); background: rgba(0, 224, 138, 0.08); }
.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 224, 138, 0.28);
}
.nav-link.active .nav-prompt { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- 5. Sections (shared) ---------- */
.section { padding: clamp(52px, 8vw, 96px) 0; }

.section-head { margin-bottom: clamp(28px, 4vw, 46px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}
.eyebrow-cmd { color: var(--ink-soft); }
.section-title, .page-title {
  font-size: clamp(28px, 4.6vw, 42px);
}
.section-title { margin-bottom: 10px; text-shadow: 0 0 26px rgba(0, 224, 138, 0.16); }
.section-sub, .page-sub { color: var(--ink-soft); max-width: 62ch; margin: 12px 0 0; font-size: 15px; }
.page-title { margin-bottom: 12px; }

.section-foot {
  margin-top: clamp(26px, 4vw, 40px);
  display: flex;
  justify-content: center;
}
.section.narrow .section-foot { justify-content: flex-start; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 72px) 0 clamp(44px, 6vw, 72px);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(30px, 5vw, 64px);
}

.hero-eyebrow { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.hero-name {
  font-size: clamp(46px, 8vw, 82px);
  letter-spacing: -0.02em;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(0, 224, 138, 0.4), 0 0 46px rgba(0, 224, 138, 0.22);
  margin: 0 0 8px;
}
.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(17px, 2.6vw, 23px);
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.hero-service { font-size: 15.5px; color: var(--ink-soft); max-width: 40ch; margin: 0 0 26px; }
.hero-service em {
  font-style: normal;
  color: var(--ink);
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 224, 138, 0.3);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

/* Portrait framed as a terminal window */
.hero-portrait {
  position: relative;
  justify-self: center;
  width: min(320px, 78vw);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 24px 60px -26px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(0, 224, 138, 0.12),
    0 0 70px -30px var(--accent-glow);
  animation: portrait-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.hero-portrait img { width: 100%; height: auto; }
@keyframes portrait-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Shared terminal window title bar (cards + CSS-only frames) */
.window-bar,
.hero-portrait::before,
.about-photo::before,
.detail-hero::before {
  display: block;
  padding: 8px 14px 8px 60px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
  background:
    radial-gradient(circle at 16px 50%, var(--red) 0 5px, transparent 5.5px),
    radial-gradient(circle at 32px 50%, var(--amber) 0 5px, transparent 5.5px),
    radial-gradient(circle at 48px 50%, var(--green) 0 5px, transparent 5.5px),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-portrait::before { content: 'me-avatar.png'; }
.about-photo::before { content: 'me-in-the-park.jpg'; }
.detail-hero::before { content: attr(data-file); }

/* Interactive shell in the hero */
.hero-term {
  max-width: 560px;
  background: rgba(5, 9, 7, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 14px;
}
.hero-term__log {
  max-height: 250px;
  overflow-y: auto;
  padding: 14px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line--cmd { color: var(--ink); }
.term-line--out { color: var(--ink-soft); }
.term-line--muted { color: var(--muted); }
.term-line--accent { color: var(--accent); }
.term-line a { color: var(--accent); border-bottom: 1px dotted rgba(0, 224, 138, 0.5); }
.term-line a:hover { color: var(--accent-strong); }
.term-prompt, .term-path { color: var(--accent); font-weight: 700; }
.term-key { color: var(--accent); font-weight: 600; }
.term-desc { color: var(--muted); }
.term-idx { color: var(--muted); margin-right: 6px; }
.hero-term__line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
}
.hero-term__path { color: var(--accent); font-weight: 700; }
.hero-term__input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  caret-color: var(--accent);
}
.hero-term__input::placeholder { color: var(--muted); }

/* ---------- 7. Works grid / cards ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(18px, 2.6vw, 26px);
}

.work-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
a.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 224, 138, 0.5);
  box-shadow:
    0 18px 44px -24px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 224, 138, 0.25),
    0 0 40px -18px var(--accent-glow);
  color: inherit;
}

.work-thumb {
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 224, 138, 0.06), transparent 60%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.work-thumb img {
  max-width: 86%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}
a.work-card:hover .work-thumb img { transform: scale(1.03); }

.work-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 22px 22px;
  flex: 1;
}
.work-client { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 0 0 8px; }
.work-card-title { font-size: 19px; margin-bottom: 8px; }
.work-card-summary { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 14px; flex: 1; }
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent);
}
.card-cta::before { content: '$ '; color: var(--muted); }
.card-cta .icon { width: 14px; height: 14px; transition: transform 0.2s ease; }
a.work-card:hover .card-cta .icon { transform: translateX(4px); }

/* Placeholder cards */
.work-card--placeholder { border-style: dashed; background: transparent; }
.work-thumb--placeholder {
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 224, 138, 0.04) 10px, rgba(0, 224, 138, 0.04) 20px);
  border-bottom: 1px dashed var(--line-strong);
}
.placeholder-spark { font-size: 38px; color: var(--accent); opacity: 0.55; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.work-client--soon { color: var(--accent); text-transform: uppercase; letter-spacing: 0.2em; }

/* ---------- 8. Teaser ---------- */
.about-teaser { background: rgba(0, 224, 138, 0.03); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.teaser-text {
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.8vw, 24px);
  line-height: 1.5;
  margin: 0 0 6px;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
  text-shadow: 0 0 18px rgba(0, 224, 138, 0.12);
}

/* ---------- 9. Contact ---------- */
.contact-section { background: rgba(0, 224, 138, 0.03); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-list { display: grid; gap: 12px; margin-top: 8px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.contact-item:hover {
  transform: translateX(6px);
  border-color: rgba(0, 224, 138, 0.5);
  color: var(--ink);
  box-shadow: 0 0 30px -14px var(--accent-glow);
}
.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(0, 224, 138, 0.25);
}
.contact-icon .icon { width: 20px; height: 20px; }
.contact-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.contact-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.contact-value { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; color: var(--ink); }

/* ---------- 10. About page ---------- */
.about-page { padding-top: 0; }
.about-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.about-photo {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px -26px rgba(0, 0, 0, 0.8), 0 0 50px -26px var(--accent-glow);
}
.about-photo img { width: 100%; height: auto; }
.about-copy { font-size: 15.5px; }
.about-copy .lead {
  font-family: var(--font-mono);
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.5;
  color: var(--ink);
}
.about-copy p { color: var(--ink-soft); margin-bottom: 1.1em; }
.inline-cta { margin: 4px 0 26px !important; }

/* ---------- 11. Page hero (sub pages) ---------- */
.page-hero { padding-bottom: clamp(20px, 3vw, 36px); }
.works-page { padding-top: 0; }
.contact-page { padding-top: 0; }

/* ---------- 12. Work detail ---------- */
.detail-wrap { max-width: 880px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: clamp(18px, 3vw, 30px);
}
.back-link:hover { color: var(--accent-strong); }
.back-link .icon { width: 15px; height: 15px; transform: rotate(180deg); }

.detail-hero {
  margin: 0 0 clamp(24px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 46px -26px rgba(0, 0, 0, 0.8), 0 0 60px -30px var(--accent-glow);
}
.detail-hero img { width: 100%; height: auto; }

.detail-header { margin-bottom: clamp(24px, 4vw, 42px); }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.detail-title { font-size: clamp(26px, 4.4vw, 40px); margin-bottom: 8px; text-shadow: 0 0 24px rgba(0, 224, 138, 0.16); }
.check-it-out {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.check-it-out:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  box-shadow: 0 0 22px -10px var(--accent-glow);
  transform: translateY(-1px);
}
.check-it-out .icon { width: 14px; height: 14px; }
.detail-role { color: var(--muted); font-size: 13.5px; margin: 0 0 4px; }
.detail-summary {
  font-family: var(--font-mono);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 18px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 224, 138, 0.25);
}

.detail-body {
  display: grid;
  gap: clamp(24px, 4vw, 36px);
  border-top: 1px solid var(--line);
  padding-top: clamp(24px, 4vw, 40px);
}
.detail-section h2 { font-size: 21px; margin-bottom: 12px; }
.detail-section h2::before { content: '## '; color: var(--accent); }
.prose { color: var(--ink-soft); margin: 0; }
.prose + .feature-list { margin-top: 8px; }

.feature-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature-list li { position: relative; padding-left: 26px; color: var(--ink-soft); }
.feature-list li::before {
  content: '▸';
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}
.feature-list li b,
.feature-list li strong { color: var(--ink); font-weight: 700; }
.detail-foot { justify-content: flex-start; }

/* ---------- 13. 404 ---------- */
.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound .container { text-align: left; }

/* ---------- 14. Footer ---------- */
.site-footer { background: var(--bg-2); color: var(--ink-soft); border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 22px;
}
.footer-copy { margin: 0; font-size: 13.5px; color: var(--muted); }
.footer-exit { color: var(--accent); }
.footer-social { display: flex; gap: 8px; }
.social-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 6px;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.social-link:hover {
  background: var(--accent-soft);
  border-color: rgba(0, 224, 138, 0.5);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 0 22px -10px var(--accent-glow);
}
.social-link .icon { width: 16px; height: 16px; }
.social-label { font-weight: 600; }

/* ---------- 15. Boot / reveal states ---------- */
/* Content is authored in HTML; JS retypes it for the CRT boot effect. */
html.js .boot-target { opacity: 0; }
html.js .boot-target.is-active { opacity: 1; transition: opacity 0.1s linear; }

html.js .hero-actions,
html.js .hero-term,
html.js .page-sub { opacity: 0; }
html.js body.is-ready .hero-actions,
html.js body.is-ready .hero-term,
html.js body.is-ready .page-sub { opacity: 1; transition: opacity 0.5s ease; }

html:not(.js) .hero-term { display: none; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- 16. Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; width: min(240px, 58vw); }
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 420px; }
  .works-grid--all { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 15px; }

  .term-lights { display: none; }
  .brand { font-size: 14px; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 16px;
    background: rgba(9, 13, 11, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: 12px 10px; }

  .works-grid { grid-template-columns: 1fr; }
  .detail-body { gap: 26px; }
  .detail-title-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .section-foot { justify-content: center; }
}

/* ---------- 17. Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .crt { display: none; }
  html.js .boot-target { opacity: 1; }
  html.js .hero-actions,
  html.js .hero-term,
  html.js .page-sub { opacity: 1; }
}
