:root {
  --bg: #f6f5ff;
  --surface: #ffffff;
  --surface-strong: #efeefd;
  --text: #0f0f16;
  --muted: #5d5b7c;
  --accent: #6d5dfc;
  --accent-strong: #4432e5;
  --border: rgba(15, 15, 22, 0.08);
  --shadow: 0 10px 40px rgba(64, 56, 133, 0.15);
}

:root.dark {
  --bg: #0c0b15;
  --surface: #161527;
  --surface-strong: #1f1d36;
  --text: #f6f5ff;
  --muted: #b2b0d6;
  --accent: #9b8eff;
  --accent-strong: #c6bfff;
  --border: rgba(246, 245, 255, 0.1);
  --shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "SF Pro Display", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.page {
  min-height: 100vh;
  width: min(1200px, 92vw);
  margin: 0 auto 6rem;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  background: var(--bg);
  z-index: 10;
}

.wordmark {
  font-weight: 600;
  font-size: 1.2rem;
}

.site-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}

#theme-toggle {
  border: none;
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-photo figure {
  margin: 0;
}

.photo-frame {
  border-radius: 32px;
  padding: 0.5rem;
  background: linear-gradient(135deg, rgba(109, 93, 252, 0.35), rgba(68, 50, 229, 0.3));
  box-shadow: var(--shadow);
  min-height: 320px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.photo-frame img {
  width: 100%;
  object-fit: cover;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-photo figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero .eyebrow,
.section .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.cta {
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  background: transparent;
  transition: background 150ms ease, transform 150ms ease;
}

.cta.primary {
  background: var(--text);
  color: var(--bg);
}

.cta:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
}

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

.credential-link {
  display: inline-block;
  margin-top: 1rem;
  text-align: center;
}

.hero-card {
  border-radius: 24px;
  padding: 1.8rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card dl {
  margin: 0;
  display: grid;
  gap: 1rem;
}

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

.hero-card dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.section {
  margin-top: 4.5rem;
}

.section header {
  margin-bottom: 1.5rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

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

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5rem;
}

.timeline-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}

.role {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.subrole {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.6rem 0 0.2rem;
}

.subrole-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.subrole-block:first-of-type {
  margin-top: 0.5rem;
  border-top: none;
  padding-top: 0;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  background: var(--surface-strong);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-strong);
}

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

.project-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.project-card h3 {
  margin-top: 0.3rem;
}

.project-card ul {
  padding-left: 1.2rem;
  margin-top: 0.6rem;
  color: var(--muted);
}

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

.skills-grid article {
  padding: 1.2rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.skills-grid h3 {
  margin-top: 0;
}

.contact {
  text-align: center;
  background: var(--surface);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

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

.contact-panel {
  background: var(--surface);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.contact-panel .cta {
  align-self: flex-start;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section {
    margin-top: 3.5rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
  }
}
