/* ============================================================
   Renukadevi Chuppala — Portfolio
   Plain CSS, mobile-first. Three palettes (navy / teal / indigo)
   selected via <html data-palette="...">, light + dark themes.
   ============================================================ */

/* ---------- Palette definitions (light + dark accent sets) ---------- */
/* Option A — Midnight Navy & Gold (default) */
:root,
:root[data-palette="navy"] {
  --_accent-l: #1a4e8a;        /* links, highlights */
  --_accent-strong-l: #14365c; /* primary buttons, chips text */
  --_accent-soft-l: #e9f0f9;   /* chip / icon backgrounds */
  --_accent2-l: #b98a1e;       /* decorative gold */
  --_accent-d: #85b6e8;
  --_accent-strong-d: #2e5f96;
  --_accent-soft-d: #1a2a3f;
  --_accent2-d: #d4ab55;
}

/* Option B — Slate & Teal */
:root[data-palette="teal"] {
  --_accent-l: #0f766e;
  --_accent-strong-l: #115e59;
  --_accent-soft-l: #e2f1ef;
  --_accent2-l: #d97706;
  --_accent-d: #53d1c1;
  --_accent-strong-d: #0f766e;
  --_accent-soft-d: #133330;
  --_accent2-d: #e5a84b;
}

/* Option C — Graphite & Indigo */
:root[data-palette="indigo"] {
  --_accent-l: #4f46e5;
  --_accent-strong-l: #4338ca;
  --_accent-soft-l: #eceafc;
  --_accent2-l: #9333ea;
  --_accent-d: #a5b4fc;
  --_accent-strong-d: #4f46e5;
  --_accent-soft-d: #232345;
  --_accent2-d: #c084fc;
}

/* ---------- Theme tokens: light (default) ---------- */
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --bg-alt: #eff2f6;
  --surface: #ffffff;
  --text: #1b2434;
  --muted: #4c5b72;
  --border: #dfe4ec;
  --shadow: 0 1px 2px rgba(15, 30, 60, 0.06), 0 8px 24px rgba(15, 30, 60, 0.07);
  --shadow-lift: 0 2px 4px rgba(15, 30, 60, 0.08), 0 14px 34px rgba(15, 30, 60, 0.12);
  --accent: var(--_accent-l);
  --accent-strong: var(--_accent-strong-l);
  --accent-soft: var(--_accent-soft-l);
  --accent-2: var(--_accent2-l);
  --on-accent: #ffffff;
}

/* ---------- Dark theme (system preference, unless user chose light) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1320;
    --bg-alt: #101828;
    --surface: #151e2d;
    --text: #e8edf5;
    --muted: #a3b0c5;
    --border: #273246;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.4), 0 14px 34px rgba(0, 0, 0, 0.5);
    --accent: var(--_accent-d);
    --accent-strong: var(--_accent-strong-d);
    --accent-soft: var(--_accent-soft-d);
    --accent-2: var(--_accent2-d);
  }
}

/* ---------- Dark theme (explicit user choice) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1320;
  --bg-alt: #101828;
  --surface: #151e2d;
  --text: #e8edf5;
  --muted: #a3b0c5;
  --border: #273246;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.4), 0 14px 34px rgba(0, 0, 0, 0.5);
  --accent: var(--_accent-d);
  --accent-strong: var(--_accent-strong-d);
  --accent-soft: var(--_accent-soft-d);
  --accent-2: var(--_accent2-d);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

a {
  color: var(--accent);
}

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

.container {
  width: min(1080px, 92%);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent-strong);
  color: var(--on-accent);
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-name {
  font-size: 0.98rem;
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle-bar {
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -6px;
}

.nav-toggle-bar::after {
  top: 6px;
}

.nav-open .nav-toggle-bar {
  background: transparent;
}

.nav-open .nav-toggle-bar::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle-bar::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-right {
  display: none;
}

.nav-open .nav-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.9rem 4%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-links a[aria-current="true"] {
  color: var(--accent);
  font-weight: 600;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

/* moon shown in light mode ("switch to dark"), sun in dark mode */
.icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}

