/* ==========================================================================
   nvdong.site — Nguyễn Văn Đông
   Architectural Studio-Editorial Design System
   Ground: Cool Mineral Alabaster · Committed Deep Indigo Bands · Cobalt Accent
   ========================================================================== */

:root {
  --ground: #f5f7fa;
  --surface: #ffffff;
  --surface-subtle: #edf1f7;
  --surface-deep: #0b192c;
  --surface-deep-2: #12243d;
  --surface-deep-border: rgba(214, 228, 248, 0.14);

  --ink: #0b1626;
  --ink-secondary: #3d4d63;
  --ink-muted: #586980;
  --ink-on-deep: #f2f6fc;
  --ink-on-deep-muted: #b6c6dc;

  --border: #dce3ec;
  --border-strong: #c3cfde;

  --accent: #1354d4;
  --accent-btn: #1354d4;
  --accent-hover: #0e43ae;
  --accent-soft: #e8f0fe;
  --accent-on-deep: #7aa7ff;

  --signal: #0e8a5f;
  --signal-soft: #e3f6ee;
  --signal-on-deep: #4adeb0;

  --font-display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --max-w: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

[data-theme="dark"] {
  --ground: #0a111c;
  --surface: #111c2d;
  --surface-subtle: #17253a;
  --surface-deep: #070d16;
  --surface-deep-2: #0e1828;
  --surface-deep-border: rgba(190, 210, 240, 0.14);

  --ink: #edf2f8;
  --ink-secondary: #c1cfe0;
  --ink-muted: #8fa3bd;
  --ink-on-deep: #f2f6fc;
  --ink-on-deep-muted: #9eb3ce;

  --border: #22324a;
  --border-strong: #324766;

  --accent: #68a0ff;
  --accent-btn: #2563eb;
  --accent-hover: #1d54cc;
  --accent-soft: rgba(104, 160, 255, 0.15);
  --accent-on-deep: #7aa7ff;

  --signal: #2dd4a0;
  --signal-soft: rgba(45, 212, 160, 0.14);
  --signal-on-deep: #4adeb0;

  color-scheme: dark;
}

/* Browser Surface Craft */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  accent-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--ground);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-muted);
}

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

a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

[hidden] {
  display: none !important;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

.mono,
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.container {
  width: min(var(--max-w), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* ==========================================================================
   Sticky Top Bar + Native Scroll Progress Hairline
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ground);
  border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header {
    background: color-mix(in srgb, var(--ground) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-progress {
      animation: page-progress linear both;
      animation-timeline: scroll(root block);
    }
    @keyframes page-progress {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}

.brand-domain {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  min-width: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.ctrl-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.ctrl-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-btn {
  display: none;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 12px var(--gutter) 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 4px;
}

.mobile-nav a {
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
}

.mobile-nav a:hover {
  background: var(--surface-subtle);
}

/* ==========================================================================
   Hero — Asymmetric Architectural Split (First Viewport Thesis)
   ========================================================================== */

.hero {
  padding: clamp(36px, 5.5vw, 72px) 0 clamp(44px, 6vw, 80px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(290px, 0.92fr);
  gap: clamp(28px, 4.5vw, 60px);
  align-items: start;
}

.hero-copy {
  padding-top: clamp(4px, 1.2vw, 18px);
}

.hero-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--ink-secondary);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--signal-soft);
  color: var(--signal);
  font-size: 0.8rem;
  font-weight: 600;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  flex-shrink: 0;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.6vw, 3.65rem);
  font-weight: 800;
  line-height: 1.09;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.hero-lead {
  margin: 22px 0 0;
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.35vw, 1.14rem);
  line-height: 1.68;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 180ms var(--ease-out);
  white-space: nowrap;
}

.btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent-btn);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-subtle);
  border-color: var(--ink-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  padding: 0 12px;
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--surface-subtle);
}

.hero-proof-strip {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.proof-cell dt {
  font-family: var(--font-mono);
  font-size: clamp(1.18rem, 2vw, 1.48rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.proof-cell dd {
  margin: 6px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* Right Dossier Panel */
.dossier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dossier-photo-wrap {
  position: relative;
  aspect-ratio: 617 / 630;
  background: #d8e2ef;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.dossier-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.dossier-meta {
  padding: 18px 20px 20px;
}

.dossier-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.dossier-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--ink);
}

.dossier-handle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.dossier-rows {
  margin: 12px 0 0;
  display: grid;
  gap: 9px;
}

.dossier-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.84rem;
}

.dossier-row dt {
  color: var(--ink-muted);
  flex-shrink: 0;
}

.dossier-row dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}

.dossier-row a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.dossier-row a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Committed Deep Indigo Band — Dual Thesis (CMO × Systems Builder)
   ========================================================================== */

