:root {
  --bg: #0c0f14;
  --bg-elevated: #131820;
  --surface: #1a2130;
  --surface-2: #222a3d;
  --text: #e8eaef;
  --muted: #9aa3b2;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #3d8bfd;
  --accent-2: #6aa8ff;
  --accent-soft: rgba(61, 139, 253, 0.15);
  --shadow: 0 18px 56px rgba(0, 0, 0, 0.42);
  --radius: 14px;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(61, 139, 253, 0.12), transparent),
    radial-gradient(800px 400px at 90% 0%, rgba(99, 102, 241, 0.07), transparent), var(--bg);
  min-height: 100vh;
}

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

a:hover {
  color: #93c4ff;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 10001;
  width: auto;
  height: auto;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.wrap {
  width: min(var(--max), 92vw);
  margin: 0 auto;
}

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

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

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

.brand a:hover {
  color: var(--accent-2);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--surface-2);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.2rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

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

.nav-social {
  font-family: var(--font-mono);
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em;
}

/* Hero */
.hero {
  padding: 2.75rem 0 2rem;
}

.hero-split {
  display: grid;
  gap: 2.25rem;
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .hero-split {
    grid-template-columns: 1fr minmax(240px, 320px);
    text-align: left;
  }

  .hero-main .pill-row,
  .hero-main .actions {
    justify-content: flex-start;
  }

  .hero-main .hero-stats {
    margin-inline: 0;
  }
}

@media (max-width: 899px) {
  .hero-split {
    text-align: center;
  }

  .hero-main .pill-row,
  .hero-main .actions {
    justify-content: center;
  }
}

.hero-photo-wrap {
  margin: 0;
  justify-self: center;
}

@media (min-width: 900px) {
  .hero-photo-wrap {
    justify-self: end;
  }
}

.hero-photo {
  display: block;
  width: min(100%, 320px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(61, 139, 253, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), var(--shadow),
    0 0 60px rgba(61, 139, 253, 0.12);
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-2);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.35rem, 5.5vw, 3.05rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.hero-lede {
  margin: 0 auto 1.25rem;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.06rem;
}

@media (min-width: 900px) {
  .hero-lede {
    margin-left: 0;
    margin-right: 0;
  }
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #b3d4ff;
  border: 1px solid rgba(61, 139, 253, 0.25);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  max-width: 520px;
  margin-inline: auto;
}

.stat {
  padding: 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.stat strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}

.stat span {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 1.2rem;
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  border-color: transparent;
  color: #0a0e14;
}

.btn-primary:hover {
  filter: brightness(1.06);
  color: #0a0e14;
}

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

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.marquee-wrap {
  margin-top: 0.5rem;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: linear-gradient(90deg, var(--bg-elevated), var(--surface), var(--bg-elevated));
}

.marquee-inner {
  display: flex;
  gap: 2.5rem;
  padding: 0.85rem 0;
  animation: marquee 42s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
}

.marquee-inner span {
  opacity: 0.9;
}

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

/* Sections */
section {
  padding: 3.25rem 0;
}

.section-anchor {
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1.85rem;
  text-align: center;
}

.section-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subhead {
  margin: 2rem auto 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.prose-block {
  max-width: 70ch;
  margin: 0 auto;
}

.prose-block p {
  margin: 0 0 1rem;
  color: #c5cad4;
}

.value-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.75rem;
}

.chip {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.72rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Skills */
.skills-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.15rem 1.25rem 1rem;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.skill-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  background: var(--surface-2);
  color: #c5cad4;
}

.skill-extra {
  display: none;
  margin-top: 0.35rem;
}

.skill-card.is-expanded .skill-extra {
  display: flex;
}

.skill-toggle {
  margin-top: 0.95rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-2);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skill-toggle:hover {
  color: #93c4ff;
}

/* Highlights */
.cards-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 720px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hl-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.hl-badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.32rem 0.55rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: #b3d4ff;
}

.hl-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.3;
}

.hl-card p {
  margin: 0;
  color: #c5cad4;
  font-size: 0.95rem;
}

.hl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.95rem;
}

/* Experience */
.exp-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 840px) {
  .exp-layout {
    grid-template-columns: minmax(0, 260px) 1fr;
    align-items: start;
    gap: 2rem;
  }
}

.exp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

@media (min-width: 840px) {
  .exp-tabs {
    flex-direction: column;
    position: sticky;
    top: 5.75rem;
  }
}

.exp-tab {
  flex: 1 1 calc(33% - 0.45rem);
  min-height: 2.85rem;
  padding: 0.55rem 0.72rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.22;
  text-align: left;
  cursor: pointer;
}

.exp-tab:hover {
  border-color: rgba(61, 139, 253, 0.35);
  color: var(--text);
}

.exp-tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-2);
}

.exp-pane {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.exp-pane[hidden] {
  display: none !important;
}

.exp-pane-head h3 {
  margin: 0 0 0.15rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.exp-pane-head .meta {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.exp-pane ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #c5cad4;
}

.exp-pane li + li {
  margin-top: 0.48rem;
}

.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
}

.stack-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.28rem 0.48rem;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
}

/* Education */
.edu-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 680px) {
  .edu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.edu-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.edu-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.03rem;
}

.edu-card .place {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.edu-list {
  margin: 0;
  padding-left: 1.05rem;
  font-size: 0.92rem;
  color: #c5cad4;
}

/* CTA */
.cta-strip {
  text-align: center;
  padding: 3rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1e3a5f, #0f766e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eef6ff;
}

.cta-strip h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  font-weight: 700;
}

.cta-strip p {
  margin: 0 auto 1.5rem;
  max-width: 46ch;
  opacity: 0.92;
  font-size: 1rem;
}

.cta-strip .btn-primary {
  background: #fff;
  color: #0f172a;
}

.cta-strip .btn-primary:hover {
  filter: brightness(0.97);
  color: #0f172a;
}

.cta-strip .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.cta-strip .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Footer */
.site-footer {
  margin-top: 1rem;
  padding: 2.85rem 0 3rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--bg), #080a0e);
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2rem;
  }
}

.footer-brand p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 36ch;
}

.footer-links h4,
.footer-expertise h4 {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.footer-links ul,
.footer-expertise ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 0.5rem;
}

.footer-links a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

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

.footer-expertise li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.48rem;
}

.footer-expertise li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--accent);
}

.footer-base {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

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

  .nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 0 1rem 1rem;
    background: rgba(12, 15, 20, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.72rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .exp-tab {
    flex: 1 1 calc(50% - 0.45rem);
  }

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

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .site-header,
  .nav-toggle,
  .skill-toggle,
  .cta-strip .btn,
  .marquee-wrap,
  .skip-link,
  .hero-photo-wrap {
    display: none !important;
  }

  .hero-split {
    grid-template-columns: 1fr;
  }

  .exp-pane {
    display: block !important;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
  }

  .exp-pane[hidden] {
    display: none !important;
  }
}
