/* --- Variables --- */
:root {
  --bg: #060d18;
  --bg-elevated: #0c1628;
  --bg-card: #111d32;
  --text: #e8edf5;
  --text-muted: #8b9cb8;
  --accent: #3d9eea;
  --accent-soft: rgba(61, 158, 234, 0.15);
  --gold: #c9a84c;
  --gold-soft: rgba(201, 168, 76, 0.12);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --header-h: 72px;
  --transition: 0.25s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: #6bb5f0; }

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  z-index: 200;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(6, 13, 24, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.nav-logo:hover { color: var(--accent); border-color: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-menu a:hover { color: var(--text); }

.nav-cta {
  padding: 0.5rem 1.1rem !important;
  background: var(--accent-soft);
  color: var(--accent) !important;
  border-radius: 8px;
  border: 1px solid rgba(61, 158, 234, 0.3);
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, var(--accent-soft), transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 80%, var(--gold-soft), transparent 45%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black, transparent);
  opacity: 0.4;
}

.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-title-role {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  font-style: normal;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.hero-role {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 52ch;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #5aadf2;
  color: var(--bg);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 520px;
  margin: 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border);
}

.hero-stats dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.hero-stats dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* --- Sections --- */
.section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header--center {
  text-align: center;
}

.section-header--center .contact-intro {
  margin-inline: auto;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.02em;
}

/* --- About --- */
.about { background: var(--bg-elevated); }

.about-grid {
  display: grid;
  gap: 1.5rem;
}

.about-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 65ch;
}

.about-text strong { color: var(--text); }

/* --- Experience timeline --- */
.timeline-item {
  position: relative;
  padding-left: 1.75rem;
  padding-bottom: 2.5rem;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--text-muted);
}

.timeline-item--current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.timeline-meta time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
}

.timeline-role {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.timeline-org {
  font-size: 0.95rem;
  color: var(--gold);
  margin: 0 0 1rem;
}

.timeline-details {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.timeline-details li {
  margin-bottom: 0.5rem;
}

.timeline-details strong { color: var(--text); }

/* --- Skills --- */
.skills { background: var(--bg-elevated); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.skill-card:hover {
  border-color: rgba(61, 158, 234, 0.35);
  transform: translateY(-2px);
}

.skill-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--accent);
}

.skill-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.skill-card li:last-child { border-bottom: none; }

/* --- Education --- */
.edu-block { margin-bottom: 2.5rem; }

.edu-block:last-child { margin-bottom: 0; }

.edu-block-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.edu-degree {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.edu-honors {
  font-size: 0.9rem;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

.edu-school {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.edu-card time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cert-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.cert-list li strong {
  color: var(--text);
  font-weight: 600;
}

.cert-list li span { font-size: 0.9rem; }

/* --- Contact --- */
.contact {
  background:
    radial-gradient(ellipse 60% 50% at 50% 100%, var(--accent-soft), transparent),
    var(--bg-elevated);
}

.contact-intro {
  color: var(--text-muted);
  max-width: 42ch;
  margin: 1rem auto 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: var(--transition);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

/* --- Footer --- */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li { border-bottom: 1px solid var(--border); }

  .nav-menu a {
    display: block;
    padding: 1rem;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (min-width: 769px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}