.band-deep {
  background: var(--surface-deep);
  color: var(--ink-on-deep);
  padding: clamp(56px, 7.5vw, 96px) 0;
}

.band-deep h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
  max-width: 24ch;
  text-wrap: balance;
}

.thesis-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: end;
  padding-bottom: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--surface-deep-border);
}

.thesis-intro {
  margin: 0;
  font-size: 1rem;
  line-height: 1.68;
  color: var(--ink-on-deep-muted);
  max-width: 56ch;
}

.dual-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--surface-deep-border);
}

.dual-col {
  padding: clamp(28px, 3.6vw, 44px) 0;
}

.dual-col:first-child {
  padding-right: clamp(20px, 3.8vw, 48px);
  border-right: 1px solid var(--surface-deep-border);
}

.dual-col:last-child {
  padding-left: clamp(20px, 3.8vw, 48px);
}

.dual-col h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink-on-deep);
}

.dual-col p {
  margin: 0 0 18px;
  color: var(--ink-on-deep-muted);
  font-size: 0.95rem;
  line-height: 1.68;
}

.dual-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.dual-points li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.92rem;
  color: var(--ink-on-deep);
}

.dual-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-on-deep);
  flex-shrink: 0;
  transform: translateY(-2px);
}

.ethos-bar {
  margin-top: clamp(28px, 3.6vw, 44px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 36px;
}

.ethos-item h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink-on-deep);
}

.ethos-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-on-deep-muted);
}

/* ==========================================================================
   Main Sections Spacing & Headings
   ========================================================================== */

.section {
  padding: clamp(56px, 7.5vw, 96px) 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px 32px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.1vw, 2.45rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

.section-desc {
  margin: 10px 0 0;
  max-width: 58ch;
  font-size: 0.98rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Signature Interactive Workshop — Projects & Real Benchmarks
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ground);
}

.flagship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.flagship-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.flagship-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.live-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--signal);
  text-decoration: none;
}

.live-link:hover {
  text-decoration: underline;
}

.flagship-card h3 {
  margin: 14px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2vw, 1.55rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.flagship-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--ink-secondary);
}

/* Real Benchmark Meter Bars inside Engineering Flagship */
.bench-list {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--ground);
  border: 1px solid var(--border);
}

.bench-row {
  display: grid;
  gap: 6px;
}

.hero-copy,
.dossier,
.flagship-card,
.dual-col,
.timeline-body,
.contact-copy,
.contact-channels,
.cap-cell {
  min-width: 0;
}

.bench-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.82rem;
}

.bench-name {
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}

.bench-metric {
  font-family: var(--font-mono);
  font-size: 0.77rem;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.bench-track {
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.bench-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.bench-fill.is-signal {
  background: var(--signal);
}

/* Mini Verified Traffic Table inside Growth Flagship */
.mini-table-wrap {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow-x: auto;
  background: var(--ground);
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.mini-table th,
.mini-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.mini-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--surface-subtle);
}

.mini-table tr:last-child td {
  border-bottom: none;
}

.mini-table td.num {
  text-align: right;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.flagship-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.tech-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-chip {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--ink-secondary);
  background: var(--ground);
}

.inspect-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 600;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}

.inspect-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Structured Engineering Index List (Avoids identical card grid monotony) */
.project-index {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(0, 1.85fr) minmax(130px, 0.8fr) auto;
  gap: 14px 24px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  transition: background-color 160ms var(--ease-out);
}

.project-row:last-child {
  border-bottom: none;
}

.project-row:hover {
  background: var(--surface-subtle);
}

.project-row[hidden],
.flagship-card[hidden] {
  display: none;
}

