:root {
  --bg-1: #7c5cff;
  --bg-2: #35c5ff;
  --bg-3: #ff74c8;
  --text: #eef1ff;
  --muted: #cdd5ff;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-2: rgba(15, 24, 51, 0.84);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 20%, #1d2a53 0%, #0a1127 45%, #050811 100%);
  overflow-x: hidden;
  line-height: 1.65;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 24px;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid #85ddff;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 12px;
  color: #081127;
  background: #dceaff;
}

.skip-link:focus {
  top: 12px;
}

.aurora {
  position: fixed;
  filter: blur(80px);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

.aurora-1 {
  width: 45vw;
  height: 45vw;
  background: var(--bg-1);
  top: -10vw;
  left: -5vw;
}

.aurora-2 {
  width: 40vw;
  height: 40vw;
  background: var(--bg-3);
  bottom: -12vw;
  right: -8vw;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
  gap: 22px;
  align-content: start;
}

.glass {
  background: linear-gradient(145deg, var(--glass), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}

.glass-soft {
  background: linear-gradient(145deg, var(--glass-2), rgba(10, 18, 40, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.window {
  width: min(1200px, 100%);
  border-radius: 24px;
  overflow: clip;
}

.window-topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.window-title {
  margin: 0;
  font-weight: 600;
  color: #eef2ff;
  letter-spacing: 0.2px;
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.red { background: #ff5f57; }
.yellow { background: #ffbd2e; }
.green { background: #28c840; }

.ghost-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.window-body {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 14px;
  padding: 14px;
}

.window-body > *,
.content > * {
  min-width: 0;
}

.sidebar {
  border-radius: 16px;
  padding: 16px;
  position: sticky;
  top: 20px;
  align-self: start;
}

.sidebar h3,
.sidebar-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1rem;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar a {
  text-decoration: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  transition: 0.2s ease;
  display: block;
  min-height: 44px;
}

.sidebar a:hover,
.sidebar .nav-current {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.nav-group {
  min-width: 0;
}

.nav-submenu {
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 6px 0 0 10px;
  padding: 0 0 0 10px;
  border-left: 1px solid rgba(187, 172, 255, 0.3);
}

.sidebar .nav-submenu a {
  font-size: 0.8rem;
  line-height: 1.45;
}

.sidebar nav + .sidebar-title {
  margin-top: 24px;
}

.widget {
  margin-top: 18px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.label {
  margin: 0;
  color: #9cb1ff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.value {
  margin: 6px 0 0;
  font-weight: 700;
}

.value.ok { color: #65f2a0; }

.content {
  display: grid;
  gap: 14px;
}

.hero {
  padding: 28px;
  border-radius: 16px;
}

.eyebrow {
  margin: 0;
  color: #9db4ff;
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  line-height: 1.2;
}

.home-hero h1 {
  font-size: clamp(2.2rem, 4.7vw, 3.8rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
  margin: 20px 0;
}

.home-page .stage {
  align-content: center;
}

.home-page .home-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(280px, 48vh, 520px);
}

.gradient-text {
  color: #b4c6ff;
  background: linear-gradient(120deg, #cabaff, #78d9ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  font: inherit;
}

.primary,
.secondary {
  border-radius: 14px;
  padding: 10px 16px;
  cursor: pointer;
  border: 0;
}

.primary,
.secondary,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  text-align: center;
}

.primary {
  background: linear-gradient(135deg, #b2a1ff, #65d6ff);
  color: #081127;
  font-weight: 700;
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card {
  border-radius: 14px;
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card h3,
.card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
}

.dock {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
}

.dock-item {
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.18s ease;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.dock-item:hover {
  transform: translateY(-6px) scale(1.08);
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2,
.cv-section h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.approach > .section-heading {
  padding: 16px 6px 0;
}

.card .card-index {
  margin-bottom: 16px;
  color: #b8aaff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.about-section,
.cv-section {
  padding: 28px;
  border-radius: 16px;
}

.section-intro,
.profile-location,
.profile-caption,
.sidebar-note {
  color: var(--muted);
}

.section-intro {
  margin: 0;
  max-width: 70ch;
}

.profile-card {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.profile-card + .profile-card {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.portrait {
  display: block;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  max-width: 100%;
}

.profile-role {
  color: #b9dfff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.profile-card h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.profile-location {
  margin: 10px 0 18px;
  font-size: 0.85rem;
}

.profile-caption {
  font-size: 0.8rem;
  margin: 12px 0 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.tag-list li {
  padding: 5px 10px;
  background: rgba(124, 92, 255, 0.13);
  border: 1px solid rgba(187, 172, 255, 0.25);
  border-radius: 8px;
  color: #e0ddff;
  font-size: 0.75rem;
  font-weight: 500;
}

.text-link {
  color: #c3d6ff;
  text-underline-offset: 4px;
}

.sidebar-note {
  font-size: 0.8rem;
  margin: 20px 0;
}

.sidebar .back-link {
  padding: 10px 0;
  font-size: 0.85rem;
}

.profile-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 20px;
  align-items: center;
  margin-top: 16px;
}

.cv-hero h1 {
  margin-top: 0;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.cv-hero h1 span {
  display: block;
}

.cv-lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.5;
  margin: 24px 0 16px;
}

.cv-intro {
  color: var(--muted);
}

.cv-intro p {
  margin: 12px 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.profile-stats > div {
  padding: 14px;
  border-radius: 12px;
  background: rgba(5, 12, 31, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-stats dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.profile-stats dd {
  margin: 6px 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.3;
}

.editorial-note {
  margin: 24px 0 0;
  padding: 12px 14px;
  border-left: 2px solid #78d9ff;
  background: rgba(5, 12, 31, 0.25);
  color: var(--muted);
  font-size: 0.75rem;
}

.section-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.section-title-row h2 {
  margin-bottom: 0;
}

.compact-btn {
  font-size: 0.75rem;
  padding: 8px 12px;
}

.experience-list {
  margin-top: 14px;
}

.experience-entry {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 0;
}

.experience-entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.experience-entry summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

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

.experience-date,
.experience-company,
.experience-role {
  display: block;
}

.experience-date {
  color: #b5c7ff;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 5px;
}

.experience-company {
  font-size: 1.05rem;
  font-weight: 800;
}

.experience-role {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 3px;
}

.disclosure-mark {
  position: relative;
  width: 28px;
  height: 28px;
  align-self: center;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.disclosure-mark::before,
.disclosure-mark::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 2px;
  top: 12px;
  left: 7px;
  background: var(--muted);
}

.disclosure-mark::after {
  transform: rotate(90deg);
}

.experience-entry[open] .disclosure-mark::after {
  transform: rotate(0);
}

.experience-content {
  margin: 18px 0 0 3px;
  padding: 0 0 0 18px;
  border-left: 2px solid rgba(187, 172, 255, 0.3);
}

.project + .project {
  margin-top: 24px;
}

.project h3,
.skill-card h3,
.language-card h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.project p,
.project ul {
  margin: 8px 0;
}

.project ul,
.values-list {
  padding-left: 20px;
}

.project li + li,
.values-list li + li {
  margin-top: 7px;
}

.project,
.values-list {
  font-size: 0.9rem;
}

.tech-line {
  color: var(--muted);
  font-size: 0.82rem;
}

.skills-grid,
.education-grid,
.language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.skill-card,
.education-card,
.language-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.skill-card p,
.education-card p,
.language-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 8px 0 0;
}

.education-card h3,
.education-card h4 {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 8px 0;
}

.education-grid > .education-card:only-child {
  grid-column: 1 / -1;
}

.education-card .experience-date {
  color: #b5c7ff;
  font-size: 0.75rem;
  margin: 0;
}

.certification-card {
  border-color: rgba(187, 172, 255, 0.35);
  background: rgba(124, 92, 255, 0.08);
}

.subsection-title {
  font-size: 1rem;
  margin: 28px 0 12px;
}

.subsection-title + .education-grid {
  margin-top: 0;
}

.course-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.course-year {
  color: #b5c7ff;
  font-size: 0.8rem;
  font-weight: 700;
}

.course-list h4 {
  font-size: 0.9rem;
  margin: 0;
}

.course-list p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 4px 0 0;
}

.language-card .language-level {
  color: #c7baff;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}

.language-grid + .section-intro {
  font-size: 0.8rem;
  margin-top: 16px;
}

blockquote {
  margin: 20px 0;
  border-left: 3px solid #a491ff;
  padding-left: 18px;
  font-size: 1.1rem;
  font-weight: 600;
}

.values-list {
  margin-bottom: 0;
  color: var(--muted);
}

.cv-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.cv-footer p {
  margin: 0;
}

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

  .cards {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sidebar .widget,
  .sidebar-note,
  .sidebar .back-link {
    display: none;
  }
}

@media (max-width: 600px) {
  .stage {
    padding: 12px;
    gap: 16px;
  }

  .window {
    border-radius: 20px;
  }

  .window-topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .window-title {
    font-size: 0.75rem;
  }

  .window-topbar .ghost-btn {
    font-size: 0.7rem;
    padding: 8px;
  }

  .traffic-lights {
    gap: 5px;
    flex-shrink: 0;
  }

  .dot {
    width: 9px;
    height: 9px;
  }

  .window-body {
    padding: 10px;
    gap: 10px;
  }

  .sidebar {
    padding: 12px;
  }

  .sidebar a {
    padding: 8px;
    font-size: 0.8rem;
  }

  .hero,
  .about-section,
  .cv-section {
    padding: 22px 18px;
  }

  .eyebrow {
    font-size: 0.65rem;
  }

  .profile-card,
  .skills-grid,
  .education-grid,
  .language-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    gap: 18px;
  }

  .portrait {
    width: 104px;
    height: 104px;
    border-radius: 20px;
  }

  .profile-heading {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .profile-stats {
    gap: 6px;
  }

  .profile-stats > div {
    padding: 10px 7px;
  }

  .profile-stats dt {
    font-size: 0.65rem;
  }

  .profile-stats dd {
    font-size: 1.1rem;
  }

  .actions > a,
  .actions > button {
    flex: 1 1 160px;
  }

  .experience-content {
    padding-left: 12px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .card:hover,
  .dock-item:hover {
    transform: none;
  }
}

@page {
  size: A4;
  margin: 16mm;
}

@media print {
  body {
    color: #172033;
    background: #fff;
    font-size: 10pt;
    line-height: 1.5;
    overflow: visible;
  }

  .aurora,
  .sidebar,
  .dock,
  .window-topbar,
  .skip-link,
  .actions,
  .compact-btn,
  .disclosure-mark,
  .cv-footer a {
    display: none !important;
  }

  .stage,
  .window,
  .window-body,
  .content {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  .glass,
  .glass-soft {
    background: none;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hero,
  .cv-section {
    padding: 0;
    margin-bottom: 24px;
  }

  .cv-hero h1 {
    font-size: 28pt;
  }

  .gradient-text {
    background: none;
    color: #172033;
    -webkit-text-fill-color: currentColor;
  }

  .profile-role,
  .profile-location,
  .cv-intro,
  .profile-stats dt,
  .editorial-note,
  .section-intro,
  .experience-date,
  .experience-role,
  .tech-line,
  .skill-card p,
  .education-card p,
  .education-card .experience-date,
  .language-card p,
  .course-year,
  .course-list p,
  .values-list,
  .cv-footer,
  .eyebrow {
    color: #39445a;
  }

  .profile-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
  }

  .portrait {
    width: 104px;
    height: 104px;
    box-shadow: none;
  }

  .profile-stats > div,
  .skill-card,
  .education-card,
  .language-card,
  .editorial-note,
  .tag-list li {
    background: none;
    border-color: #c9cdd5;
  }

  .tag-list li,
  .language-card .language-level {
    color: #172033;
  }

  .experience-entry,
  .course-list li {
    border-color: #c9cdd5;
  }

  .experience-entry summary {
    display: block;
    break-after: avoid;
  }

  .experience-content,
  blockquote {
    border-color: #a4acbb;
  }

  .project,
  .skill-card,
  .education-card,
  .language-card,
  .course-list li,
  .profile-stats,
  .profile-heading,
  blockquote {
    break-inside: avoid;
  }

  h2,
  h3,
  h4,
  .subsection-title {
    break-after: avoid;
  }

  p,
  li {
    orphans: 3;
    widows: 3;
  }

  .skills-grid,
  .education-grid,
  .language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}