/* =========================================================
   Domenic Bosin — portfolio site
   Design language: "developer console" — terminal hero, bento
   grids, monospace accents. No external dependencies.

   Palette: anchored on the teal (#1B6B6B) already used as the
   brand color on the live site, with a warm gold as a sparing
   secondary accent instead of a fully warm scheme.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1160px;
  --nav-height: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition: 160ms ease;

  --shadow-sm: 0 1px 2px rgba(10, 24, 22, .07), 0 1px 1px rgba(10, 24, 22, .05);
  --shadow-md: 0 16px 36px rgba(10, 24, 22, .14);

  /* Light theme (default) — teal brand accent on clean neutrals */
  --c-bg: #f6f9f8;
  --c-bg-alt: #edf3f1;
  --c-surface: #ffffff;
  --c-surface-2: #edf3f1;
  --c-border: #dbe6e3;
  --c-text: #10201d;
  --c-text-muted: #57655f;
  --c-accent: #1b6b6b;
  --c-accent-strong: #124f4f;
  --c-on-accent: #ffffff;
  --c-accent-2: #b3801f;
  --c-status: #2f9e5c;
  --c-tag-bg: #e2f0ee;
  --c-tag-text: #145252;
  --c-hero-bg: #0b1615;
  --c-hero-text: #eef7f5;
  --c-focus-ring: #1b6b6b;
  --c-term-bg: #081312;
  --c-term-border: #1d302d;
  --c-term-text: #dfeeea;
  --c-term-prompt: #4bd4a8;
  --c-term-cmd: #e8b563;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --c-bg: #0b1615;
  --c-bg-alt: #0f1e1c;
  --c-surface: #132523;
  --c-surface-2: #182e2b;
  --c-border: #22403b;
  --c-text: #eaf5f2;
  --c-text-muted: #9db3ae;
  --c-accent: #4fd8b0;
  --c-accent-strong: #7fe8c8;
  --c-on-accent: #06201c;
  --c-accent-2: #e0a851;
  --c-status: #4bd48e;
  --c-tag-bg: #163430;
  --c-tag-text: #7fe0c4;
  --c-hero-bg: #070f0e;
  --c-hero-text: #eaf5f2;
  --c-focus-ring: #4fd8b0;
  --c-term-bg: #060e0d;
  --c-term-border: #1b2f2c;
  --c-term-text: #dfeeea;
  --c-term-prompt: #5be0b3;
  --c-term-cmd: #f0c477;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #0b1615;
    --c-bg-alt: #0f1e1c;
    --c-surface: #132523;
    --c-surface-2: #182e2b;
    --c-border: #22403b;
    --c-text: #eaf5f2;
    --c-text-muted: #9db3ae;
    --c-accent: #4fd8b0;
    --c-accent-strong: #7fe8c8;
    --c-on-accent: #06201c;
    --c-accent-2: #e0a851;
    --c-status: #4bd48e;
    --c-tag-bg: #163430;
    --c-tag-text: #7fe0c4;
    --c-hero-bg: #070f0e;
    --c-hero-text: #eaf5f2;
    --c-focus-ring: #4fd8b0;
    --c-term-bg: #060e0d;
    --c-term-border: #1b2f2c;
    --c-term-text: #dfeeea;
    --c-term-prompt: #5be0b3;
    --c-term-cmd: #f0c477;
    color-scheme: dark;
  }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
