:root {
  --bg: #0b0d12;
  --bg-soft: #10131a;
  --surface: rgba(21, 25, 35, 0.82);
  --surface-solid: #151923;
  --border: rgba(255, 255, 255, 0.09);
  --title: #f7f8fc;
  --text: #d5d8e2;
  --muted: #969baa;
  --accent: #a98cf8;
  --accent-2: #55d8e8;
  --accent-soft: rgba(169, 140, 248, 0.12);
  --gradient: linear-gradient(120deg, #a98cf8, #55cce8);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Sora", var(--font-body);
}

.light-theme {
  --bg: #f6f7fb;
  --bg-soft: #eef0f6;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-solid: #fff;
  --border: rgba(26, 31, 48, 0.1);
  --title: #111525;
  --text: #303648;
  --muted: #687084;
  --accent: #7356d8;
  --accent-2: #128ba3;
  --accent-soft: rgba(115, 86, 216, 0.1);
  --gradient: linear-gradient(120deg, #7356d8, #159db8);
  --shadow: 0 28px 70px rgba(32, 39, 64, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s, color 0.35s;
}

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

ul {
  list-style: none;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 200;
  padding: 0.7rem 1rem;
  border-radius: 0 0 10px 10px;
  background: var(--accent);
  color: #fff;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

.cv-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(18px);
}

.cv-nav__inner {
  display: flex;
  width: min(1180px, calc(100% - 3rem));
  min-height: 72px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cv-nav__brand,
.cv-nav__actions,
.nav-button,
.icon-button {
  display: inline-flex;
  align-items: center;
}

.cv-nav__brand {
  gap: 0.65rem;
  color: var(--title);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
}

.cv-nav__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
}

.cv-nav__actions {
  gap: 0.65rem;
}

.nav-button {
  min-height: 40px;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(115, 86, 216, 0.2);
  transition: transform 0.25s, box-shadow 0.25s;
}

.nav-button--quiet {
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 25px rgba(115, 86, 216, 0.28);
}

.nav-button--quiet:hover {
  color: var(--accent);
  box-shadow: none;
}

.nav-button svg,
.theme-icon {
  width: 17px;
  height: 17px;
}

.icon-button {
  width: 40px;
  height: 40px;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  transition: color 0.2s, background-color 0.2s;
}

.icon-button:hover {
  background: var(--surface);
  color: var(--accent);
}

.theme-icon--sun {
  display: none;
}

.light-theme .theme-icon--sun {
  display: block;
}

.light-theme .theme-icon--moon {
  display: none;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.ambient--one {
  top: 7rem;
  right: -9rem;
  width: 30rem;
  height: 30rem;
  background: rgba(113, 77, 220, 0.15);
}

.ambient--two {
  bottom: 5%;
  left: -8rem;
  width: 24rem;
  height: 24rem;
  background: rgba(29, 170, 194, 0.1);
}

.cv-shell {
  width: min(1180px, calc(100% - 3rem));
  margin: clamp(2.5rem, 6vw, 5rem) auto 5rem;
}

.cv-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: 2rem;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.cv-hero::after {
  position: absolute;
  right: -10%;
  bottom: -80%;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: var(--gradient);
  content: "";
  filter: blur(80px);
  opacity: 0.12;
  pointer-events: none;
}

.cv-hero__monogram {
  display: grid;
  width: clamp(84px, 10vw, 120px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--gradient);
  color: #fff;
  font: 700 clamp(1.5rem, 4vw, 2.25rem)/1 var(--font-display);
  letter-spacing: -0.05em;
  box-shadow: 0 18px 45px rgba(111, 83, 210, 0.26);
  transform: rotate(-3deg);
}

.eyebrow {
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.cv-hero h1 {
  margin-bottom: 0.8rem;
  color: var(--title);
  font: 700 clamp(2.2rem, 6vw, 4.5rem)/1.04 var(--font-display);
  letter-spacing: -0.055em;
}

.cv-hero__summary {
  max-width: 68ch;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
}

.availability {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 75%, transparent);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.availability span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43cf91;
  box-shadow: 0 0 0 5px rgba(67, 207, 145, 0.12);
  animation: status-pulse 2.4s ease-in-out infinite;
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.65fr);
  gap: 2rem;
  align-items: start;
}

.cv-sidebar,
.cv-main {
  display: grid;
  gap: 2rem;
}

.cv-card,
.cv-section {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  backdrop-filter: blur(14px);
}

.section-heading {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-heading > span {
  color: var(--accent);
  font: 600 0.7rem/1 var(--font-display);
  letter-spacing: 0.08em;
}

.section-heading h2 {
  color: var(--title);
  font: 600 0.95rem/1.2 var(--font-display);
  letter-spacing: -0.02em;
}

.section-heading::after {
  height: 1px;
  flex: 1;
  background: var(--border);
  content: "";
}

.section-heading--large h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.contact-list {
  display: grid;
  gap: 1rem;
  font-style: normal;
}

.contact-list a {
  display: grid;
  gap: 0.08rem;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.82rem;
  transition: color 0.2s, transform 0.2s;
}

.contact-list a span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-list a:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.skill-groups {
  display: grid;
  gap: 1.25rem;
}

.skill-group h3 {
  margin-bottom: 0.55rem;
  color: var(--title);
  font: 600 0.78rem/1.3 var(--font-display);
}

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

.skill-group li {
  padding: 0.28rem 0.58rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 0.69rem;
}

.sidebar-date {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.sidebar-title {
  margin-bottom: 0.4rem;
  color: var(--title);
  font: 600 0.9rem/1.4 var(--font-display);
}

.sidebar-accent {
  margin-bottom: 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
}

.sidebar-copy,
.cert-list {
  color: var(--muted);
  font-size: 0.76rem;
}

.cert-list {
  display: grid;
  gap: 1rem;
}

.cert-list li {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.5;
}

.cert-list li:last-child {
  padding-bottom: 0;
  border: 0;
}

.cert-list span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 2rem;
  padding-left: 1.55rem;
}

.timeline::before {
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 4px;
  width: 1px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
  content: "";
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  position: absolute;
  top: 0.35rem;
  left: -1.55rem;
  width: 9px;
  height: 9px;
  border: 3px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  content: "";
}

.timeline-item__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline-item__company {
  margin-bottom: 0.2rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
}

.timeline-item h3,
.project-card h3 {
  color: var(--title);
  font: 600 1rem/1.4 var(--font-display);
}

.timeline-item time,
.project-card time {
  flex: none;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
}

.timeline-item ul {
  display: grid;
  gap: 0.45rem;
}

.timeline-item li,
.timeline-item__note {
  position: relative;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.timeline-item li {
  padding-left: 1rem;
}

.timeline-item li::before {
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-2);
  content: "";
}

.timeline-item__note {
  margin: -0.2rem 0 0.65rem;
  font-style: italic;
}

.projects {
  display: grid;
  gap: 1rem;
}

.project-card {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-solid) 60%, transparent);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.project-card__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.project-card__top > span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.project-card h3 span {
  color: var(--muted);
  font-weight: 500;
}

.project-card__meta {
  margin: 0.2rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.project-card__meta a {
  color: var(--accent);
  font-weight: 600;
}

.project-card > p:not(.project-card__meta) {
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.65;
}

.project-card__stack {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.cv-footer {
  display: flex;
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.cv-footer a {
  color: var(--title);
  font-weight: 600;
}

.cv-footer a span {
  color: var(--accent);
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(67, 207, 145, 0.12); }
  50% { box-shadow: 0 0 0 8px rgba(67, 207, 145, 0); }
}

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

  .availability {
    grid-column: 2;
    justify-self: start;
  }

  .cv-layout {
    grid-template-columns: 1fr;
  }

  .cv-sidebar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .cv-nav__inner,
  .cv-shell,
  .cv-footer {
    width: min(100% - 2rem, 1180px);
  }

  .cv-nav__brand > span:last-child,
  .nav-button--quiet {
    display: none;
  }

  .cv-shell {
    margin-top: 1.5rem;
  }

  .cv-hero {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    text-align: left;
  }

  .cv-hero__monogram {
    width: 78px;
  }

  .availability {
    grid-column: 1;
  }

  .cv-sidebar {
    grid-template-columns: 1fr;
  }

  .timeline-item__top,
  .project-card__top,
  .cv-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-item time,
  .project-card time {
    order: -1;
  }
}

@media (max-width: 480px) {
  .cv-nav__inner,
  .cv-shell,
  .cv-footer {
    width: min(100% - 1.5rem, 1180px);
  }

  .cv-nav__inner {
    min-height: 64px;
    gap: 0.5rem;
  }

  .cv-nav__actions {
    gap: 0.45rem;
  }

  .nav-button {
    min-height: 42px;
    padding-inline: 0.8rem;
  }

  .cv-shell {
    margin: 1rem auto 3rem;
  }

  .cv-hero {
    gap: 1.15rem;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border-radius: 22px;
  }

  .cv-hero h1 {
    font-size: clamp(2rem, 13vw, 3rem);
  }

  .cv-hero__summary {
    font-size: 0.925rem;
    line-height: 1.7;
  }

  .availability,
  .eyebrow {
    font-size: 0.8125rem;
  }

  .cv-sidebar,
  .cv-main {
    gap: 1rem;
  }

  .cv-card,
  .cv-section {
    padding: 1.2rem;
    border-radius: 18px;
  }

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

  .section-heading > span,
  .contact-list a span,
  .sidebar-date,
  .cert-list span,
  .timeline-item time,
  .project-card time,
  .project-card__top > span {
    font-size: 0.8125rem;
  }

  .contact-list a,
  .skill-group h3,
  .sidebar-accent,
  .sidebar-copy,
  .cert-list,
  .timeline-item__company,
  .project-card__meta {
    font-size: 0.875rem;
  }

  .skill-group li {
    padding: 0.38rem 0.65rem;
    font-size: 0.8125rem;
  }

  .timeline {
    gap: 1.6rem;
    padding-left: 1.25rem;
  }

  .timeline-item::before {
    left: -1.25rem;
  }

  .timeline-item li,
  .timeline-item__note,
  .project-card > p:not(.project-card__meta),
  .project-card__stack {
    font-size: 0.875rem;
  }

  .project-card {
    padding: 1.15rem;
  }

  .project-card h3 span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .cv-footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    line-height: 1.55;
  }
}

@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;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm 12mm;
  }

  :root,
  .light-theme {
    --bg: #fff;
    --surface: #fff;
    --surface-solid: #fff;
    --border: #dce0e8;
    --title: #101729;
    --text: #2b3448;
    --muted: #525e73;
    --accent: #285caa;
    --accent-2: #287f91;
    --accent-soft: #eef3fb;
  }

  body {
    font-size: 9pt;
    line-height: 1.45;
  }

  .cv-nav,
  .skip-link,
  .ambient,
  .availability,
  .cv-footer {
    display: none;
  }

  .cv-shell {
    width: 100%;
    margin: 0;
    zoom: 0.89;
  }

  .cv-hero {
    grid-template-columns: auto 1fr;
    gap: 6mm;
    margin-bottom: 5mm;
    padding: 5mm 0;
    border: 0;
    border-bottom: 2px solid var(--accent);
    border-radius: 0;
    box-shadow: none;
  }

  .cv-hero__monogram {
    width: 20mm;
    border-radius: 4.5mm;
    box-shadow: none;
  }

  .cv-hero h1 {
    margin-bottom: 1.5mm;
    font-size: 23pt;
  }

  .eyebrow {
    margin-bottom: 1.5mm;
    font-size: 7.8pt;
  }

  .cv-hero__summary {
    font-size: 8.4pt;
    line-height: 1.45;
  }

  .cv-layout {
    grid-template-columns: 0.75fr 1.65fr;
    gap: 6mm;
  }

  .cv-sidebar,
  .cv-main {
    display: block;
  }

  .cv-card,
  .cv-section {
    margin-bottom: 4mm;
    padding: 0;
    border: 0;
    background: #fff;
    break-inside: avoid;
  }

  .cv-section {
    break-inside: auto;
  }

  .section-heading {
    margin-bottom: 2.5mm;
  }

  .section-heading h2,
  .section-heading--large h2 {
    font-size: 10pt;
    text-transform: uppercase;
  }

  .contact-list {
    gap: 1.5mm;
  }

  .contact-list a,
  .sidebar-copy,
  .cert-list,
  .timeline-item li,
  .timeline-item__note,
  .project-card > p:not(.project-card__meta) {
    font-size: 8pt;
    line-height: 1.45;
  }

  .contact-list a span {
    display: none;
  }

  .skill-groups {
    gap: 2.5mm;
  }

  .skill-group h3 {
    margin-bottom: 1.2mm;
    font-size: 7.8pt;
  }

  .skill-group li {
    padding: 0;
    border: 0;
    background: none;
    font-size: 7.3pt;
  }

  .skill-group li:not(:last-child)::after {
    content: ",";
  }

  .cert-list {
    gap: 1.5mm;
  }

  .cert-list li {
    padding: 0;
    border: 0;
  }

  .timeline {
    gap: 4mm;
  }

  .timeline-item h3,
  .project-card h3 {
    font-size: 9pt;
  }

  .timeline-item__top,
  .timeline-item__note {
    margin-bottom: 1.5mm;
  }

  .timeline-item__company,
  .timeline-item time,
  .project-card time,
  .project-card__meta,
  .project-card__top > span,
  .project-card__stack {
    font-size: 7.2pt;
  }

  .timeline-item ul {
    gap: 0;
  }

  .projects {
    gap: 3mm;
  }

  .project-card {
    padding: 3mm;
    border-radius: 2.5mm;
    break-inside: avoid;
  }

  .project-card:hover {
    box-shadow: none;
    transform: none;
  }

  .project-card__meta {
    margin: 0.5mm 0 1.5mm;
  }

  .project-card__stack {
    margin-top: 1.5mm;
    padding-top: 1.5mm;
  }

  .reveal,
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
