/* ── Fonts ── */
@font-face {
  font-family: "Maroni";
  src: url("./assets/fonts/Maroni-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "circular";
  src: url("./assets/fonts/FlowCircular-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens — light (default) ── */
:root {
  --bg:          #faf8f3;
  --bg-card:     #f3f0e8;
  --bg-card-alt: #ede9df;
  --text:        #1c1a16;
  --muted:       rgba(28, 26, 22, 0.58);
  --faint:       rgba(28, 26, 22, 0.35);
  --line:        rgba(28, 26, 22, 0.10);
  --line-strong: rgba(28, 26, 22, 0.20);
  --accent:      #2e1f0e;
  --accent-btn:  #1c1a16;
  --accent-text: #faf8f3;

  --font-display: "Maroni", Georgia, serif;
  --font-body:    "circular", ui-sans-serif, system-ui, sans-serif;

  --w:            min(1280px, calc(100vw - 48px));
  --radius:       1rem;
  --radius-lg:    1.6rem;
  --shadow-card:  0 2px 12px rgba(28, 26, 22, 0.07);
  --shadow-hover:
    -1rem -1rem 1rem -1rem rgba(28, 26, 22, 0.04),
     1rem  1rem 1rem -1rem rgba(28, 26, 22, 0.04),
     0 2rem 3.5rem -2rem rgba(28, 26, 22, 0.28);
  --dur-short:    100ms;
  --dur-mid:      300ms;
  --dur-long:     500ms;
  --dur-entry:    600ms;
  --ease-out:     cubic-bezier(0, 0, 0.3, 1);
}

[data-theme="dark"] {
  --bg:          #120f0a;
  --bg-card:     #1d1710;
  --bg-card-alt: #251d14;
  --text:        #f0ece2;
  --muted:       rgba(240, 236, 226, 0.58);
  --faint:       rgba(240, 236, 226, 0.32);
  --line:        rgba(240, 236, 226, 0.10);
  --line-strong: rgba(240, 236, 226, 0.18);
  --accent:      #c8a97e;
  --accent-btn:  #c8a97e;
  --accent-text: #120f0a;
  --shadow-card:  0 2px 12px rgba(0, 0, 0, 0.30);
  --shadow-hover:
    -1rem -1rem 1rem -1rem rgba(0, 0, 0, 0.12),
     1rem  1rem 1rem -1rem rgba(0, 0, 0, 0.12),
     0 2rem 3.5rem -2rem rgba(0, 0, 0, 0.60);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0.02em;
  transition: background var(--dur-mid) ease, color var(--dur-mid) ease;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ul, dl { margin-top: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }
em { font-style: italic; }

/* ── Layout ── */
.shell {
  width: var(--w);
  margin: 0 auto;
}
.section {
  padding: 72px 0;
}

/* ── Scroll entry animations ── */
.animate-in {
  opacity: 0;
  transform: translateY(2rem);
  animation: slideIn var(--dur-entry) var(--ease-out) forwards;
}
.animate-in--delay  { animation-delay: 0.18s; }
.animate-in--delay2 { animation-delay: 0.34s; }
@keyframes slideIn {
  from { opacity: 0;   transform: translateY(2rem); }
  to   { opacity: 1;   transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity var(--dur-entry) var(--ease-out), transform var(--dur-entry) var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.10s; }
.reveal-d2 { transition-delay: 0.20s; }
.reveal-d3 { transition-delay: 0.30s; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: var(--w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur-mid) ease;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand-bracket { color: var(--accent); font-weight: 300; }
.nav {
  display: flex;
  gap: 32px;
}
.nav a {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color var(--dur-short) ease;
}
.nav a:hover { color: var(--text); }

/* ── Theme toggle ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0;
  width: 44px;
  height: 26px;
  display: flex;
  align-items: center;
  transition: border-color var(--dur-short) ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
}
.theme-toggle-thumb {
  position: absolute;
  left: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text);
  transition: transform var(--dur-mid) var(--ease-out), background var(--dur-mid) ease;
}
[data-theme="dark"] .theme-toggle-thumb { transform: translateX(18px); }

/* ── Eyebrow ── */
.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

/* ── Buttons ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  min-height: 52px;
  padding: 0 2.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: box-shadow var(--dur-short) ease, transform var(--dur-mid) ease, background var(--dur-short) ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  background: var(--accent-btn);
  color: var(--accent-text);
  border-color: var(--accent-btn);
}
.button-primary:hover { box-shadow: 0 8px 24px rgba(28, 26, 22, 0.22); }
[data-theme="dark"] .button-primary:hover { box-shadow: 0 8px 24px rgba(200, 169, 126, 0.22); }
.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.button-ghost:hover { border-color: var(--text); }

/* ── Robot animations ── */
@keyframes r-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}
@keyframes r-blink {
  0%, 88%, 100% { transform: scaleY(1); }
  92%           { transform: scaleY(0.05); }
}
@keyframes r-ant {
  0%, 60%, 100% { opacity: 1; }
  65%, 80%      { opacity: 0; }
}
@keyframes r-wave {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-28deg); }
  70%      { transform: rotate(18deg); }
}
@keyframes bit-float {
  0%   { transform: translateY(0)   rotate(0deg); opacity: 0; }
  20%  { opacity: 0.5; }
  80%  { opacity: 0.3; }
  100% { transform: translateY(-80px) rotate(15deg); opacity: 0; }
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
  min-height: auto;
  padding: 64px 0 72px;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  font-feature-settings: "ss01" on, "ss02" on, "liga" on;
}
.hero-copy h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--muted);
}
.hero-text {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.72;
  max-width: 480px;
  margin-bottom: 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ── Robot ── */
.robot-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.robot-svg {
  width: 200px;
  height: auto;
  color: var(--text);
  filter: drop-shadow(0 12px 28px rgba(28,26,22,0.12));
}
[data-theme="dark"] .robot-svg {
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.40));
}
.r-float  { animation: r-float 4s ease-in-out infinite; }
.r-eye    { transform-box: fill-box; transform-origin: 50% 50%; animation: r-blink 3.8s ease-in-out infinite; }
.r-ant    { animation: r-ant 2s ease-in-out infinite; }
.r-arm    { transform-box: fill-box; transform-origin: 100% 50%; animation: r-wave 2.2s ease-in-out infinite; }

