:root {
  color-scheme: dark;
  --bg: #f5f5f7;
  --bg-soft: #ffffff;
  --bg-elevated: rgba(255, 255, 255, 0.8);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #111111;
  --muted: #56565c;
  --line: rgba(17, 17, 17, 0.08);
  --line-strong: rgba(17, 17, 17, 0.14);
  --accent: #4f7db8;
  --accent-strong: #3f6da8;
  --accent-soft: rgba(79, 125, 184, 0.08);
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0f;
  --bg-soft: #111216;
  --bg-elevated: rgba(18, 18, 24, 0.78);
  --surface: rgba(18, 18, 24, 0.76);
  --surface-strong: rgba(24, 24, 30, 0.94);
  --text: #f5f5f7;
  --muted: #c4c4ca;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #7fb2f3;
  --accent-strong: #99c1f7;
  --accent-soft: rgba(127, 178, 243, 0.14);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at top center, rgba(0, 113, 227, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 38%, #f1f2f4 100%);
  color: var(--text);
  letter-spacing: -0.01em;
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at top center, rgba(41, 151, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #050507 0%, var(--bg) 36%, #0f1014 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 18%);
  opacity: 0.6;
}

body[data-theme="dark"]::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 22%);
}

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

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow);
}

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.96rem;
}

.nav-links a,
.contact-links a {
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
}

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: saturate(160%) blur(20px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 56px;
  padding: 56px;
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.52));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

body[data-theme="dark"] .hero {
  background: linear-gradient(180deg, rgba(22, 22, 28, 0.76), rgba(14, 14, 18, 0.86));
}

.eyebrow,
.section-tag,
.floating-card__label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.hero h1,
.section-card h2,
.contact-card h2 {
  margin: 12px 0 16px;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero h1 {
  font-size: clamp(2.9rem, 5.3vw, 5.2rem);
  max-width: 12ch;
}

.lede,
.section-card p,
.timeline-item__body p,
.timeline-item__body li,
.project-card p,
.contact-card p {
  color: var(--muted);
  line-height: 1.72;
}

.lede {
  max-width: 62ch;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0 28px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible,
.filter-chip:hover,
.filter-chip:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--text);
  color: var(--bg-soft);
  border-color: transparent;
  font-weight: 700;
}

body[data-theme="dark"] .button--primary {
  background: var(--text);
  color: #111111;
}

.button--ghost {
  background: transparent;
}

.button--subtle {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.button--subtle:hover,
.button--subtle:focus-visible {
  color: var(--text);
  box-shadow: none;
  transform: none;
}

.button:hover,
.theme-toggle:hover,
.filter-chip:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-facts li,
.project-card,
.section-card,
.contact-card,
.timeline-item,
.hero-note {
  border-radius: 24px;
}

.quick-facts li {
  padding: 16px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
}

body[data-theme="dark"] .quick-facts li {
  background: rgba(255, 255, 255, 0.03);
}

.quick-facts strong {
  display: block;
  font-size: 1.38rem;
  margin-bottom: 8px;
}

.quick-facts span {
  color: var(--muted);
  font-size: 0.93rem;
}

.hero-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.photo-frame {
  position: relative;
  width: min(100%, 390px);
  margin-left: auto;
  padding: 16px;
  border-radius: 38px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.26));
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    0 28px 80px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: perspective(1500px) rotateY(-8deg) rotateX(2deg);
  transform-style: preserve-3d;
  isolation: isolate;
}

body[data-theme="dark"] .photo-frame {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: -18px 18px 28px -18px;
  border-radius: 42px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(176, 202, 235, 0.34));
  border: 1px solid rgba(255, 255, 255, 0.45);
  transform: translateZ(-22px);
  z-index: -2;
}

body[data-theme="dark"] .photo-frame::before {
  background: linear-gradient(135deg, rgba(67, 88, 122, 0.42), rgba(14, 18, 28, 0.2));
  border-color: rgba(255, 255, 255, 0.08);
}

.photo-frame__backdrop {
  position: absolute;
  inset: 28px 18px 18px 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 20%, rgba(127, 178, 243, 0.22), transparent 34%),
    radial-gradient(circle at 80% 24%, rgba(255, 255, 255, 0.82), transparent 28%),
    linear-gradient(180deg, rgba(245, 245, 247, 0.86), rgba(229, 233, 240, 0.5));
  filter: blur(6px);
  z-index: -1;
}

body[data-theme="dark"] .photo-frame__backdrop {
  background:
    radial-gradient(circle at 20% 20%, rgba(127, 178, 243, 0.2), transparent 34%),
    radial-gradient(circle at 80% 24%, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(20, 24, 34, 0.72), rgba(10, 12, 18, 0.38));
}

.photo-frame img {
  position: relative;
  z-index: 1;
  border-radius: 30px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 52% 32%;
  background: var(--surface-strong);
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-note {
  position: absolute;
  max-width: 250px;
  padding: 16px 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.hero-note--top {
  top: 32px;
  left: 18px;
}

.stats-strip,
.projects-grid,
.about-grid {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.stats-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-item {
  padding: 10px 12px;
}

.stat-item__value {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.stat-item__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.about-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.section-card,
.contact-card {
  padding: 34px;
}

.strengths-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.pill-list span,
.project-meta span,
.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
}

.pill-list span,
.project-meta span {
  padding: 10px 14px;
  color: var(--text);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  padding: 10px 14px;
  color: var(--muted);
  cursor: pointer;
}

.filter-chip.is-active {
  background: var(--text);
  color: var(--bg-soft);
  border-color: transparent;
}

body[data-theme="dark"] .filter-chip.is-active {
  color: #111111;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.timeline-item.is-hidden {
  display: none;
}

.timeline-item__meta p,
.timeline-item__meta span {
  margin: 0 0 8px;
  color: var(--muted);
}

.timeline-item__body h3,
.project-card h3 {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.timeline-item__body ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  min-height: 100%;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.contact-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  margin-top: 22px;
}

.contact-links {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 24px;
  border-radius: 26px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.contact-chip:hover,
.contact-chip:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.contact-chip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}

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

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .contact-card,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 34px;
    gap: 28px;
  }

  .hero-visual {
    min-height: auto;
    padding-top: 12px;
  }

  .photo-frame {
    margin: 0 auto;
  }

  .hero-note {
    position: static;
    max-width: none;
  }

  .button--subtle {
    padding-top: 6px;
  }

  .stats-strip,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1200px);
    padding-top: 14px;
  }

  .site-header {
    top: 10px;
    padding: 12px 14px;
    border-radius: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand {
    width: 100%;
    text-align: center;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 16px;
    font-size: 0.95rem;
  }

  .hero,
  .section-card,
  .contact-card {
    padding: 24px;
    border-radius: 28px;
  }

  .hero,
  .hero-copy,
  .hero-visual,
  .section-card,
  .contact-card,
  .section-heading,
  .timeline-item,
  .timeline-item__meta,
  .timeline-item__body,
  .project-card,
  .contact-links,
  .stat-item {
    text-align: center;
  }

  .hero-actions,
  .pill-list,
  .project-meta,
  .contact-actions,
  .timeline-filters {
    justify-content: center;
  }

  .contact-links {
    justify-items: center;
  }

  .timeline-item__body ul {
    padding-left: 0;
    list-style-position: inside;
  }

  .quick-facts,
  .stats-strip,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .quick-facts li {
    text-align: center;
  }

  .photo-badge {
    white-space: normal;
    text-align: center;
    width: calc(100% - 40px);
  }
}
