/* Quinn Vidal portfolio. AIQSO v3 tokens (aiqso-brand/design-system/tokens/brand.json).
   Lime (#bef264) is used ONLY in the dark theme; light theme uses navy + copper + azure. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy-900: #081a2c;
  --navy-850: #0b1622;
  --navy-800: #111f2e;
  --navy-700: #15446a;
  --navy-600: #0e2f4c;
  --azure-400: #4aa6e6;
  --azure-600: #2b6da0;
  --copper-500: #f08c3a;
  --copper-800: #8a3d10;
  --lime-300: #bef264;

  /* light theme (default) */
  --bg: #f7f9fc;
  --bg-alt: #eef3f8;
  --surface: #ffffff;
  --ink: #0e2f4c;
  --text: #24313d;
  --muted: #5b6b78;
  --line: #d9e2ec;
  --accent: #f08c3a;          /* decorative copper */
  --accent-text: #8a3d10;     /* copper that passes AA on light */
  --link: #2b6da0;
  --good: #1f7a4a;
  --bad: #c2410c;
  --btn-bg: #0e2f4c;
  --btn-fg: #ffffff;
  --hero-glow: rgba(74, 166, 230, 0.14);
  --shadow: 0 1px 2px rgba(14, 47, 76, 0.06), 0 8px 24px rgba(14, 47, 76, 0.06);
  --header-bg: rgba(247, 249, 252, 0.82);

  --radius: 14px;
  --wrap: 1120px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #081a2c; --bg-alt: #0b1622; --surface: #111f2e; --ink: #f2f6fa; --text: #dbe5ee; --muted: #8fa6bd;
    --line: #1d3247; --accent: #bef264; --accent-text: #bef264; --link: #7cc0f0; --good: #bef264; --bad: #f08c3a;
    --btn-bg: #bef264; --btn-fg: #081a2c; --hero-glow: rgba(190, 242, 100, 0.07);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); --header-bg: rgba(8, 26, 44, 0.82);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #081a2c; --bg-alt: #0b1622; --surface: #111f2e; --ink: #f2f6fa; --text: #dbe5ee; --muted: #8fa6bd;
  --line: #1d3247; --accent: #bef264; --accent-text: #bef264; --link: #7cc0f0; --good: #bef264; --bad: #f08c3a;
  --btn-bg: #bef264; --btn-fg: #081a2c; --hero-glow: rgba(190, 242, 100, 0.07);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25); --header-bg: rgba(8, 26, 44, 0.82);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 1.0625rem; line-height: 1.65; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--azure-400); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-alt); padding: .1em .35em; border-radius: 5px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--btn-bg); color: var(--btn-fg); padding: .6rem 1rem; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.fine { font-size: .8rem; color: var(--muted); margin: 1rem 0 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.brand-mark { width: 18px; height: 18px; border: 2.5px solid currentColor; border-radius: 4px; transform: rotate(45deg); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 0; margin: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
nav { margin-left: auto; }
.nav-links { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 3rem; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--hero-glow), transparent 70%); pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.eyebrow, .kicker {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 .9rem;
}
.hero h1 { font-size: clamp(2.8rem, 7vw, 4.8rem); font-weight: 700; letter-spacing: -0.035em; }
.hero-role { font-size: clamp(1.2rem, 2.4vw, 1.55rem); color: var(--ink); font-weight: 500; margin: .4rem 0 1.4rem; opacity: .85; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 40rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.8rem 0 1.2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.25rem; border-radius: 10px;
  font-weight: 600; font-size: .97rem; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.hero-meta { font-size: .9rem; color: var(--muted); margin: 0; }
.hero-portrait { margin: 0; position: relative; justify-self: end; width: min(100%, 380px); }
.hero-portrait img { border-radius: 22px; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 50% 20%; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-portrait::after {
  content: ""; position: absolute; width: 74px; height: 74px; right: -18px; bottom: -18px; border: 3px solid var(--accent);
  border-radius: 14px; transform: rotate(45deg); z-index: -1;
}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 1.4rem 1.5rem; border-left: 1px solid var(--line); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .35rem; }
.stat:first-child { border-left: 0; }
.stat dt { font-size: .85rem; color: var(--muted); line-height: 1.4; }
.stat dd { margin: 0; }
.stat-num { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-num .arrow { color: var(--accent); font-weight: 600; }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head h2, .contact h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); font-weight: 700; margin-bottom: .9rem; }
.section-sub { color: var(--muted); font-size: 1.08rem; margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow); }
.card h3 { font-size: 1.25rem; margin-bottom: .5rem; }

.ticks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .55rem; }
.ticks li { position: relative; padding-left: 1.5rem; font-size: .97rem; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; transform: rotate(45deg); border: 2px solid var(--accent); border-radius: 2px; }

