:root {
  color-scheme: dark;
  --bg: #0f0f12;
  --bg-alt: #141418;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --text: #f8f8ff;
  --muted: #9ba1c7;
  --brand: #8b7bff;
  --brand-strong: #5ce1e6;
  --accent: linear-gradient(135deg, #8b7bff, #33ffd1);
  --border: rgba(255, 255, 255, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 12px;
}

body[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-alt: #ffffff;
  --surface: rgba(12, 12, 22, 0.04);
  --surface-strong: rgba(12, 12, 22, 0.08);
  --text: #101226;
  --muted: #5b607d;
  --brand: #4f46e5;
  --brand-strong: #06b6d4;
  --border: rgba(4, 5, 15, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
  background-attachment: fixed;
  background-size: 220px;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.2rem, 4vw, 2.5rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 5rem);
}
img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1.25rem, 3vw, 4rem);
  background: rgba(5, 6, 13, 0.55);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  z-index: 10;
}

body[data-theme='light'] .site-header {
  background: rgba(255, 255, 255, 0.9);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.theme-toggle {
  width: 52px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.3rem;
  cursor: pointer;
  position: relative;
}

.theme-toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  top: 4px;
  left: 5px;
  transition: transform 0.3s ease;
}

body[data-theme='light'] .theme-toggle::after {
  transform: translateX(22px);
}

section {
  position: relative;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.lede {
  font-size: 1.05rem;
  max-width: 45ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.8rem 0;
}

.btn {
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn.primary {
  background-image: var(--accent);
  color: #05060d;
}

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

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

.hero-visual {
  display: grid;
  gap: 1.2rem;
}

.hero-visual > img {
  width: 95%;
  max-width: 420px;
  border-radius: var(--radius-xl);
  display: block;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateX(-1.2cm);
}

.portrait-card {
  border-radius: var(--radius-xl);
  background: rgba(6, 8, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.portrait-card img {
  width: min(100%, 440px);
  border-radius: 28px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.portrait-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.orbit-tags {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.orbit-tags li {
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: var(--surface-strong);
  font-size: 0.85rem;
}


.section-heading {
  max-width: 780px;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  margin: 0.2rem 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.2;
}

.certs {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 5vw, 2.6rem);
  background: var(--surface);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.doc-card,
.award-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.doc-card h3 {
  margin: 0;
}

.doc-card p {
  margin: 0;
  color: var(--muted);
}

.doc-card__preview {
  width: 100%;
  padding-top: 56%;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
}

.media-strip {
  margin: 2rem 0 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
}

.media-strip__track {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
  gap: 0.5rem;
}

.media-strip__group {
  display: flex;
  gap: 0.5rem;
}

.media-strip__track img {
  width: 240px;
  height: 160px;
  object-fit: cover;
  filter: saturate(1.1);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.experience-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.experience-card__photo {
  width: 100%;
  padding-top: 60%;
  background-size: cover;
  background-position: center;
}

.experience-card__body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.timeline {
  display: grid;
  gap: 1.25rem;
}

.timeline-item {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.timeline-item ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.timeline-meta {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.awards,
.projects {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 5vw, 2.6rem);
  background: var(--surface);
}

.award-grid,
.project-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.award-card,
.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.project-card {
  overflow: hidden;
  padding: 0;
}

.project-card > :not(.project-card__media) {
  padding: 0 1.25rem;
}

.project-card > header {
  padding-top: 1.25rem;
}

.project-card dl {
  padding-bottom: 1.25rem;
}

.award-card span {
  font-weight: 600;
  color: var(--brand-strong);
}

.project-meta {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-card dl {
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.project-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.project-card dd {
  margin: 0;
  font-weight: 600;
}

.project-card__media {
  width: 100%;
  margin: 0;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 2rem;
  background: var(--surface);
}

.contact-content {
  display: flex;
  flex-direction: column;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1rem 0 1.5rem;
}

.contact-info a {
  text-decoration: none;
  color: var(--text);
  font-size: 1rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: block;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.form-status {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.2rem;
}

.form-status.success {
  color: var(--brand-strong);
}

.map iframe {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: var(--radius-lg);
  z-index: 1;
}

.map {
  position: relative;
}

.site-footer {
  text-align: center;
  padding: 3rem 1rem 4rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
  }
  main {
    padding: 2rem 1.1rem 3rem;
  }
  .slider {
    grid-template-columns: 1fr;
  }
  .slider-btn {
    order: -1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
