/* ==========================================================================
   David Zörb — Personal Website
   Custom stylesheet, no template dependencies
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg:           #0d0d14;
  --bg-alt:       #111120;
  --surface:      #14141f;
  --surface-2:    #1b1b2e;
  --border:       #252538;
  --text:         #e2e2f0;
  --text-muted:   #7878a0;
  --text-subtle:  #4a4a6a;
  --accent:       #1d8cf8;
  --accent-dark:  #1371d9;
  --accent-light: #5ab4ff;
  --accent-glow:  rgba(29, 140, 248, 0.15);
  --accent-glow2: rgba(29, 140, 248, 0.08);
  --edu-accent:   #22d3ee;
  --edu-glow:     rgba(34, 211, 238, 0.15);
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg:    0 8px 48px rgba(0, 0, 0, 0.6);
  --transition:   0.25s ease;
  --nav-height:   64px;
  --max-width:    1100px;
}

/* --------------------------------------------------------------------------
   Light Theme Overrides
   -------------------------------------------------------------------------- */
html.light-theme {
  --bg:           #f4f4f8;
  --bg-alt:       #eeeef5;
  --surface:      #ffffff;
  --surface-2:    #e4e4f0;
  --border:       #d0d0e0;
  --text:         #0d0d14;
  --text-muted:   #3d3d58;
  --text-subtle:  #8888aa;
  --accent-light: #1371d9;
  --accent-glow:  rgba(29, 140, 248, 0.10);
  --accent-glow2: rgba(29, 140, 248, 0.06);
  --edu-accent:   #0891b2;
  --edu-glow:     rgba(8, 145, 178, 0.10);
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg:    0 8px 48px rgba(0, 0, 0, 0.14);
}

/* Override hardcoded rgba values that don't use tokens */
html.light-theme .site-header.is-sticky {
  background: rgba(244, 244, 248, 0.92);
}

html.light-theme .menu-open .site-header {
  background: #f4f4f8;
}

/* Theme toggle icon visibility */
.icon-sun { display: none; }
html.light-theme .icon-sun  { display: block; }
html.light-theme .icon-moon { display: none; }

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

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

ul {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

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

/* --------------------------------------------------------------------------
   Section Headings
   -------------------------------------------------------------------------- */
.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.section-header {
  margin-bottom: 56px;
}

/* --------------------------------------------------------------------------
   Sticky Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  border-bottom: 1px solid transparent;
}

.site-header.is-sticky {
  background: rgba(13, 13, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* When the mobile menu is open, removing backdrop-filter from the header
   is critical: backdrop-filter creates a new stacking context which makes
   the header the containing block for fixed children, trapping the menu
   inside the 64px header and making it invisible / transparent. */
.menu-open .site-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--bg);
}

.site-header .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.nav-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 7px;
  flex-shrink: 0;
  transition: background var(--transition);
}

.nav-logo:hover .nav-logo-mark {
  background: var(--accent-dark);
}

.nav-logo-name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color var(--transition);
}

.nav-logo:hover .nav-logo-name {
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  padding: 8px 14px;
  position: relative;
  transition: color var(--transition);
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

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

.nav-links a:hover::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
}

.nav-links a.is-active {
  color: var(--text);
}

/* Right-side nav button group (theme toggle + hamburger) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background var(--transition);
}

.nav-toggle:hover {
  background: var(--surface-2);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.s-hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* Animated gradient background */
.s-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(29, 140, 248, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(34, 211, 238, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hero-name {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-subtle);
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  height: 44px;
  padding: 0 24px;
  line-height: 1;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

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

.btn-outline:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-glow2);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.btn-icon:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-glow2);
  transform: translateY(-1px);
}

.btn-icon svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Hero Stats Strip
   -------------------------------------------------------------------------- */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.hero-stat strong {
  color: var(--accent-light);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}

.about-photo-wrap {
  position: relative;
}

.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: linear-gradient(135deg, var(--accent) 0%, transparent 60%);
  opacity: 0.35;
}

