/* =========================================================
   joebull.org — portfolio styles
   Design: dark, modern, high-contrast, fast (no framework)
   ========================================================= */

:root {
  --bg:        #0b0e14;
  --bg-alt:    #11151f;
  --surface:   #161b27;
  --surface-2: #1c2230;
  --border:    #28303f;
  --text:      #e7ecf3;
  --text-dim:  #9aa6b8;
  --text-mute: #828ea0;   /* lightened to clear WCAG AA on dark surfaces */
  --accent:    #5eead4;   /* teal */
  --accent-2:  #7c9cff;   /* indigo */
  --accent-grad: linear-gradient(120deg, #5eead4 0%, #7c9cff 100%);
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1080px;
  --shadow:    0 18px 48px -20px rgba(0,0,0,.7);
  --font:      'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* composed refresh tokens (derived from the palette above) */
  --border-grad: linear-gradient(150deg, rgba(94,234,212,.40), rgba(124,156,255,.22) 45%, var(--border) 80%);
  --glow-teal:   0 16px 50px -22px rgba(94,234,212,.40);
  --glow-indigo: 0 16px 50px -22px rgba(124,156,255,.38);
  --hairline:    inset 0 1px 0 rgba(255,255,255,.05);
  --shadow-card: inset 0 1px 0 rgba(255,255,255,.05), 0 12px 32px -18px rgba(0,0,0,.8);
  --shadow-card-hover: inset 0 1px 0 rgba(255,255,255,.07), 0 22px 60px -24px rgba(0,0,0,.85);
  --step-h1:     clamp(2.4rem, 1.6rem + 3.4vw, 4rem);
  --step-h2:     clamp(1.7rem, 1.25rem + 2.2vw, 2.6rem);
  --step-h3:     clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
  --measure:     64ch;
  --section-pad: clamp(80px, 9vw, 124px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #fff; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }

/* Visible, high-contrast keyboard focus (WCAG 2.4.7 / 1.4.11) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .nav-cta:focus-visible {
  outline: 2px solid var(--bg); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent);
}
.mini-card:focus-visible, .writing-list a:focus-visible, .ref-card a:focus-visible,
.faq-item summary:focus-visible, .shot-view-tall:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
main:focus { outline: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #0b0e14; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,14,20,.72);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  font-family: var(--mono); font-weight: 700; font-size: .9rem; color: #0b0e14;
  background: var(--accent-grad);
}
.brand-name { font-size: 1.02rem; letter-spacing: -.01em; }

.nav-menu { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--text-dim); font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 8px; }
.nav-menu a:hover { color: var(--text); background: var(--surface); }
.nav-cta {
  color: #0b0e14 !important; background: var(--accent); font-weight: 600 !important;
}
.nav-cta:hover { background: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .95rem; padding: 12px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #0b0e14; }
.btn-primary:hover { background: #fff; color: #0b0e14; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-small { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section-kicker { font-family: var(--mono); color: var(--accent); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 40px; font-weight: 800; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 104px 0 88px;
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(124,156,255,.16), transparent 60%),
    radial-gradient(700px 480px at 5% 12%, rgba(94,234,212,.12), transparent 55%);
}
.eyebrow {
  display: inline-block; max-width: 100%; font-family: var(--mono); font-size: .82rem; color: var(--accent);
  background: rgba(94,234,212,.08); border: 1px solid rgba(94,234,212,.25);
  padding: 6px 14px; border-radius: 999px; margin: 0 0 26px; line-height: 1.5;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; letter-spacing: -.03em; }
.hero h1 .accent {
  background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: var(--text-dim); max-width: 660px; margin: 26px 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 56px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 48px; list-style: none; padding: 0; margin: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { color: var(--text-mute); font-size: .9rem; }

/* ---------- Companies strip ---------- */
.companies { padding: 36px 0; border-top: 1px solid var(--border); background: var(--bg-alt); }
.companies-label { text-align: center; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); margin: 0 0 18px; }
.companies-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; list-style: none; margin: 0; padding: 0; }
.companies-list li { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; color: var(--text-dim); opacity: .85; transition: color .2s ease, opacity .2s ease; }
.companies-list li:hover { color: var(--text); opacity: 1; }
.company-logo { width: 22px; height: 22px; border-radius: 5px; background: #fff; padding: 2px; object-fit: contain; box-shadow: 0 1px 3px rgba(0,0,0,.4); flex: none; }
.companies-disclaimer { text-align: center; color: var(--text-mute); font-size: .72rem; line-height: 1.5; max-width: 640px; margin: 20px auto 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.about-lead p { color: var(--text-dim); font-size: 1.08rem; margin: 0 0 18px; }
.about-lead p:last-child { margin-bottom: 0; }
.about-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; background: var(--border); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.about-facts li { background: var(--surface); padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; }
.about-facts span { font-size: .78rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .06em; }
.about-facts strong { font-weight: 600; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s ease, transform .2s ease;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 16px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag-list li {
  font-family: var(--mono); font-size: .8rem; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 8px;
}
.tag-list.small li { font-size: .76rem; }

/* ---------- Projects ---------- */
.project-feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; margin-bottom: 22px; position: relative; overflow: hidden;
  transition: border-color .2s ease;
}
.project-feature::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent-grad);
}
.project-feature:hover { border-color: var(--accent); }
.project-tag { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 10px; }
.project-body h3 { font-size: 1.55rem; margin-bottom: 12px; }
.project-desc { color: var(--text-dim); max-width: 760px; margin: 0 0 18px; }
.project-links { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }

.subhead { font-size: 1.15rem; color: var(--text-dim); margin: 56px 0 22px; font-weight: 600; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mini-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 22px; color: var(--text); transition: border-color .2s ease, transform .2s ease;
}
.mini-card:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.mini-card h4 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.mini-card p { color: var(--text-dim); font-size: .92rem; margin: 0; flex: 1; }
.star { font-size: .78rem; color: #f5c451; font-family: var(--mono); }
.mini-lang { font-family: var(--mono); font-size: .76rem; color: var(--text-mute); }
.archive-link { margin-top: 28px; font-family: var(--mono); font-size: .92rem; }

/* ---------- Timeline ---------- */
.timeline { display: grid; gap: 0; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline-item { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 0 0 32px 28px; position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-alt);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-when { font-family: var(--mono); font-size: .82rem; color: var(--text-mute); padding-top: 2px; }
.timeline-body h3 { font-size: 1.12rem; margin-bottom: 6px; }
.timeline-body p { color: var(--text-dim); margin: 0; font-size: .96rem; }
.tl-co { color: var(--accent); font-weight: 600; }
.resume-note { margin-top: 34px; color: var(--text-dim); }

/* ---------- Credentials ---------- */
.cred-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cred-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.cred-card h3 { font-size: 1.05rem; margin-bottom: 18px; }
.cred-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cred-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 18px; position: relative; }
.cred-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent-grad); }
.cred-list strong { font-weight: 600; }
.cred-list span { color: var(--text-mute); font-size: .88rem; }
.cred-card-feature { border-color: var(--accent); }
.hl { color: var(--accent); font-weight: 600; }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(700px 400px at 80% 0%, rgba(124,156,255,.14), transparent 60%),
    radial-gradient(600px 360px at 10% 100%, rgba(94,234,212,.10), transparent 60%),
    var(--bg);
  text-align: center;
}
.contact-inner { max-width: 720px; }
.contact .section-title { margin-bottom: 18px; }
.contact-lede { color: var(--text-dim); font-size: 1.1rem; margin: 0 auto 34px; max-width: 580px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-writing { margin-top: 60px; text-align: left; }
.contact-writing-label { font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-mute); text-align: center; margin: 0 0 22px; }
.writing-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; }
.writing-list a {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}
.writing-list a:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.writing-title { font-weight: 600; font-size: .98rem; line-height: 1.35; }
.writing-meta { font-family: var(--mono); font-size: .74rem; color: var(--text-mute); margin-top: auto; }
.writing-more { text-align: center; font-family: var(--mono); font-size: .92rem; margin: 24px 0 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 44px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-name { margin: 0; font-weight: 700; }
.footer-tag { margin: 0; color: var(--text-mute); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-dim); font-size: .92rem; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { width: 100%; color: var(--text-mute); font-size: .84rem; margin: 8px 0 0; border-top: 1px solid var(--border); padding-top: 22px; }

/* ---------- Doc page (BurnItDown) ---------- */
code {
  font-family: var(--mono); font-size: .88em; color: var(--accent);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 6px;
}
.doc-hero {
  position: relative; overflow: hidden; padding: 76px 0 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 500px at 78% -10%, rgba(124,156,255,.16), transparent 60%),
    radial-gradient(700px 480px at 5% 12%, rgba(94,234,212,.12), transparent 55%);
}
.doc-hero-inner { max-width: 820px; }
.doc-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; }
.doc-hero h1 .accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc-hero .lede code { background: rgba(94,234,212,.08); }
.crumb { font-family: var(--mono); font-size: .82rem; color: var(--text-mute); margin: 0 0 18px; }
.crumb a { color: var(--text-dim); }
.crumb span { margin: 0 8px; }
.doc-quote {
  margin: 26px 0 32px; padding: 16px 22px; max-width: 660px;
  border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text); font-size: 1.08rem; font-style: italic;
}
.doc-lead { color: var(--text-dim); font-size: 1.08rem; max-width: 740px; margin: 0 0 28px; }
.doc-note { color: var(--text-dim); font-size: .98rem; max-width: 740px; margin: 16px 0 0; }
.doc-subhead { font-size: 1.18rem; margin: 38px 0 16px; font-weight: 700; }
.doc-card-p { color: var(--text-dim); font-size: .95rem; margin: 0; }

