:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-subtle: #F3F4F6;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --ink: #111827;
  --ink-secondary: #4B5563;
  --ink-muted: #6B7280;

  --accent: #FF6023;
  --accent-soft: color-mix(in srgb, var(--accent) 8%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 30%, transparent);
  --accent-ink: #FFFFFF;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --max-w: 980px;
  --col-left: 192px;
}

[data-font="inter"] {
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-font="jakarta"] {
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

[data-font="space"] {
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

[data-mode="dark"] {
  --bg: #1C1F26;
  --surface: #242832;
  --surface-subtle: #2C313D;
  --border: #323846;
  --border-strong: #434B5E;
  --ink: #F1F3F5;
  --ink-secondary: #B8C0CC;
  --ink-muted: #8690A2;

  --accent: #FF733D;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 42%, transparent);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.66;
  font-size: 16px;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

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

/* Print table wrapper behaves as normal block on screen */
.print-layout,
.print-layout > tbody,
.print-layout > tbody > tr,
.print-layout > tbody > tr > td {
  display: block;
  width: 100%;
}
.print-spacer {
  display: none;
}

/* Sticky Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.nav-links a:hover {
  color: var(--ink);
}

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

.control-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.control-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.lang-active {
  color: var(--accent);
  font-weight: 600;
}

/* Main Container */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

/* Hero + subtle radial dot-matrix from top-right */
.hero {
  position: relative;
  padding-top: 60px;
  padding-bottom: 54px;
}

.hero > *:not(.hero-bg) {
  position: relative;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 68% 98% at 86% 6%, #000 0%, rgba(0, 0, 0, 0.62) 44%, rgba(0, 0, 0, 0.18) 74%, transparent 96%);
  mask-image: radial-gradient(ellipse 68% 98% at 86% 6%, #000 0%, rgba(0, 0, 0, 0.62) 44%, rgba(0, 0, 0, 0.18) 74%, transparent 96%);
}

.hero-bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent) 1.05px, transparent 1.2px);
  background-size: 12px 12px;
}

[data-mode="dark"] .hero-bg-dots {
  background-image: radial-gradient(circle, color-mix(in srgb, var(--accent) 23%, transparent) 1.05px, transparent 1.2px);
}

.hero-bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

[data-mode="dark"] .hero-bg-grain {
  opacity: 0.12;
  mix-blend-mode: soft-light;
}

.availability-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.8vw, 43px);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 21ch;
}

.hero-prose {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--ink-secondary);
  max-width: 64ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.btn-primary:hover { opacity: 0.92; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

.hero-meta {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.meta-item-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.meta-item-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

/* Interactive Pipeline Box */
.pipeline-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 30px;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-muted);
}