.about-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.025rem;
}

.about-text p:last-of-type {
  margin-bottom: 32px;
}

/* --------------------------------------------------------------------------
   Expertise Areas
   -------------------------------------------------------------------------- */
.expertise-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.expertise-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.expertise-pill:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: var(--accent-glow2);
}

.expertise-pill svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Career Section — Vertical Timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent), 0 0 12px var(--accent-glow);
  z-index: 1;
}

.timeline-item--edu .timeline-dot {
  background: var(--edu-accent);
  box-shadow: 0 0 0 2px var(--edu-accent), 0 0 12px var(--edu-glow);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.timeline-item--edu .timeline-card:hover {
  border-color: var(--edu-accent);
  box-shadow: 0 4px 24px var(--edu-glow);
}

.timeline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.timeline-period {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.timeline-item--edu .timeline-period {
  color: var(--edu-accent);
  background: var(--edu-glow);
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-weight: 500;
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.timeline-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.timeline-subsection-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--edu-accent);
  margin: 48px 0 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-subsection-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --------------------------------------------------------------------------
   Certifications Grid
   -------------------------------------------------------------------------- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px 24px;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  user-select: none;
}

.cert-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 32px var(--accent-glow);
  transform: translateY(-3px);
}

.cert-badge {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin: 0 auto 20px;
  border-radius: 8px;
}

.cert-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 12px;
}

.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 20px;
}

/* --------------------------------------------------------------------------
   Modal (native <dialog>)
   -------------------------------------------------------------------------- */
.cert-dialog {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  max-width: 540px;
  width: calc(100% - 48px);
  padding: 0;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.22s ease;
  /* Force centering across all browsers */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.cert-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 14px)) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.dialog-inner {
  padding: 32px;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.dialog-badge {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}

.dialog-title-group {
  flex: 1;
}

.dialog-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.dialog-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 20px;
}

.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}

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

.btn-sm {
  height: 36px;
  padding: 0 18px;
  font-size: 0.85rem;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--surface);
  transform: none;
}

/* --------------------------------------------------------------------------
   Awards Section
   -------------------------------------------------------------------------- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.award-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.award-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.award-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.award-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.award-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.s-contact {
  text-align: center;
}

.s-contact .section-intro {
  margin: 0 auto 32px;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  transition: color var(--transition);
}

.contact-email:hover {
  color: var(--accent-light);
}

.contact-cta {
  display: flex;
  justify-content: center;
}

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

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.footer-made {
  font-size: 0.75rem;
  color: var(--text-subtle);
  opacity: 0.7;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.footer-social a:hover {
  color: var(--accent-light);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   Back to Top
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition);
  text-decoration: none;
}

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

.back-to-top:hover {
  background: var(--accent-dark);
  color: #fff;
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Scroll Animations
   -------------------------------------------------------------------------- */
.js-loaded .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js-loaded .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  /* Nav mobile */
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 32px 24px;
    gap: 8px;
    border-top: 1px solid var(--border);
    z-index: 99;
    overflow-y: auto;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    display: block;
    width: 100%;
    font-size: 1.125rem;
    font-weight: 500;
    padding: 18px 24px;
    border-radius: 10px;
    color: var(--text-muted);
    text-align: center;
  }

  .nav-links a:hover,
  .nav-links a.is-active {
    background: var(--surface-2);
    color: var(--text);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-logo-name {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Hero */
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .btn {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .btn-icon {
    flex: 0 0 44px;
    width: 44px;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-photo-wrap {
    max-width: 200px;
  }

  /* Timeline */
  .timeline {
    padding-left: 24px;
  }

  .timeline-card {
    padding: 22px 20px;
  }

  .timeline-dot {
    left: -24px;
    width: 14px;
    height: 14px;
  }

  .timeline::before {
    left: 6px;
  }

  /* Certs */
  .certs-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  /* Awards */
  .awards-grid {
    grid-template-columns: 1fr;
  }

  /* Footer — already centered by default, no override needed */
}

@media (max-width: 480px) {
  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