.speech-bubble {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--line-strong);
  border-radius: 14px 14px 14px 4px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.4;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
  z-index: 2;
}
.speech-bubble span { color: var(--muted); font-size: 0.72rem; }

.robot-stamp {
  position: absolute;
  bottom: 20px;
  left: 10px;
  border: 2.5px solid #2e7d32;
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2e7d32;
  line-height: 1.4;
  text-align: center;
  transform: rotate(-12deg);
  opacity: 0.85;
}
[data-theme="dark"] .robot-stamp { color: #4ade80; border-color: #4ade80; }

/* floating binary bits */
.bit {
  position: absolute;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--faint);
  pointer-events: none;
  animation: bit-float 4s ease-in-out infinite;
  opacity: 0;
}
.b1 { left: 18px;  bottom: 80px;  animation-delay: 0s;    animation-duration: 3.6s; }
.b2 { left: 44px;  bottom: 60px;  animation-delay: 0.8s;  animation-duration: 4.2s; }
.b3 { right: 18px; bottom: 80px;  animation-delay: 1.4s;  animation-duration: 3.8s; }
.b4 { right: 44px; bottom: 50px;  animation-delay: 2.0s;  animation-duration: 4.5s; }
.b5 { left: 30px;  bottom: 40px;  animation-delay: 2.8s;  animation-duration: 3.2s; }

/* hero chips */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.hero-chip {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.hero-chip.chip-accent {
  background: var(--accent-btn);
  color: var(--accent-text);
  border-color: transparent;
}

/* ── Panel grid ── */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.panel {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-long) ease, box-shadow var(--dur-long) ease;
}
.panel:hover {
  transform: rotate(1deg);
  box-shadow: var(--shadow-hover);
}
.panel--highlight {
  background: var(--accent-btn);
  color: var(--accent-text);
  border-color: transparent;
}
.panel--highlight .panel-label { color: rgba(240, 236, 226, 0.55); }
.panel--highlight h2 { color: var(--accent-text); }
.panel--highlight p  { color: rgba(240, 236, 226, 0.70); }
.panel--accent { background: var(--bg-card-alt); }
.panel-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.panel h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 6px;
  line-height: 1.1;
}
.panel p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Experience thumbnails ── */
.experience-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
  cursor: pointer;
  transition: border-color var(--dur-mid) ease, box-shadow var(--dur-long) ease, transform var(--dur-long) ease;
  user-select: none;
}
.exp-card:hover {
  border-color: var(--line-strong);
  transform: rotate(1deg);
  box-shadow: var(--shadow-hover);
}
.exp-company {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--text);
}
.exp-top-role {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 4px;
}
.exp-meta {
  font-size: 0.74rem;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.exp-summary-short {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 12px;
}
.exp-hint {
  font-size: 0.74rem;
  color: var(--faint);
  letter-spacing: 0.08em;
}
.exp-card:hover .exp-hint { color: var(--accent); }

/* ── Experience popup overlay ── */
.exp-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 26, 22, 0.55);
  backdrop-filter: blur(10px);
  animation: fadeOverlay 180ms ease forwards;
}
[data-theme="dark"] .exp-overlay {
  background: rgba(4, 3, 2, 0.72);
}
.exp-overlay[hidden] { display: none; }
@keyframes fadeOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.exp-popup {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px rgba(28, 26, 22, 0.30);
  animation: popupIn 220ms cubic-bezier(0, 0, 0.3, 1) forwards;
}
[data-theme="dark"] .exp-popup {
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.60);
}
@keyframes popupIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.exp-popup-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--dur-short) ease, color var(--dur-short) ease;
}
.exp-popup-close:hover { background: var(--line); color: var(--text); }
.exp-popup-header {
  padding: 28px 28px 16px;
  border-bottom: 1px solid var(--line);
}
.exp-popup-company {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 8px;
}
.exp-popup-roles {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}
.exp-popup-role-tag {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.exp-popup-period {
  font-size: 0.78rem;
  color: var(--faint);
}
.exp-popup-meta {
  font-size: 0.76rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}
.exp-popup-body { padding: 16px 28px 8px; }
.exp-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exp-bullets li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}
.exp-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--faint);
}
.exp-bullets li.exp-section-label {
  font-size: 0.74rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  padding-left: 0;
  margin-top: 12px;
  font-weight: 500;
}
.exp-bullets li.exp-section-label::before { content: none; }
.exp-popup-tech {
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0.04em;
  padding: 12px 28px 24px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}