.pipeline-tags {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

.pipeline-nodes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.node-btn {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

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

.node-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.node-step {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.node-btn.active .node-step {
  color: var(--accent);
  font-weight: 600;
}

.node-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.pipeline-detail {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink-secondary);
}

/* Section Headings */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-index {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-note {
  font-size: 13.5px;
  color: var(--ink-muted);
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

/* Experience List */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

.exp-item {
  display: grid;
  grid-template-columns: var(--col-left) 1fr;
  gap: 24px;
}

.exp-period {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--ink-muted);
  padding-top: 3px;
}

.exp-company {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.exp-role {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-top: 2px;
  margin-bottom: 10px;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-secondary);
  font-size: 15px;
}

.exp-bullets li {
  position: relative;
  padding-left: 16px;
}

.exp-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--border-strong);
}

.earlier-toggle {
  margin-top: 28px;
  margin-left: calc(var(--col-left) + 24px);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.earlier-toggle:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.earlier-list {
  display: none;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}

.earlier-list.open {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.earlier-row {
  display: grid;
  grid-template-columns: var(--col-left) 1fr;
  gap: 24px;
  align-items: baseline;
  font-size: 14.5px;
}

.earlier-period {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-muted);
}

.earlier-title {
  color: var(--ink);
  font-weight: 500;
}

.earlier-role {
  color: var(--ink-secondary);
  font-weight: 400;
}

.earlier-note {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Specification Matrix: Stack & Formação */
.spec-table {
  border-top: none;
}

.spec-row {
  display: grid;
  grid-template-columns: var(--col-left) 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

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

#competencias {
  padding-bottom: 68px;
}

#formacao {
  padding-top: 68px;
}

.spec-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.spec-content {
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.spec-core-line {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 3px;
}

.spec-concept-line {
  color: var(--ink-secondary);
  font-weight: 400;
}

.spec-sep {
  color: var(--border-strong);
  margin: 0 7px;
  user-select: none;
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.edu-degree {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.edu-school {
  display: block;
  color: var(--ink-secondary);
  font-weight: 400;
  margin-top: 1px;
}

.edu-year {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-muted);
}

/* Projects & Articles (Coming Soon + Published Cards/List) */
.coming-soon-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

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

.cs-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 4px;
}

.cs-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.cs-desc {
  font-size: 14.5px;
  color: var(--ink-secondary);
  max-width: 60ch;
  margin-bottom: 14px;
}

.cs-tracks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-track {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s ease;
}

.project-card:hover { border-color: var(--accent-border); }

.project-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.project-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.project-desc {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.project-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.articles-list {
  border-top: 1px solid var(--border);
}

.article-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.article-row:hover .article-title {
  color: var(--accent);
}

.article-date,
.article-topic {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.article-title {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.15s ease;
}

/* Detail Pages (Projects & Articles) */
.detail-article {
  padding: 56px 0 64px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.detail-back:hover { color: var(--accent); }

.detail-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
}

.detail-body {
  margin-top: 28px;
  max-width: 68ch;
  color: var(--ink-secondary);
  font-size: 16px;
  line-height: 1.75;
}

.detail-body h2,
.detail-body h3 {
  color: var(--ink);
  margin: 28px 0 10px;
}

.detail-body p { margin-bottom: 16px; }
.detail-body ul,
.detail-body ol { margin: 0 0 18px 20px; }
.detail-body li { margin-bottom: 6px; }
.detail-body a { color: var(--accent); text-decoration: underline; }
.detail-body code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: var(--surface-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}
.detail-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 16px 0;
}
.detail-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--ink);
  margin: 18px 0;
}

/* Balanced 2-Line Footer */
footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 64px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-right {
  text-align: right;
  align-items: flex-end;
}

.footer-primary {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.footer-secondary {
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-links-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-secondary);
}

.footer-links-row a:hover {
  color: var(--accent);
}

.footer-sep {
  color: var(--border-strong);
  user-select: none;
}

/* Print-only CV Header */
.print-cv-header {
  display: none;
}

/* Tailored A4 Print / PDF Visual Guide */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body,
  [data-mode="dark"] {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --border: #E5E7EB;
    --border-strong: #D1D5DB;
    --ink: #111827;
    --ink-secondary: #374151;
    --ink-muted: #6B7280;
    --accent: #FF6023;
    --col-left: 122px;
    background: #FFFFFF !important;
    color: #111827 !important;
    font-size: 10.5px;
    line-height: 1.45;
  }

  .topbar,
  .hero,
  .hero-bg,
  .pipeline-box,
  .btn-pdf,
  .earlier-toggle,
  #projetos,
  #artigos,
  footer {
    display: none !important;
  }

  .print-layout {
    display: table;
    width: 100%;
    border-collapse: collapse;
  }
  .print-layout > thead { display: table-header-group; }
  .print-layout > tfoot { display: table-footer-group; }
  .print-layout > tbody { display: table-row-group; }
  .print-layout > thead > tr,
  .print-layout > tfoot > tr,
  .print-layout > tbody > tr { display: table-row; }
  .print-layout > thead > tr > td,
  .print-layout > tfoot > tr > td,
  .print-layout > tbody > tr > td { display: table-cell; }

  .print-spacer { display: table-row-group; }
  .print-spacer-cell { height: 12mm; }
  .print-content-cell { padding: 0 15mm; }

  main {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  section {
    padding: 18px 0 20px;
    border-bottom: 1.5px solid #D1D5DB;
  }

  #experiencia {
    padding-top: 16px;
    border-bottom: none;
  }

  #competencias {
    break-before: page;
    page-break-before: always;
    padding-top: 2px;
    padding-bottom: 34px;
  }

  #formacao {
    padding-top: 34px;
    border-bottom: none;
  }

  .print-cv-header {
    display: block;
    padding-bottom: 16px;
    border-bottom: 2px solid #FF6023;
    margin-bottom: 6px;
  }

  .print-cv-name {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #111827;
  }

  .print-cv-title {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: #FF6023;
    margin-top: 2px;
    margin-bottom: 5px;
  }

  .print-cv-contact {
    font-family: var(--font-mono);
    font-size: 9px;
    color: #4B5563;
    margin-bottom: 9px;
  }

  .print-cv-summary {
    font-size: 10.5px;
    color: #374151;
    line-height: 1.5;
  }

  .section-head {
    margin-bottom: 13px;
    break-after: avoid;
    page-break-after: avoid;
  }
  h2 { font-size: 14px; }
  .section-index { font-size: 11px; }
  .section-note { font-size: 10px; }

  .exp-list { gap: 17px; }
  .exp-item { gap: 14px; break-inside: avoid; }
  .exp-period { font-size: 9.5px; padding-top: 2px; }
  .exp-company { font-size: 11.5px; }
  .exp-role { font-size: 10px; margin-bottom: 4px; }
  .exp-bullets { font-size: 10px; gap: 3px; }
  .exp-bullets li { padding-left: 12px; }
  .exp-bullets li::before { top: 6.5px; width: 5px; height: 0; border-top: 1.5px solid #9CA3AF; background: none; }

  .earlier-list {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    margin-top: 16px;
    padding-top: 12px;
  }
  .earlier-row { gap: 14px; font-size: 10px; break-inside: avoid; }
  .earlier-period { font-size: 9.5px; }
  .earlier-note { font-size: 9.5px; }

  .spec-table { border-top: none; }
  .spec-row { gap: 14px; padding: 11px 0; border-bottom: none; break-inside: avoid; }
  .spec-label { font-size: 10px; }
  .spec-content { font-size: 10.5px; line-height: 1.5; }
  .spec-core-line { margin-bottom: 2px; }
  .edu-list { gap: 10px; }
  .edu-year { font-size: 9.5px; }
}

@media (max-width: 720px) {
  .hero-meta,
  .pipeline-nodes,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .exp-item,
  .earlier-row,
  .spec-row,
  .article-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .earlier-toggle {
    margin-left: 0;
  }

  .footer-right {
    text-align: left;
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }
}
