/* ── Variables ── */
:root {
  --bg:        #0a0c10;
  --bg2:       #10131a;
  --bg3:       #171b24;
  --text:      #ede9e3;
  --text-muted:#6b6760;
  --accent:    #c85f28;
  --accent-dk: #a84e1e;
  --blue:      #2d6dd4;
  --blue-dk:   #1f57b8;
  --border:    #1c2030;
  --navy:      #0a0c10;
  font-size: 16px;
}

body.light-mode {
  --bg:        #faf8f5;
  --bg2:       #ffffff;
  --bg3:       #f3ede6;
  --text:      #1a1410;
  --text-muted:#6b6257;
  --accent:    #c85f28;
  --accent-dk: #a84e1e;
  --blue:      #2d6dd4;
  --blue-dk:   #1f57b8;
  --border:    #e3d8cc;
  --navy:      #1a1410;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Section labels ── */
.section-eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 2rem;
}

/* ── Nav ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  transition: background 0.3s;
}
body.light-mode .navbar {
  background: rgba(248, 250, 252, 0.92);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.nav-logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.4px;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 0.1rem;
  list-style: none;
  flex: 1;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: var(--accent);
  background: rgba(200,95,40,0.08);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  flex-shrink: 0;
}
.btn-nav-ghost {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-nav-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-nav-primary {
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-nav-primary:hover { background: var(--accent-dk); color: #fff; }

/* hamburger */
.nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 0.4rem; margin-left: auto; flex-shrink: 0;
  flex-direction: column; gap: 5px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Theme toggle ── */
.theme-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: var(--accent);
  border-radius: 28px;
  cursor: pointer;
  transition: background 0.3s;
}
.slider:before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: 4px; bottom: 4px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}
input:checked + .slider:before { transform: translateX(24px); }
.sun { position: absolute; top: 5px; left: 6px; font-size: 13px; transition: opacity 0.3s; }
.moon { position: absolute; top: 5px; right: 6px; font-size: 13px; opacity: 0; transition: opacity 0.3s; }
input:checked + .slider .sun { opacity: 0; }
input:checked + .slider .moon { opacity: 1; }

