:root {
  --bg: #0c0f14;
  --bg-alt: #121820;
  --surface: #1a2230;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf2;
  --text-muted: #9aa8bc;
  --accent: #3dd6c8;
  --accent-dim: rgba(61, 214, 200, 0.15);
  --accent-glow: rgba(61, 214, 200, 0.35);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 4rem;
  --max: 1120px;
  --narrow: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(61, 214, 200, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(100, 120, 255, 0.06), transparent);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #6ee8dc;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2rem, var(--narrow));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    padding: 1.5rem 2rem 2rem;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 36ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #0a1210;
}

.btn-primary:hover {
  background: #6ee8dc;
  color: #0a1210;
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-meta a {
  color: inherit;
}

.hero-meta a:hover {
  color: var(--accent);
}

.hero-card {
  padding: 2rem;
  background: linear-gradient(145deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.hero-card-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 999px;
}

.hero-card-title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
}

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

.hero-card-tags li {
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-title {
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
}

.prose {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* Certifications */
.cert-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.cert-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
}

.cert-icon {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.5rem 0.4rem;
  background: #ff9900;
  color: #232f3e;
  border-radius: 4px;
}

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

.skill-group {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.skill-group h3 {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-list li {
  padding: 0.35rem 0.7rem;
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.timeline-card header {
  margin-bottom: 0.75rem;
}

.timeline-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.timeline-org {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-card time {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.timeline-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.timeline-card li + li {
  margin-top: 0.4rem;
}

/* Education */
.edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-card {
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.edu-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.edu-school {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.edu-card time {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 500;
}

/* Contact */
.section-contact {
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.contact-block {
  text-align: center;
}

.contact-block .section-title {
  margin-bottom: 1rem;
}

.contact-block .prose {
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-link:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 0 24px var(--accent-dim);
}

.contact-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

@media (min-width: 540px) {
  .contact-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .contact-link {
    flex: 1 1 200px;
    max-width: 280px;
  }
}

/* Footer */
.site-footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--accent);
}

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

  .btn:hover {
    transform: none;
  }
}
