:root {
  color-scheme: dark;
  --bg: #06070b;
  --bg-accent: #0d1118;
  --surface: rgba(17, 21, 29, 0.92);
  --surface-strong: #161b24;
  --text: #f5f2eb;
  --muted: #9da4b0;
  --accent: #82c5ff;
  --accent-strong: #5ab3ff;
  --border: rgba(255, 255, 255, 0.09);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(130, 197, 255, 0.15), transparent 30%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-accent) 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

::selection {
  background: rgba(130, 197, 255, 0.3);
  color: white;
}

img {
  max-width: 100%;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.athena-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dashed;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.athena-link:hover {
  color: var(--accent-strong);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  backdrop-filter: blur(16px);
  background: rgba(6, 7, 11, 0.76);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--text);
}

.brand-photo {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 180ms ease;
}

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

.nav-links a.active {
  position: relative;
  font-weight: 600;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
}

main {
  width: min(1020px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 3.2rem 0;
}

.hero {
  padding-top: 4.5rem;
  padding-bottom: 1.2rem;
}

#about {
  padding: 1.6rem 0;
}

#experience {
  padding-top: 1.6rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  max-width: 760px;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  letter-spacing: -0.02em;
}

.hero-copy,
.intro-copy,
.supporting-text {
  margin-top: 1rem;
  font-size: 1.07rem;
  color: var(--muted);
  max-width: 700px;
}

.hero .hero-copy {
  max-width: 820px;
  color: #e8e4da;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 500;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--border);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(130, 197, 255, 0.4);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #07111b;
  border-color: transparent;
  font-weight: 700;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.section-heading {
  margin-bottom: 1.8rem;
}

#about .section-heading {
  margin-bottom: 0.6rem;
}

#about .intro-copy {
  margin-top: 0.25rem;
}

.company-card,
.role-card,
.education-card,
.education-details,
.stat-card,
.skill-group,
.philosophy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.company-card {
  margin-top: 1rem;
}

.company-card.featured-project {
  border-color: rgba(130, 197, 255, 0.35);
  background: linear-gradient(135deg, rgba(130, 197, 255, 0.08), rgba(130, 197, 255, 0.02));
}

.company-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.company-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(130, 197, 255, 0.14);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.role-stack {
  display: grid;
  gap: 1rem;
}

.role-entry {
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.role-entry:first-child {
  padding-top: 0;
  border-top: 0;
}

.initiative-stack {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.initiative-card {
  padding: 0.95rem 1rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.initiative-card h5 {
  margin: 0 0 0.45rem;
  color: #e8e4da;
  font-size: 0.98rem;
}

.role-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.role-entry h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #e8e4da;
}

.role-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.education-details {
  margin-top: 1rem;
}

.education-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.education-details summary::-webkit-details-marker {
  display: none;
}

.education-summary-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.education-toggle {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.education-detail-content {
  padding-top: 0.85rem;
}

.personality-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.personality-list span {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.skill-group h3 {
  margin-bottom: 0.6rem;
  font-size: 1rem;
  color: #e8e4da;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0.2rem 0;
  color: var(--muted);
  min-width: 0;
}

.skill-context {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.18rem 0.45rem;
  border: 1px solid rgba(130, 197, 255, 0.25);
  border-radius: 999px;
  background: rgba(130, 197, 255, 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.philosophy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.role-card,
.education-card,
.stat-card,
.skill-group {
  margin-top: 1rem;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.role-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.9rem;
}

.role-header-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.45rem;
}

.role-title,
.date,
.degree,
.meta {
  color: var(--muted);
}

.role-headline {
  font-size: 1.07rem;
  margin: 0 0 1rem;
  color: #e8e4da;
}

.role-highlights {
  padding-left: 1rem;
  margin: 0;
  color: var(--muted);
}

.role-highlights li + li {
  margin-top: 0.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.4rem;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(130, 197, 255, 0.35);
  background: linear-gradient(135deg, rgba(130, 197, 255, 0.08), rgba(130, 197, 255, 0.02));
}

.stat-card strong {
  font-size: 2rem;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.stat-card .contribution-title {
  font-size: 1.08rem;
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--text);
}

.stat-card span {
  color: var(--muted);
}

.stat-detail {
  margin-top: 0.2rem;
  font-size: 0.92rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-list a {
  color: var(--accent);
  font-weight: 600;
}

.hero-meta {
  margin-top: 1.3rem;
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 760px;
}

.education-card + .education-card {
  margin-top: 1rem;
}

.education-transition {
  margin: 0.85rem 0;
  color: var(--muted);
}

.footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1050px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .stats-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-nav {
    padding: 0.9rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  main {
    width: min(100% - 1.2rem, 1000px);
  }

  .section {
    padding: 3.2rem 0;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .role-header {
    flex-direction: column;
  }

  .role-header-meta {
    align-items: flex-start;
  }

  .stats-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .company-header,
  .role-entry-header {
    flex-direction: column;
  }
}