.proj-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.proj-sub {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.proj-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.proj-metric {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.proj-metric small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.empty-filter {
  padding: 36px 24px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

/* ==========================================================================
   Career Timeline & Education Ledger (Real Chronological Sequence)
   ========================================================================== */

.timeline {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 16px 40px;
  padding: clamp(24px, 3.2vw, 34px) 0;
  border-bottom: 1px solid var(--border);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 4px;
}

.timeline-org {
  margin-top: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.timeline-body h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.8vw, 1.38rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.timeline-body p {
  margin: 0 0 12px;
  max-width: 68ch;
  font-size: 0.95rem;
  color: var(--ink-secondary);
}

.timeline-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.timeline-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  max-width: 68ch;
}

.timeline-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1.5px;
  background: var(--accent);
}

.timeline-bullets strong {
  color: var(--ink);
  font-weight: 600;
}

.milestone-strip {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.milestone-tag {
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Education Horizontal Strip */
.edu-grid {
  margin-top: clamp(36px, 4.5vw, 52px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.edu-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--ground);
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.edu-card h3 {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.edu-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Capabilities Matrix (4 Clean Tracks, No Pill Soup)
   ========================================================================== */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.cap-cell {
  padding: clamp(22px, 3vw, 30px);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cap-cell:nth-child(2n) {
  border-right: none;
}

.cap-cell:nth-last-child(-n + 2) {
  border-bottom: none;
}

.cap-cell h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.cap-cell p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.cap-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cap-list li {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--ground);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}

/* ==========================================================================
   Anchored Close & Direct Contact (Deep Indigo Footer)
   ========================================================================== */

.contact-band {
  background: var(--surface-deep);
  color: var(--ink-on-deep);
  padding: clamp(56px, 7.5vw, 92px) 0 clamp(32px, 4vw, 48px);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(40px, 5vw, 56px);
  border-bottom: 1px solid var(--surface-deep-border);
}

.contact-copy h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.3vw, 2.65rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.contact-copy p {
  margin: 0 0 16px;
  max-width: 54ch;
  color: var(--ink-on-deep-muted);
  font-size: 0.98rem;
  line-height: 1.68;
}

.personal-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--surface-deep-border);
  font-size: 0.88rem;
  color: var(--ink-on-deep-muted);
  max-width: 54ch;
}

.personal-note strong {
  color: var(--ink-on-deep);
}

.contact-channels {
  display: grid;
  gap: 10px;
}

.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-deep-2);
  border: 1px solid var(--surface-deep-border);
}

.channel-info {
  min-width: 0;
}

.channel-label {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-on-deep-muted);
}

.channel-value {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-on-deep);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.channel-value:hover {
  color: var(--accent-on-deep);
}

.channel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.deep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-deep-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-on-deep);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}

.deep-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  font-size: 0.84rem;
  color: var(--ink-on-deep-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--ink-on-deep-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink-on-deep);
}

/* ==========================================================================
   Native <dialog> Case Study Inspector (WebKit-Safe Block Layout!)
   ========================================================================== */

dialog.case-dialog {
  width: min(720px, calc(100vw - 24px));
  max-width: 720px;
  padding: 0;
  margin: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(5, 14, 28, 0.34);
  overflow: hidden;
}

dialog.case-dialog[open] {
  display: block;
}

dialog.case-dialog::backdrop {
  background: rgba(7, 15, 28, 0.62);
  backdrop-filter: blur(4px);
}

@media (prefers-reduced-motion: no-preference) {
  dialog.case-dialog[open] {
    animation: dialog-enter 180ms var(--ease-out) both;
  }
  @keyframes dialog-enter {
    from {
      transform: translateY(8px) scale(0.99);
    }
    to {
      transform: translateY(0) scale(1);
    }
  }
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.dialog-header h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--ground);
  color: var(--ink);
  flex-shrink: 0;
}

.dialog-close:hover {
  background: var(--surface-subtle);
}

.dialog-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
}

.dialog-body {
  padding: 20px 24px 24px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.dialog-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.dialog-stat {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--ground);
  border: 1px solid var(--border);
}

.dialog-stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
}

.dialog-stat span {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.dialog-block {
  margin-bottom: 18px;
}

.dialog-block h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
}

.dialog-block p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--ink-secondary);
}

.dialog-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.dialog-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.dialog-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 1.5px;
  background: var(--accent);
}

.dialog-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--ground);
}

/* Floating Copy Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-deep);
  color: var(--ink-on-deep);
  border: 1px solid var(--surface-deep-border);
  box-shadow: 0 12px 32px rgba(7, 15, 28, 0.25);
  font-size: 0.86rem;
  font-weight: 500;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 180ms var(--ease-out);
}

.toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints (1024px / 768px / 480px)
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .dossier {
    max-width: 460px;
  }

  .thesis-header,
  .dual-columns,
  .flagship-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .dual-col:first-child {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--surface-deep-border);
  }

  .dual-col:last-child {
    padding-left: 0;
  }

  .ethos-bar {
    grid-template-columns: 1fr;
  }

  .project-row {
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
  }

  .proj-desc {
    grid-column: 1 / -1;
    order: 3;
  }

  .proj-metric {
    grid-column: 1 / -1;
    order: 2;
  }

  .edu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .hero-proof-strip {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cap-grid {
    grid-template-columns: 1fr;
  }

  .cap-cell {
    border-right: none;
  }

  .cap-cell:nth-last-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .dialog-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-domain {
    display: none;
  }

  .header-inner {
    gap: 10px;
  }

  .brand {
    font-size: 0.96rem;
    gap: 8px;
  }

  .edu-grid {
    grid-template-columns: 1fr;
  }

  .project-row {
    padding: 16px;
  }

  .bench-label {
    flex-direction: column;
    gap: 2px;
  }

  .channel-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