/* code blocks */
.codeblock {
  background: #0d111a; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 0 0 10px; overflow-x: auto;
  font-family: var(--mono); font-size: .9rem; line-height: 1.7;
}
.codeblock code { background: none; border: 0; padding: 0; color: var(--text); font-size: inherit; white-space: pre; }
.codeblock .c { color: var(--text-mute); }

/* ordered steps */
.steps { margin: 0; padding-left: 22px; color: var(--text-dim); display: grid; gap: 10px; }
.steps strong { color: var(--text); }

/* spec / reference tables */
.spec-table { width: 100%; border-collapse: collapse; margin: 4px 0 0; font-size: .94rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table thead th { background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.spec-table tbody tr { background: var(--surface); }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table td { color: var(--text-dim); }
.spec-table td:first-child { color: var(--text); font-weight: 500; }
.spec-table code { font-size: .85em; }

/* screenshots */
.shots { display: grid; gap: 22px; }
.shots-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.shot { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.shot-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); flex: none; }
.shot-bar span:nth-child(1) { background: #ff5f57; }
.shot-bar span:nth-child(2) { background: #febc2e; }
.shot-bar span:nth-child(3) { background: #28c840; }
.shot-bar em { font-style: normal; font-family: var(--mono); font-size: .76rem; color: var(--text-mute); margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-view { background: var(--bg); }
.shot-view img { display: block; width: 100%; height: auto; }
.shot-view-tall { max-height: 560px; overflow-y: auto; }
.shot figcaption { padding: 14px 18px; color: var(--text-dim); font-size: .9rem; border-top: 1px solid var(--border); }
.shot-hint { color: var(--text-mute); }

/* FAQ / troubleshooting */
.faq { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 20px; }
.faq-item summary { cursor: pointer; padding: 15px 0; font-weight: 600; color: var(--text); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; display: inline-block; width: 20px; color: var(--accent); font-family: var(--mono); }
.faq-item[open] summary::before { content: "\2013"; }
.faq-item > p { color: var(--text-dim); margin: 0 0 14px; }
.faq-item .codeblock { margin: 0 0 14px; }

/* =========================================================
   Refresh layer — premium, on-brand polish (additive)
   ========================================================= */

/* Fluid type scale + reading measure */
.hero h1 { font-size: var(--step-h1); letter-spacing: -.035em; line-height: 1.06; }
.section-title { font-size: var(--step-h2); }
.lede, .about-lead p, .project-desc, .contact-lede, .doc-lead { max-width: var(--measure); }
.contact-lede { max-width: 580px; }

/* Section rhythm + numbered-index kicker */
.section { padding: var(--section-pad) 0; position: relative; }
.section::before { content: ""; position: absolute; top: -1px; left: 0; width: 56px; height: 2px; background: var(--accent-grad); }
.section-kicker { display: flex; align-items: center; gap: 12px; }
.section-kicker::before { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: .7; flex: none; }

/* Hero: availability chip, location caption, faint grid, hairline stats */
.hero-inner { position: relative; z-index: 1; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(124,156,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,156,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask: radial-gradient(680px 420px at 50% -5%, #000, transparent 75%);
          mask: radial-gradient(680px 420px at 50% -5%, #000, transparent 75%);
}
.status-chip {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 16px;
  font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--accent);
  padding: 6px 14px 6px 12px; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--border-grad) border-box;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
  box-shadow: 0 0 0 0 rgba(94,234,212,.55); animation: pulseDot 2.4s ease-out infinite;
}
@keyframes pulseDot { 70% { box-shadow: 0 0 0 8px rgba(94,234,212,0); } 100% { box-shadow: 0 0 0 0 rgba(94,234,212,0); } }
.hero-meta { font-family: var(--mono); font-size: .82rem; color: var(--text-mute); line-height: 1.6; max-width: 62ch; margin: 0 0 24px; }
.hero-stats { gap: 0; border-top: 1px solid var(--border); padding-top: 26px; }
.hero-stats li { padding: 0 clamp(20px, 3vw, 36px); border-left: 1px solid var(--border); }
.hero-stats li:first-child { padding-left: 0; border-left: 0; }
.hero-stats span { font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; font-size: .74rem; }

/* One elevation language for every card */
.skill-card, .mini-card, .cred-card, .writing-list a, .ref-card {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(160deg, rgba(255,255,255,.07), var(--border) 60%) border-box;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.skill-card:hover, .mini-card:hover, .cred-card:hover, .writing-list a:hover, .ref-card:hover {
  transform: translateY(-3px);
  background:
    linear-gradient(var(--surface-2), var(--surface)) padding-box,
    var(--border-grad) border-box;
  box-shadow: var(--shadow-card-hover), var(--glow-teal);
}
.cred-card-feature {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--border-grad) border-box;
}

/* Tech chips: subtle depth + interactive hover */
.tag-list li {
  background: linear-gradient(180deg, var(--surface-2), var(--bg-alt));
  box-shadow: var(--hairline);
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.tag-list li:hover { border-color: rgba(94,234,212,.5); color: var(--text); box-shadow: var(--hairline), 0 0 14px -6px rgba(94,234,212,.6); }

/* Featured projects as flagship cards */
.project-feature {
  border: 1px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--border-grad) border-box;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease;
}
.project-feature::before { width: 4px; box-shadow: 0 0 22px 0 rgba(94,234,212,.4); }
.project-feature::after {
  content: ""; position: absolute; top: -30%; right: -10%; width: 320px; height: 320px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124,156,255,.16), transparent);
}
.project-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover), var(--glow-indigo); }
.project-body h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

/* Skills iconography */
.skill-card h3 { display: flex; align-items: center; gap: 11px; }
.skill-icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, rgba(94,234,212,.16), rgba(124,156,255,.16)); border: 1px solid var(--border);
}
.skill-icon svg { width: 18px; height: 18px; stroke: var(--accent); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Companies: muted-by-default trust band */
.companies-list li { opacity: .72; }
.companies-list li:hover { opacity: 1; }

/* Experience timeline: gradient rail + glowing current node */
.timeline { border-image: linear-gradient(180deg, var(--accent), var(--accent-2) 55%, transparent) 1; }
.timeline-item:first-child::before {
  width: 14px; height: 14px; left: -8px; top: 4px;
  box-shadow: 0 0 0 4px var(--bg-alt), 0 0 18px -2px rgba(94,234,212,.75);
}
.timeline-item:first-child .timeline-when { color: var(--accent); }
.timeline-body h3 { transition: transform .2s ease; }
.timeline-item:hover .timeline-body h3 { transform: translateX(3px); }

/* About: standfirst lead + datasheet facts */
.about-lead p:first-child { font-size: 1.18rem; color: var(--text); line-height: 1.55; }
.about-facts {
  border: 1px solid transparent;
  background: linear-gradient(var(--border), var(--border)) padding-box, var(--border-grad) border-box;
  box-shadow: var(--shadow-card);
}
.about-facts li { transition: background .18s ease; }
.about-facts li:hover { background: var(--surface-2); }
.about-facts li:last-child { background: rgba(94,234,212,.06); }

/* Buttons: gradient primary + hairline ghost */
.btn { transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, background .15s ease, border-color .15s ease, color .15s ease; }
.btn-primary { background: var(--accent-grad); color: #06231d; box-shadow: 0 10px 28px -14px rgba(94,234,212,.55); }
.btn-primary:hover { background: var(--accent-grad); color: #06231d; transform: translateY(-2px); box-shadow: 0 16px 40px -14px rgba(94,234,212,.72); filter: brightness(1.06); }
.btn-ghost { border: 1px solid transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--border-grad) border-box; color: var(--text); }
.btn-ghost:hover { color: var(--text); transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(94,234,212,.4), 0 12px 30px -16px rgba(94,234,212,.45); }

/* References section */
.ref-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.ref-card { padding: 30px; border-radius: var(--radius); }
.ref-card h3 { font-size: 1.18rem; margin-bottom: 14px; }
.ref-card-lead { position: relative; overflow: hidden; }
.ref-card-lead::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent-grad); }
.ref-tag { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 10px; }
.ref-desc { color: var(--text-dim); margin: 0 0 18px; }
.ref-links { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 12px; }
.ref-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ref-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 18px; position: relative; }
.ref-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--accent-grad); }
.ref-list strong { font-weight: 600; }
.ref-list span { color: var(--text-mute); font-size: .88rem; }