li { list-style: none; }
button { font-family: inherit; }
code, .mono { font-family: var(--font-mono); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-accent);
  color: var(--c-on-accent);
  padding: .75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.15em;
}
.icon-filled { fill: currentColor; stroke: none; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.section { padding: 5.5rem 0; }
.section-alt { background: var(--c-bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: .6rem;
}
.eyebrow::before { content: "// "; opacity: .6; }
.section-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); }
.section-head p { color: var(--c-text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn-primary:hover { background: var(--c-accent-strong); color: var(--c-on-accent); }
.btn-ghost { background: var(--c-surface-2); color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-border); color: var(--c-text); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.75rem; }

/* ---------- Header / Nav ---------- */
#mainNav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--nav-height);
  z-index: 100;
  background: color-mix(in srgb, var(--c-bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.nav-inner {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
  min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark { display: block; flex-shrink: 0; }
.mark-bracket { stroke: var(--c-accent); }
.mark-bar-accent { fill: var(--c-accent-2); }
.mark-bar-primary { fill: var(--c-accent); }
.mark-bar-strong { fill: var(--c-accent-strong); }
.brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-role { color: var(--c-text-muted); font-weight: 500; font-size: .78rem; font-family: var(--font-mono); white-space: nowrap; }

@media (max-width: 560px) {
  /* The role subtitle wraps to multiple lines at phone widths (not
     enough room next to the lang switch / theme / menu buttons),
     which used to blow up the fixed-height sticky nav. Drop it. */
  .brand-role-wrap { display: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  color: var(--c-text);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
  padding: .35rem 0;
}
.nav-links a:hover { text-decoration: none; color: var(--c-accent); }
.nav-links a.active { color: var(--c-accent); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 2px;
}

.nav-controls { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.icon-btn:hover { background: var(--c-surface-2); }
.icon-btn .icon { width: 1.1rem; height: 1.1rem; }

.lang-switch { display: flex; border: 1px solid var(--c-border); border-radius: 999px; overflow: hidden; font-family: var(--font-mono); }
.lang-switch a {
  padding: .4rem .7rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--c-text-muted);
}
.lang-switch a:hover { text-decoration: none; background: var(--c-surface-2); }
.lang-switch a[aria-current="page"] { background: var(--c-accent); color: var(--c-on-accent); }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: inline; }
}

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text);
  }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--nav-height) + 3.5rem) 0 4.5rem;
  background: var(--c-hero-bg);
  color: var(--c-hero-text);
  background-image:
    radial-gradient(700px 360px at 8% -10%, color-mix(in srgb, var(--c-accent) 22%, transparent), transparent),
    radial-gradient(600px 320px at 100% 0%, color-mix(in srgb, var(--c-accent-2) 16%, transparent), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--c-accent) 55%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-hero-text) 8%, transparent);
  margin-bottom: 1.25rem;
}
.hero .eyebrow { color: var(--c-accent-2); }
.hero h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); margin-bottom: .4rem; }
.hero-subheading {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--c-accent-2);
  margin: 0 0 1.1rem;
}
.hero-lead { color: color-mix(in srgb, var(--c-hero-text) 78%, transparent); font-size: 1.05rem; max-width: 46ch; }
.hero .btn-ghost { background: color-mix(in srgb, var(--c-hero-text) 10%, transparent); color: var(--c-hero-text); border-color: color-mix(in srgb, var(--c-hero-text) 25%, transparent); }
.hero .btn-ghost:hover { background: color-mix(in srgb, var(--c-hero-text) 18%, transparent); }
.availability {
  display: flex; align-items: center; gap: .6rem;
  color: color-mix(in srgb, var(--c-hero-text) 75%, transparent);
  font-size: .85rem;
  margin: 0 0 1.5rem;
}
.status-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: var(--c-status);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-status) 20%, transparent);
}
.hero-social { display: flex; gap: .75rem; }
.hero-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--c-hero-text) 25%, transparent);
  color: var(--c-hero-text);
}
.hero-social a:hover { background: color-mix(in srgb, var(--c-hero-text) 12%, transparent); text-decoration: none; }
.hero-social .icon { width: 1.15rem; height: 1.15rem; }