@media (min-width: 980px) {
  .nav-toggle {
    display: none;
  }

  .nav-right,
  .nav-open .nav-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav-links {
    flex-direction: row;
    gap: 0.15rem;
  }

  .nav-links a {
    padding: 0.45rem 0.7rem;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn-primary {
  background: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: var(--shadow);
}

.btn-secondary {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

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

@media (hover: hover) {
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(700px 380px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(600px 340px at -10% 110%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 70%),
    var(--bg);
}

.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-copy {
  max-width: 780px;
}

@media (min-width: 980px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* ---------- Hero terminal ---------- */
.term {
  background: #0a0f1a;
  border: 1px solid #273246;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(5, 10, 25, 0.45);
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  max-width: 520px;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid #1c2739;
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.term-dot-r { background: #ff5f57; }
.term-dot-y { background: #febc2e; }
.term-dot-g { background: #28c840; }

.term-title {
  margin-left: 8px;
  font-size: 0.7rem;
  color: #55637a;
}

.term-body {
  padding: 14px 16px 18px;
  min-height: 158px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  color: #e8edf5;
}

.term-body .t-prompt { color: #6ee7b7; }
.term-body .t-out { color: #e8edf5; }
.term-body .t-accent { color: #a5b4fc; }

.term-caret {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #a5b4fc;
  vertical-align: text-bottom;
  animation: term-blink 1s steps(1) infinite;
}

@keyframes term-blink {
  50% { opacity: 0; }
}

.hero-kicker {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-name {
  margin: 0;
  font-size: clamp(2.4rem, 7.5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-role {
  margin: 0.7rem 0 0;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
  color: var(--accent);
}

.hero-role::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 1rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.hero-tagline {
  margin: 1.3rem 0 0;
  max-width: 58ch;
  font-size: 1.06rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-companies {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin: 2.6rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.hero-companies .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(3.2rem, 8vw, 5.5rem) 0;
  scroll-margin-top: 76px;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0 0 2.2rem;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-index {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.section-title-center {
  justify-content: center;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 2rem;
}

.about-text p {
  margin: 0 0 1.1rem;
  max-width: 62ch;
  font-size: 1.03rem;
  color: var(--muted);
}

.about-text strong {
  color: var(--text);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0;
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.stat dd {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.15;
}

.stat dt {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

@media (min-width: 880px) {
  .about-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
  }
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  gap: 1.1rem;
}

.skill-card {
  padding: 1.35rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .skill-card:hover,
  .highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
  }
}

.skill-card h3 {
  margin: 0 0 0.9rem;
  font-size: 1.02rem;
  font-weight: 700;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip-list li {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
}

:root[data-theme="dark"] .chip-list li {
  color: var(--accent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip-list li {
    color: var(--accent);
  }
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  margin: 0;
  padding: 0.2rem 0 0 1.7rem;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 15%, transparent));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.4rem;
}

.timeline-item:last-child {
  padding-bottom: 0.4rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -1.7rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-head h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.timeline-head .company {
  color: var(--accent);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin: 0.5rem 0 0.9rem;
}

.badge {
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

:root[data-theme="dark"] .badge {
  color: var(--accent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge {
    color: var(--accent);
  }
}

.badge-current {
  background: var(--accent-strong);
  color: var(--on-accent);
}

:root[data-theme="dark"] .badge-current {
  color: var(--on-accent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-current {
    color: var(--on-accent);
  }
}

.place {
  font-size: 0.88rem;
  color: var(--muted);
}

.timeline-bullets {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.timeline-bullets li {
  margin-bottom: 0.45rem;
  font-size: 0.99rem;
}

.timeline-bullets li::marker {
  color: var(--accent);
}

@media (min-width: 880px) {
  .timeline {
    padding-left: 2.2rem;
  }

  .timeline-item::before {
    left: -2.2rem;
  }
}

/* ---------- Career highlights ---------- */
.highlights-grid {
  display: grid;
  gap: 1.1rem;
}

.highlight-card {
  padding: 1.5rem 1.5rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.highlight-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.highlight-card h3 {
  margin: 0 0 0.15rem;
  font-size: 1.08rem;
  font-weight: 700;
}

.highlight-org {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.highlight-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
}

.case-link {
  margin-top: 0.9rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}

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

@media (min-width: 700px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Case-study dialog ---------- */
/* Native disclosures keep case studies available without JavaScript. */
.highlights-grid { align-items: start; }
.case-study { margin-top: 1.1rem; }
.case-study summary {
  width: fit-content;
  padding: 0.4rem 0;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.case-study summary:hover { text-decoration: underline; }
.case-study-body { padding-top: 0.4rem; }
.case-study-body h4 { margin: 1rem 0 0.35rem; font-size: 0.9rem; }
.case-study-body p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- Personal projects ---------- */
.projects-grid {
  display: grid;
  gap: 1.1rem;
}

.project-card {
  padding: 1.5rem 1.5rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
  }
}

.project-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 700;
}

.project-card .highlight-desc {
  margin-bottom: 1rem;
}

.projects-more {
  margin: 1.6rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.projects-more a {
  font-weight: 600;
}

@media (min-width: 700px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Education ---------- */
.education-grid {
  display: grid;
  gap: 1.1rem;
}

.education-card {
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.education-card .degree {
  margin: 0 0 0.25rem;
  font-weight: 700;
  font-size: 1.03rem;
}

.education-card .school {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 700px) {
  .education-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Contact ---------- */
.section-contact {
  background:
    radial-gradient(600px 320px at 50% 120%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    var(--bg);
}

.contact-inner {
  text-align: center;
}

.contact-lede {
  max-width: 52ch;
  margin: 0 auto 1.8rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.contact-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
}

/* ---------- Progressive enhancement ---------- */
.nav-toggle, .theme-toggle { display: none; }
.nav-ready .nav-toggle, .theme-ready .theme-toggle { display: grid; }
html:not(.nav-ready) .nav { flex-wrap: wrap; padding-block: 0.75rem; }
html:not(.nav-ready) .nav-right { display: block; width: 100%; }
html:not(.nav-ready) .nav-links { flex-direction: row; flex-wrap: wrap; }
@media (min-width: 980px) {
  .nav-ready .nav-toggle { display: none; }
  html:not(.nav-ready) .nav-right { width: auto; }
}

.reveal.is-revealing { animation: reveal-in 0.55s ease both; }
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.project-preview { margin: 0 0 1.2rem; }
.project-preview a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.project-preview img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.project-preview figcaption { margin-top: 0.45rem; color: var(--muted); font-size: 0.78rem; }
.project-source { display: inline-block; margin-top: 1.1rem; padding-block: 0.4rem; font-size: 0.9rem; font-weight: 600; }
.timeline-dates { white-space: nowrap; }
.term-body { min-height: 235px; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.error-content { width: min(100%, 36rem); }
.error-content h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.2; }
.error-content p { color: var(--muted); }

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

@media print {
  .site-header, .hero-terminal, .hero-actions, .contact-actions { display: none; }
  body { background: white; color: black; }
  .section { padding: 1.5rem 0; }
  .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
  a { color: inherit; }
}

.earlier-experience > summary { cursor: pointer; font-size: 1.1rem; font-weight: 700; padding-block: 0.35rem; }
.earlier-role { margin-top: 1.5rem; }