/* Nav: scroll-spy underline, scrolled state, progress bar */
.nav-menu a { position: relative; }
.nav-menu a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--accent-grad); transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.nav-menu a.is-active::after, .nav-menu a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-menu a.is-active { color: var(--text); }
.site-header.scrolled { background: rgba(11,14,20,.86); box-shadow: 0 8px 30px -18px rgba(0,0,0,.9); border-bottom-color: rgba(124,156,255,.25); }
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent-grad); z-index: 60; transition: width .12s linear; }

/* Scroll-reveal (gated on html.js; fully visible without JS or under reduced-motion) */
.reveal { opacity: 1; }
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1 !important; transform: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .skills-grid, .cards-grid, .cred-grid { grid-template-columns: repeat(2, 1fr); }
  .ref-grid { grid-template-columns: 1fr; }
  .shots-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 14px 24px 22px; display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 14px; }
  .section { padding: 72px 0; }
  .hero { padding: 72px 0 64px; }
  .hero-stats { gap: 22px 26px; border-top: 0; padding-top: 0; }
  .hero-stats li { padding: 0; border-left: 0; }
  .skills-grid, .cards-grid, .cred-grid { grid-template-columns: 1fr; }
  .writing-list { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 78px 1fr; gap: 14px; }
  .project-feature { padding: 26px; }
}