/* ── Hero ── */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0c10 0%, #0f1018 50%, #0c0e15 100%);
}
body.light-mode .hero {
  background: linear-gradient(135deg, #faf8f5 0%, #f5ece3 60%, #faf8f5 100%);
}
.hero-bg-blob {
  position: absolute;
  width: 700px; height: 700px;
  background:
    radial-gradient(circle at 70% 40%, rgba(200,95,40,0.10) 0%, transparent 55%),
    radial-gradient(circle at 30% 70%, rgba(45,109,212,0.08) 0%, transparent 55%);
  top: -150px; right: -100px;
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}
.hero-text { flex: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16,185,129,0.12);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
}
.hero-badge::before { content: "●"; font-size: 0.5rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.accent { color: var(--accent); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.inline-link { color: var(--accent); font-weight: 600; border-bottom: 1px solid rgba(99,102,241,0.4); transition: border-color 0.15s; }
.inline-link:hover { border-color: var(--accent); }
.hero-ctas { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 0.95rem;
  padding: 0.8rem 1.75rem; border-radius: 10px;
  transition: background 0.15s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--accent-dk); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text);
  font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.75rem; border-radius: 10px;
  border: 1.5px solid var(--border);
  transition: border-color 0.15s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-photo {
  flex-shrink: 0;
}
.hero-photo img {
  width: 220px; height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 8px rgba(200,95,40,0.12);
}

/* ── About ── */
.about-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.about-grid p {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.8;
}

/* ── Skills ── */
.skills-section {
  padding: 5rem 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.skills-groups { display: flex; flex-direction: column; gap: 2rem; }
.skills-group-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  background: var(--bg3);
  color: var(--text);
  border: 1.5px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  transition: border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ── Projects ── */
.projects-section {
  padding: 5rem 0;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.project-featured {
  grid-column: 1 / -1;
}
.project-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(24px);
}
.project-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(200,95,40,0.12);
  transform: translateY(-3px);
}
.project-featured {
  background: linear-gradient(135deg, var(--bg2), var(--bg3));
  border-color: rgba(200,95,40,0.35);
}
.project-card-inner {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}
.project-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.project-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--bg3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag-live {
  background: rgba(45,109,212,0.12);
  color: #5b8fe8;
  border-color: rgba(45,109,212,0.3);
}
.tag-fun {
  background: rgba(200,95,40,0.12);
  color: #d4744a;
  border-color: rgba(200,95,40,0.3);
}
.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.project-featured h3 { font-size: 1.25rem; }
.project-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.project-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.btn-project-primary {
  background: var(--accent); color: #fff;
  font-size: 0.82rem; font-weight: 700;
  padding: 0.45rem 1rem; border-radius: 8px;
  transition: background 0.15s;
  display: inline-block;
}
.btn-project-primary:hover { background: var(--accent-dk); color: #fff; }
.btn-project-ghost {
  background: transparent; color: var(--accent);
  font-size: 0.82rem; font-weight: 700;
  padding: 0.45rem 1rem; border-radius: 8px;
  border: 1.5px solid rgba(200,95,40,0.35);
  transition: background 0.15s, border-color 0.15s;
  display: inline-block;
}
.btn-project-ghost:hover { background: rgba(200,95,40,0.08); border-color: var(--accent); }

/* ── Magic trick ── */
.magic-container { margin-top: 1rem; }
.btn-magic {
  background: var(--accent); color: #fff;
  border: none; cursor: pointer;
  font-size: 0.85rem; font-weight: 700;
  padding: 0.55rem 1.25rem; border-radius: 8px;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s;
  margin-bottom: 1rem;
}
.btn-magic:hover { background: var(--accent-dk); }
.trick-instructions {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.trick-columns {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.column {
  flex: 1;
  min-width: 100px;
  max-width: 140px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.column:hover { border-color: var(--accent); background: rgba(99,102,241,0.07); }
.column-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.card { font-size: 0.78rem; color: var(--text-muted); padding: 0.15rem 0; }


/* ── Footer ── */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer p { font-size: 0.82rem; color: var(--text-muted); }

/* ── Fade-in ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ── Section wrapper ── */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}
.section-alt {
  background: var(--bg2);
}

/* ── Resume button in nav ── */
.btn-nav-resume {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1.5px solid rgba(200,95,40,0.4);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-nav-resume:hover { background: rgba(200,95,40,0.1); border-color: var(--accent); }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 2.5rem; }

.timeline-item {
  display: flex;
  gap: 1.25rem;
}
.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.timeline-dot {
  display: none;
}
.company-logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; color: #fff;
  flex-shrink: 0;
}
.meta-logo     { background: linear-gradient(135deg, #0668E1, #0082FB); }
.company-logo-img {
  width: 42px; height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  padding: 5px;
  flex-shrink: 0;
}
.discover-logo { background: linear-gradient(135deg, #FF6600, #E55A00); }
.abbott-logo   { background: linear-gradient(135deg, #009CDE, #007BB5); }
.research-logo { background: linear-gradient(135deg, #7c3aed, #5b21b6); font-size: 1.1rem; }

.timeline-body { flex: 1; }
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.job-company {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}
.job-title {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.15rem;
}
.job-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}
.job-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.job-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.job-bullets {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.job-bullets li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.job-bullets li strong { color: var(--text); font-weight: 700; }

/* ── Education ── */
.edu-grid { display: flex; flex-direction: column; gap: 1.25rem; }
.edu-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: var(--accent); }
.edu-school-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.edu-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.82rem; color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.gt-logo   { background: linear-gradient(135deg, #B3A369, #8a7a40); }
.uiuc-logo { background: linear-gradient(135deg, #E84A27, #c03a1d); }
.edu-school {
  font-weight: 800;
  font-size: 0.975rem;
  color: var(--text);
}
.edu-degree {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.15rem;
}
.edu-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}
.edu-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.edu-gpa {
  font-size: 0.8rem;
  font-weight: 800;
  color: #5b8fe8;
}
.edu-honors-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.edu-honor {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  background: rgba(45,109,212,0.1);
  color: #5b8fe8;
  border: 1px solid rgba(45,109,212,0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.edu-courses {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.edu-course-label {
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.3rem;
}

/* ── Resume CTA ── */
.resume-cta {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.resume-cta p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Contact ── */
.contact-container { text-align: center; }
.contact-sub {
  color: var(--text-muted);
  font-size: 0.975rem;
  margin-top: -1rem;
  margin-bottom: 2.5rem;
}
.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, color 0.15s;
}
.contact-item:hover { border-color: var(--accent); color: var(--accent); }
.contact-icon {
  font-size: 0.9rem; font-weight: 800;
  color: var(--accent); font-style: normal;
  width: 20px; text-align: center;
}

/* ── Landing Hero ── */
.landing-hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0c10 0%, #0f1018 50%, #0c0e15 100%);
}
.landing-inner {
  display: flex;
  align-items: center;
  gap: 4rem;
}
.landing-photo { flex-shrink: 0; }
.landing-photo img {
  width: 200px; height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 8px rgba(200,95,40,0.12);
}
.landing-text { flex: 1; }
.landing-text h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.08;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.landing-title {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.landing-bio {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 500px;
  margin-bottom: 1.75rem;
}
.landing-ctas {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* ── Landing Nav Cards ── */
.landing-nav-section {
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--border);
}
.landing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  justify-content: center;
}
.landing-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: block;
}
.landing-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(200,95,40,0.12);
}
.landing-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.landing-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.landing-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Inner Page Hero ── */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.page-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-top: 0.25rem;
}
.page-body {
  padding: 3.5rem 0 5rem;
}
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 3.5rem 0;
}

/* ── Book Feature ── */
.book-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}
.book-card {
  display: flex;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.book-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(200,95,40,0.14);
  transform: translateY(-2px);
}
.book-spine {
  width: 7px;
  background: var(--accent);
  flex-shrink: 0;
}
.book-content {
  padding: 2rem 2.5rem;
  flex: 1;
}
.book-tag-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.book-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--bg3);
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.book-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.75px;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.book-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 1.25rem;
}
.book-cta {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
}
.book-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.book-fullscreen {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.book-loading {
  padding: 2rem 0;
  text-align: center;
}
.book-loading-bar {
  width: 100%;
  max-width: 320px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 0.75rem;
  overflow: hidden;
}
.book-loading-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.2s ease;
}
#book-loading-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.book-flip-container {
  width: 100%;
  margin: 0 auto;
}
.book-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding-top: 1.25rem;
}
.book-btn {
  background: var(--bg3);
  color: var(--text);
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.book-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.book-page-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.book-page-input {
  width: 52px;
  padding: 0.35rem 0.5rem;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.book-page-input::-webkit-outer-spin-button,
.book-page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.book-page-input:focus { border-color: var(--accent); }
.book-page-total {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Active nav link ── */
.nav-links a.active {
  color: var(--accent);
  background: rgba(200,95,40,0.08);
}

/* ── Responsive ── */

/* prevent any horizontal overflow site-wide */
html, body { overflow-x: hidden; }
img, iframe, canvas { max-width: 100%; }

@media (max-width: 960px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1.5rem;
    gap: 0;
    z-index: 300;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.6rem 0.5rem; }
  .nav-inner { position: relative; flex-wrap: wrap; }
  .nav-right { gap: 0.4rem; }
  .btn-nav-ghost { display: none; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-featured { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  /* hero (old) */
  .hero { padding: 4rem 0 3.5rem; }
  .hero-inner { flex-direction: column-reverse; gap: 2rem; text-align: center; }
  .hero-sub { max-width: 100%; }
  .hero-ctas { justify-content: center; }
  .hero-photo img { width: 160px; height: 160px; }

  /* landing hero */
  .landing-inner { flex-direction: column-reverse; gap: 2rem; text-align: center; }
  .landing-bio { max-width: 100%; }
  .landing-ctas { justify-content: center; }
  .landing-photo img { width: 150px; height: 150px; }

  /* landing cards — single column, centered */
  .landing-cards {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  /* projects */
  .projects-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: 1; }

  /* contact */
  .contact-links { flex-direction: column; align-items: center; }
  .contact-item { width: 100%; max-width: 360px; justify-content: center; }

  /* timeline */
  .timeline-item { flex-direction: column; gap: 0.75rem; }
  .timeline-left { flex-direction: row; align-items: center; gap: 0.75rem; }
  .timeline-header { flex-direction: column; gap: 0.25rem; }
  .job-meta { align-items: flex-start; }

  /* education */
  .edu-school-row { flex-direction: column; align-items: flex-start; }
  .edu-right { align-items: flex-start; margin-left: 0; }
  .resume-cta { flex-direction: column; align-items: flex-start; }

  /* nav */
  .btn-nav-resume { display: none; }

  /* book section */
  .book-card { flex-direction: column; }
  .book-spine { width: 100%; height: 6px; }
  .book-content { padding: 1.25rem; }
  .book-header { flex-direction: column; gap: 0.75rem; }
  .book-title { font-size: 1.25rem; }
  .book-controls { gap: 0.75rem; }
  .book-btn { padding: 0.6rem 1rem; min-height: 44px; }
  .book-page-input { min-height: 44px; width: 58px; }
}