@media (max-width: 900px) {
  .experience-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .experience-list { grid-template-columns: 1fr; }
}

/* ── Section heading ── */
.section-heading { margin-bottom: 48px; }
.section-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ── Cards (shared base) ── */
.card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-long) ease, box-shadow var(--dur-long) ease;
}
.card:hover {
  transform: rotate(0.5deg) translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}
.prose-card p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.78;
  margin: 0;
}
.card-title {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 18px;
}
.bullet-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bullet-list li {
  display: flex;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}
.bullet-list li::before {
  content: "—";
  color: var(--accent);
  flex-shrink: 0;
  font-family: var(--font-display);
}

/* ── Focus ── */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.focus-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-long) ease, box-shadow var(--dur-long) ease;
}
.focus-card:hover {
  transform: rotate(1deg);
  box-shadow: var(--shadow-hover);
}
.focus-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin: 0 0 14px;
}
.focus-copy {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.72;
  margin: 0;
}

/* ── Projects ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.project-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-long) ease, box-shadow var(--dur-long) ease;
}
.project-card:hover {
  transform: rotate(1deg);
  box-shadow: var(--shadow-hover);
}
.project-meta {
  font-size: 0.76rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 10px;
}
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 12px;
  line-height: 1.1;
}
.project-copy {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.68;
  flex: 1;
  margin: 0 0 20px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}
.tag {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
  align-self: flex-start;
  transition: border-color var(--dur-short) ease, gap var(--dur-short) ease;
}
.project-link:hover { border-color: var(--accent); gap: 10px; }

/* ── Contact ── */
.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 56px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.contact-card h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 10px;
}
.contact-copy { font-size: 0.95rem; color: var(--muted); margin: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }

/* ── Footer ── */
.site-footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer p { font-size: 0.85rem; color: var(--faint); margin: 0; }
.site-footer a { color: var(--muted); transition: color var(--dur-short) ease; }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.footer-sep { color: var(--faint); }

/* ── Header full-width background fix ── */
.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur-mid) ease;
}
.site-header {
  position: static;
  border-bottom: none;
  background: transparent;
}

/* ── Responsive ── */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-panel { display: flex; flex-direction: column; align-items: center; }
  .about-grid { grid-template-columns: 1fr; }
  .focus-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .experience-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  :root { --w: min(100vw - 32px, 1280px); }
  .nav { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .nav a { font-size: 0.82rem; padding: 4px 6px; }
  .focus-grid, .projects-grid { grid-template-columns: 1fr; }
  .experience-list { grid-template-columns: 1fr; }
  .contact-card { flex-direction: column; align-items: flex-start; gap: 24px; padding: 28px; }
  .section { padding: 56px 0; }
  .hero { padding: 36px 0 48px; }
  .hero-chips { justify-content: flex-start; }
  .robot-svg { width: 160px; }
  .speech-bubble { font-size: 0.72rem; padding: 6px 10px; }
  .exp-popup { max-height: 90vh; }
  .section-heading { margin-bottom: 32px; }
  .site-footer { flex-direction: column; gap: 6px; text-align: center; }
}
@media (max-width: 480px) {
  .hero-copy h1 { font-size: 2.4rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .card { padding: 22px; }
  .contact-card { padding: 22px; }
  .exp-popup { margin: 8px; }
  .exp-popup-header { padding: 20px 20px 14px; }
  .exp-popup-body  { padding: 14px 20px 6px; }
  .exp-popup-tech  { padding: 10px 20px 18px; }
  .exp-bullets li  { font-size: 0.85rem; }
  .site-header { gap: 12px; padding: 16px 0; flex-wrap: wrap; }
  .brand-name { font-size: 1.1rem; }
  .nav { order: 3; width: 100%; justify-content: flex-start; gap: 14px; }
  .theme-toggle { margin-left: auto; flex-shrink: 0; }
}