/* ---------- Terminal window ---------- */
.terminal {
  background: var(--c-term-bg);
  border: 1px solid var(--c-term-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: .92rem;
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem .9rem;
  background: color-mix(in srgb, var(--c-term-border) 60%, transparent);
  border-bottom: 1px solid var(--c-term-border);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.terminal-dot-red { background: #ff5f57; }
.terminal-dot-yellow { background: #febc2e; }
.terminal-dot-green { background: #28c840; }
.terminal-title { margin-left: .5rem; color: var(--c-text-muted); font-size: .78rem; }
.terminal-body { padding: 1.25rem 1.1rem; color: var(--c-term-text); }
.terminal-line { margin: 0 0 .85rem; display: flex; flex-wrap: wrap; gap: .5rem; opacity: 0; animation: term-in .45s ease forwards; }
.terminal-line:last-child { margin-bottom: 0; }
.terminal-line:nth-child(1) { animation-delay: .1s; }
.terminal-line:nth-child(2) { animation-delay: .45s; }
.terminal-line:nth-child(3) { animation-delay: .8s; }
.terminal-line:nth-child(4) { animation-delay: 1.15s; }
.terminal-line:nth-child(5) { animation-delay: 1.5s; }
.terminal-line:nth-child(n+6) { animation-delay: 1.8s; }
.terminal-prompt { color: var(--c-term-prompt); font-weight: 700; }
.terminal-cmd { color: var(--c-term-cmd); }
.terminal-output { color: var(--c-term-text); opacity: .92; }
.terminal-line-cursor { opacity: .8; }
@keyframes term-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.cursor {
  display: inline-block;
  width: .55em; height: 1.1em;
  background: var(--c-term-prompt);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Bento grid (Focus + Skills) ---------- */
/* Fixed column counts (not auto-fit) so a full grid of cards always
   lands in even, symmetric rows instead of leaving an odd card dangling. */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 620px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .bento-grid { grid-template-columns: repeat(3, 1fr); }
}
.bento-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition);
}
.bento-card:hover { border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-border)); transform: translateY(-2px); }
.bento-icon {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--c-tag-bg);
  color: var(--c-tag-text);
  margin-bottom: 1rem;
}
.bento-icon .icon { width: 1.35rem; height: 1.35rem; }
.bento-card h3 { font-size: 1.05rem; }
.bento-card p { color: var(--c-text-muted); font-size: .95rem; margin-bottom: 0; }
.skill-group + .skill-group { margin-top: 1rem; }
.skill-group strong { display: block; margin-bottom: .35rem; font-size: .85rem; }

.about-strip {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--c-border);
  text-align: center;
}
.about-strip p { max-width: 620px; margin: 0 auto 1.75rem; color: var(--c-text-muted); }
.brand-statement {
  max-width: 640px;
  margin: -.5rem auto 2rem;
  padding: 1.15rem 1.4rem;
  background: var(--c-tag-bg);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-sm);
  text-align: left;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-text);
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  max-width: 720px;
  margin: 0 auto;
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.fact { background: var(--c-surface); padding: 1.25rem 1rem; text-align: center; }
.fact strong { display: block; font-size: 1.4rem; letter-spacing: -.02em; }
.fact span { display: block; margin-top: .3rem; font-size: .8rem; color: var(--c-text-muted); }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 13px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--c-border);
}
.timeline-item { position: relative; padding-left: 3rem; margin-bottom: 2.75rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: 0; top: 2px;
  width: 27px; height: 27px;
  border-radius: 8px;
  background: var(--c-tag-bg);
  color: var(--c-tag-text);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border);
}
.timeline-date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-accent);
  margin-bottom: .35rem;
}
.timeline-item h3 { font-size: 1.15rem; margin-bottom: .15rem; }
.timeline-org { color: var(--c-text-muted); font-weight: 600; display: block; margin-bottom: .75rem; }
.timeline-org a { color: inherit; }
.timeline-subtitle {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-accent);
  margin: -.4rem 0 .9rem;
}
.timeline-item-current .timeline-marker {
  background: var(--c-accent);
  color: var(--c-on-accent);
  border-color: var(--c-accent);
}
.timeline-item-current h3 { font-size: 1.25rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 1rem; }
.tag {
  background: var(--c-tag-bg);
  color: var(--c-tag-text);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 600;
  padding: .3rem .65rem;
  border-radius: 6px;
}
.tag-muted { background: var(--c-surface-2); color: var(--c-text-muted); font-weight: 500; }

/* ---------- Skills: previously used ---------- */
.skills-previous {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--c-border);
}
.skills-previous-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-text-muted);
  margin-bottom: .75rem;
}