/* featured */
.feature-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: stretch; }
.result-card h3 { font-size: 1.3rem; }
.bars { margin: 1.5rem 0 .5rem; display: grid; gap: 1.4rem; }
.bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 500; color: var(--ink); }
.bar-label strong { font-size: 1.6rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bar-track { height: 14px; border-radius: 99px; background: var(--bg-alt); border: 1px solid var(--line); overflow: hidden; margin: .45rem 0 .35rem; }
.bar-fill { height: 100%; border-radius: 99px; }
.bar-bad { width: 79.3%; background: var(--bad); }
.bar-good { width: 0.6%; min-width: 6px; background: var(--good); }
.bar-foot { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.video-slot {
  position: relative; border-radius: var(--radius); border: 2px dashed var(--line); background:
    linear-gradient(135deg, rgba(14,47,76,.92), rgba(8,26,44,.98));
  min-height: 280px; display: grid; place-items: center; overflow: hidden; color: #e8eef5; aspect-ratio: 16 / 9; align-self: center; width: 100%;
}
.video-slot::before {
  content: ""; position: absolute; inset: 0; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 28px 28px;
}
.video-slot-inner { position: relative; text-align: center; padding: 1.5rem; }
.video-badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--navy-900); background: var(--lime-300); padding: .3rem .65rem; border-radius: 99px; }
.play { width: 64px; height: 64px; margin: 1rem auto .8rem; display: block; }
.play circle { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 2; }
.play path { fill: rgba(255,255,255,.75); }
.video-title { font-weight: 700; font-size: 1.15rem; margin: 0 0 .25rem; color: #fff; }
.video-sub { margin: 0; color: #a9bdd0; font-size: .92rem; max-width: 22rem; }

/* projects */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.project { display: flex; flex-direction: column; }
.project-date { font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); margin-bottom: .6rem; text-transform: uppercase; }
.project h3 { font-size: 1.45rem; margin-bottom: .2rem; }
.project-tag { color: var(--accent-text); font-weight: 600; font-size: .95rem; margin-bottom: .9rem; }

/* field */
.field-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.metric { background: var(--surface); padding: 1.3rem 1.2rem; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .3rem; }
.metric dt { font-size: .84rem; color: var(--muted); line-height: 1.4; }
.metric dd { margin: 0; font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.role { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; padding: 1.8rem 0; border-top: 1px solid var(--line); }
.role:first-child { border-top: 0; padding-top: 0; }
.role-when { font-size: .9rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .2rem; }
.role h3 { font-size: 1.3rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; margin-bottom: .5rem; }
.role-title { font-size: 1rem; font-weight: 500; color: var(--accent-text); letter-spacing: 0; }
.role ul { margin: .4rem 0 0; padding-left: 1.1rem; display: grid; gap: .45rem; }
.role li::marker { color: var(--accent); }
.role .muted { margin-bottom: .4rem; }

/* skills */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2.5rem; }
.skill-group h3, .certs h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .9rem; font-weight: 600; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { font-size: .9rem; padding: .35rem .75rem; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; color: var(--text); }
.certs { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.cert-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem 1.5rem; }
.cert-list li { font-weight: 500; color: var(--ink); font-size: .97rem; padding-left: 1rem; border-left: 2px solid var(--accent); }

/* contact */
.contact { background: var(--navy-900); color: #dbe5ee; }
.contact h2 { color: #fff; }
.contact .kicker { color: var(--lime-300); }
.contact .section-sub { color: #a9bdd0; }
.contact-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.contact-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.contact-links a {
  display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-radius: 12px; border: 1px solid #1d3247;
  background: #0f2236; color: #fff; text-decoration: none; transition: border-color .15s ease, transform .15s ease;
}
.contact-links a:hover { border-color: var(--lime-300); transform: translateX(2px); }
.cl-label { color: #8fa6bd; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cl-value { font-weight: 600; overflow-wrap: anywhere; text-align: right; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.footer-logo img { height: 34px; width: auto; }
.logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
:root[data-theme="dark"] .logo-on-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-on-dark { display: block; }
  :root:not([data-theme="light"]) .logo-on-light { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .feature-grid, .field-grid, .contact-inner { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cert-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { justify-self: start; width: min(64%, 260px); order: -1; }
  .project-grid, .skills-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .role { grid-template-columns: 1fr; gap: .4rem; }
  .video-slot { aspect-ratio: auto; min-height: 260px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0; }
  .stat:nth-child(n+2) { border-top: 1px solid var(--line); }
  .cert-list { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 auto; }
}
@media print {
  .site-header, .theme-toggle, .video-slot, .skip-link { display: none !important; }
  .contact { background: none; color: #000; }
  body { background: #fff; color: #000; }
}