/* ---------- Stack flow diagram (Architecture / Evolution) ---------- */
.stack-flow { position: relative; max-width: 420px; margin: 2.25rem auto 0; }
.stack-flow-item {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .92rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.stack-flow-item:last-child { margin-bottom: 0; }
.stack-flow-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -2rem;
  transform: translateX(-50%);
  width: 2px; height: 2rem;
  background: var(--c-border);
}
.stack-flow-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 50%; bottom: -1.15rem;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--c-border);
  z-index: 1;
}
.stack-flow-compact .stack-flow-item { font-size: .85rem; padding: .7rem 1rem; }

.bullet-list { margin: .75rem 0 1rem; }
.bullet-list li { position: relative; padding-left: 1.15rem; margin-bottom: .4rem; color: var(--c-text-muted); }
.bullet-list li::before { content: "\2192"; position: absolute; left: 0; color: var(--c-accent); font-weight: 700; }

.link-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }
.link-list a {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .88rem; font-weight: 600;
  padding: .55rem .95rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-text);
}
.link-list a:hover { background: var(--c-surface-2); border-color: var(--c-accent); color: var(--c-accent); text-decoration: none; }

/* ---------- Language grid ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; text-align: center; }
.lang-grid .card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.lang-grid .card p { margin: 0; color: var(--c-text-muted); }

/* ---------- Projects (native details/summary) ---------- */
.project {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.75rem;
}
.project:last-child { margin-bottom: 0; }
.project-head { text-align: center; max-width: 620px; margin: 0 auto 1.5rem; }
.project-head h3 { font-size: 1.3rem; margin-bottom: .1rem; }
.project-head .role { color: var(--c-accent); font-weight: 600; font-family: var(--font-mono); font-size: .85rem; display: block; margin-bottom: .75rem; }
.project-head .tag-list.project-category { justify-content: center; margin: 0 0 1rem; }
.project-head p { color: var(--c-text-muted); margin-bottom: 0; }
.project-impact { color: var(--c-text); font-weight: 600; margin-top: .75rem !important; }

details.disclosure {
  border-top: 1px solid var(--c-border);
  padding: .9rem 0;
}
details.disclosure:last-of-type { padding-bottom: 0; }
details.disclosure summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: .92rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
details.disclosure summary::before { content: "> "; color: var(--c-accent); }
details.disclosure summary::-webkit-details-marker { display: none; }
details.disclosure summary .icon { transition: transform var(--transition); flex-shrink: 0; }
details.disclosure[open] summary .icon { transform: rotate(180deg); }
details.disclosure .disclosure-body { padding-top: 1rem; font-family: var(--font-sans); }

.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .85rem; }
.shot-grid figure { margin: 0; background: var(--c-bg-alt); border: 1px solid var(--c-border); border-radius: var(--radius-sm); overflow: hidden; }
.shot-grid img { width: 100%; height: auto; }
.shot-grid figcaption { padding: .6rem .8rem; font-size: .82rem; color: var(--c-text-muted); }
.shot-grid .figure-wide { grid-column: 1 / -1; }
video { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--c-border); }
.tech-note { color: var(--c-text-muted); font-size: .92rem; }
.tech-note a { font-weight: 600; }

/* ---------- Contact ---------- */
.contact-panel {
  text-align: center;
  background: var(--c-hero-bg);
  color: var(--c-hero-text);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  background-image: radial-gradient(600px 300px at 50% -20%, color-mix(in srgb, var(--c-accent) 22%, transparent), transparent);
}
.contact-panel h2 { color: var(--c-hero-text); }
.contact-panel p { color: color-mix(in srgb, var(--c-hero-text) 80%, transparent); max-width: 520px; margin-inline: auto; }
.contact-links { display: flex; justify-content: center; gap: 1rem; margin-top: 1.75rem; flex-wrap: wrap; }
.contact-links a {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c-hero-text) 25%, transparent);
  color: var(--c-hero-text);
  font-weight: 600;
}
.contact-links a:hover { background: color-mix(in srgb, var(--c-hero-text) 12%, transparent); text-decoration: none; }

/* ---------- Footer ---------- */
footer {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--c-text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--c-border);
}
footer p { margin: 0 0 .35rem; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .project { padding: 1.5rem; }
  .terminal { font-size: .82rem; }
}
