:root {
  color-scheme: light;
  --bg: #eef7ff;
  --surface: rgba(251, 254, 255, 0.82);
  --surface-solid: #fbfdff;
  --surface-soft: #deefff;
  --ink: #10263d;
  --muted: #526b83;
  --line: rgba(19, 75, 126, 0.15);
  --primary: #1476c9;
  --primary-deep: #075596;
  --violet: #3e63d3;
  --lime: #78d9ff;
  --focus: #943d00;
  --stack-surface: #092b4a;
  --stack-card: #123e67;
  --stack-ink: #edf8ff;
  --stack-muted: #b7d5eb;
  --shadow: 0 22px 70px rgba(23, 91, 148, 0.15);
  --radius: 2rem;
  --max: 1180px;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-xs: 0.75rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-card-title: clamp(1.375rem, 2.5vw, 1.875rem);
  --font-size-section-title: clamp(1.625rem, 3vw, 2.5rem);
  --font-size-display: clamp(2rem, 5vw, 4.5rem);
  --font-size-hero: clamp(3rem, 8vw, 6.4rem);
}

.intro .eyebrow,
.intro .keywords {
  margin-block: 0;
}

.intro .eyebrow {
  font-size: var(--font-size-xl);
}

.typewriter-line {
  min-width: clamp(17rem, 28vw, 21rem);
}

.typewriter-text {
  display: inline-block;
  white-space: nowrap;
}

.typewriter-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 0.16em;
  background: currentColor;
  box-shadow: 0 0 7px color-mix(in srgb, currentColor 55%, transparent);
  vertical-align: -0.04em;
  animation: typewriter-caret 0.78s step-end infinite;
}

.stack .stack-title {
  margin: 0 0 1.5rem;
  font-size: var(--font-size-xl);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.about > .eyebrow,
.languages > .eyebrow,
.journey-head .eyebrow,
.contact .eyebrow {
  font-size: var(--font-size-xl);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.about > .eyebrow {
  margin-bottom: 2rem;
  color: var(--primary-deep);
}

.languages,
.stack {
  background: var(--surface-solid);
  color: var(--ink);
}

.languages .section-title,
.stack .section-title {
  color: var(--ink);
}

.languages .eyebrow,
.stack .eyebrow {
  color: var(--primary-deep);
}

.tech-icon:not(.logo-surface) {
  padding: 0.35rem;
  border-radius: 0.55rem;
  background: transparent;
  box-shadow: none;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(
      circle at 8% 12%,
      color-mix(in srgb, var(--violet) 19%, transparent) 0,
      transparent 27rem
    ),
    radial-gradient(
      circle at 92% 36%,
      color-mix(in srgb, var(--primary) 16%, transparent) 0,
      transparent 30rem
    ),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.6;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: 1rem clamp(1rem, 4vw, 2.5rem) 0;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: auto;
  padding: 0.65rem 0.7rem 0.65rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 77%, transparent);
  box-shadow: 0 10px 30px rgba(29, 28, 73, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--font-size-base);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 2rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50% 50% 18% 50%;
  background: var(--primary);
  color: #fff;
  font-size: var(--font-size-xs);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle span:first-child {
  transform: translate(-50%, calc(-50% - 0.3rem));
}

.nav-toggle span:nth-child(2) {
  transform: translate(-50%, -50%);
}

.nav-toggle span:last-child {
  transform: translate(-50%, calc(-50% + 0.3rem));
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.nav-links a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--font-size-base);
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-links .nav-cv {
  background: var(--primary);
  color: #fff;
}

.nav-links .nav-cv:hover {
  background: var(--primary-deep);
  color: #fff;
}

main,
footer {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

main {
  padding: clamp(3rem, 8vw, 6.5rem) 0 4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  color: var(--primary-deep);
  font-size: var(--font-size-xs);
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.7rem;
  height: 2px;
  background: currentColor;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.55fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.intro {
  height: auto;
  min-height: 390px;
  padding: clamp(1.6rem, 5vw, 3.5rem);
}

.intro h1 {
  max-width: 760px;
  margin: 0 0 1rem 0;
  font-size: var(--font-size-hero);
  font-weight: 880;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

.intro h1 span {
  display: block;
  color: var(--primary);
}

.intro-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.intro-meta .eyebrow {
  margin: 0;
}

.role {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.orbit {
  position: absolute;
  z-index: -1;
  right: -6rem;
  bottom: -7rem;
  width: 20rem;
  aspect-ratio: 1;
  border: 3rem solid color-mix(in srgb, var(--violet) 14%, transparent);
  border-radius: 50%;
}

.status-card {
  display: flex;
  height: auto;
  min-height: 390px;
  padding: 0.7rem;
  flex-direction: column;
  background: linear-gradient(145deg, var(--primary), var(--violet));
  color: #fff;
}

.status-card::after {
  display: none;
}

.status-card p {
  margin: 0;
}

.location {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--font-size-sm);
  font-weight: 750;
}

.location::before {
  content: "";
  width: 0.65rem;
  aspect-ratio: 1;
  border: 3px solid var(--lime);
  border-radius: 50%;
}

.portrait {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1;
  border: 0.55rem solid rgba(255, 255, 255, 0.22);
  border-radius: 1.5rem;
  object-fit: cover;
  object-position: center 22%;
  box-shadow: 0 18px 35px rgba(21, 15, 77, 0.25);
}

.keywords {
  margin: 2rem 0 0;
  color: var(--primary-deep);
  font-size: var(--font-size-lg);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.cv-button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 22%, transparent);
}

.cv-button:hover {
  background: var(--primary-deep);
}

.cv-button span {
  font-size: 1.25em;
  line-height: 0.8;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.about {
  grid-column: span 7;
  padding: clamp(1.6rem, 4vw, 3rem);
}

.languages {
  grid-column: span 5;
  padding: clamp(1.6rem, 4vw, 3rem);
  background: var(--surface-solid);
  color: var(--ink);
}

.journey,
.stack,
.contact {
  grid-column: 1 / -1;
  padding: clamp(1.6rem, 4vw, 3rem);
}

.contact {
  background: #dcefff;
  color: var(--primary-deep);
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: var(--font-size-section-title);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.about p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-lg);
}

.about p + p {
  margin-top: 1.25rem;
}

.languages .eyebrow,
.contact .eyebrow {
  color: var(--primary-deep);
}

.languages .section-title {
  color: var(--ink);
}

.language-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.language-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid rgba(238, 241, 255, 0.2);
}

.language-list dt {
  font-weight: 800;
}

.language-list dd {
  margin: 0;
  opacity: 0.72;
}

.journey-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1rem, 6vw, 1rem);
}

.journey-head .section-title {
  margin: 0;
}

.journey-note {
  max-width: 30ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-sm);
}

.timeline {
  position: relative;
  display: grid;
  gap: clamp(3.5rem, 7vw, 5.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.7rem;
  bottom: 0.7rem;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(var(--primary), var(--violet));
  transform: translateX(-50%);
  opacity: 0.7;
}

.timeline-node {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3.5rem, 8vw, 7rem);
}

.timeline-node::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0.55rem;
  left: 50%;
  width: 0.9rem;
  aspect-ratio: 1;
  border: 3px solid var(--surface-solid);
  border-radius: 4px 50% 50%;
  outline: 2px solid var(--violet);
  background: var(--lime);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--violet) 15%, transparent);
  transform: translateX(-50%) rotate(45deg);
}

.node-meta {
  min-width: 0;
  padding-top: 0.15rem;
  text-align: right;
}

.timeline-node:nth-child(even) .node-meta {
  grid-column: 2;
  text-align: left;
}

.timeline-node:nth-child(even) .node-card {
  grid-column: 1;
  grid-row: 1;
}

.node-date {
  margin: 0 0 0.35rem;
  color: var(--primary-deep);
  font-size: var(--font-size-sm);
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.node-place {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-lg);
  font-weight: 800;
}

.node-card {
  min-width: 0;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  border: 1px solid color-mix(in srgb, var(--violet) 24%, var(--line));
  border-radius: 1.5rem;
  background: var(--surface-solid);
  box-shadow: 10px 12px 0 color-mix(in srgb, var(--primary) 9%, transparent);
}

.node-type {
  margin: 0 0 0.65rem;
  color: var(--violet);
  font-size: var(--font-size-xs);
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.node-card h3 {
  margin: 0;
  font-size: var(--font-size-card-title);
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.node-card > p:last-child {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.tasks {
  display: grid;
  gap: 0.65rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: task;
}

.tasks li {
  position: relative;
  min-width: 0;
  padding: 0.8rem 0.9rem 0.8rem 2.65rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: var(--font-size-base);
  overflow-wrap: anywhere;
  counter-increment: task;
}

.tasks li::before {
  content: "0" counter(task);
  position: absolute;
  top: 1rem;
  left: 0.9rem;
  color: var(--violet);
  font:
    850 var(--font-size-xs)/1.6 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}

.stack {
  background: var(--surface-solid);
  color: var(--ink);
  backdrop-filter: none;
}

.stack .eyebrow {
  color: var(--primary-deep);
}

.stack .section-title {
  color: var(--ink);
}

.stack-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: none;
  gap: 1rem;
}

.stack-group {
  display: flex;
  min-width: 0;
  min-height: 180px;
  padding: 1rem clamp(1rem, 2vw, 1.35rem);
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: linear-gradient(
    145deg,
    var(--surface-soft),
    var(--surface-solid)
  );
  box-shadow: inset 0 1px rgba(14, 80, 136, 0.08);
}

.stack-group h3 {
  margin: 0;
  color: var(--primary-deep);
  font-size: var(--font-size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
  flex: 1;
  gap: 0.45rem;
}

.tech {
  min-width: 0;
  height: 6.25rem;
  margin: 0;
  padding: 0.6rem 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.9rem;
  background: #d8ecfb;
  text-align: center;
}

.tech-icon {
  display: grid;
  width: 2.25rem;
  aspect-ratio: 1;
  margin: 0 auto 0.45rem;
  place-items: center;
}

.tech-icon--mockito {
  width: 4rem;
  aspect-ratio: 2 / 1;
}

.tech-icon img,
.tech-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tech-icon.logo-surface {
  padding: 0.35rem;
  border-radius: 0.55rem;
  background: #d8ecfb;
}

.tech-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 1px solid rgba(201, 255, 103, 0.55);
  border-radius: 0.6rem;
  color: var(--lime);
  font-size: var(--font-size-xs);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tech figcaption {
  color: #286895;
  font-size: var(--font-size-sm);
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.logo-note {
  margin: 1.25rem 0 0;
  color: var(--stack-muted);
  font-size: var(--font-size-sm);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1.5rem;
}

.contact .eyebrow {
  color: var(--primary-deep);
}

.contact .section-title {
  max-width: none;
  width: fit-content;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 0.95;
}

.contact-copy {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.contact-cv {
  width: 100%;
  align-self: center;
  justify-content: center;
  margin-top: 0;
}

.contact-links {
  display: contents;
  font-style: normal;
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(7, 85, 150, 0.25);
  font-weight: 750;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-links a:first-child {
  grid-column: auto;
  white-space: normal;
}

.contact-icon {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.85rem;
  color: currentColor;
}

.contact-links a > span {
  min-width: 0;
  flex: 1;
}

.contact-icon--email {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.contact-icon--brand {
  fill: currentColor;
}

.contact-links a[target="_blank"]::after {
  content: "↗";
  flex: none;
  font-size: var(--font-size-xl);
}

.contact-links a:hover {
  color: var(--violet);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: var(--font-size-sm);
}

@media (max-width: 900px) {
  .stack-group {
    min-height: 220px;
  }
}

@media (max-width: 800px) {
  .nav-shell {
    flex-wrap: wrap;
    border-radius: 1.25rem;
  }

  .nav-toggle {
    display: grid;
    margin-left: auto;
  }

  .nav-links {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
  }

  .js .nav-links {
    display: none;
  }

  .js .nav-links.is-open {
    display: grid;
  }

  .nav-links a {
    display: block;
    padding: 0.45rem 0.5rem;
    text-align: center;
    font-size: var(--font-size-sm);
  }

  .nav-links .nav-cv {
    grid-column: 1 / -1;
  }

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

  .intro {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    min-height: 380px;
  }

  .intro-meta {
    display: contents;
  }

  .intro-meta .eyebrow {
    order: 2;
  }

  .intro .keywords {
    order: 3;
  }

  .intro .cv-button {
    order: 4;
  }

  .status-card {
    width: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
    justify-self: stretch;
  }

  .about,
  .languages {
    grid-column: 1 / -1;
  }

  .journey-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .timeline {
    gap: 3rem;
    padding-left: 1.4rem;
  }

  .timeline::before {
    left: 0;
    transform: none;
  }

  .timeline-node {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .timeline-node::before {
    left: -1rem;
    transform: translateX(-50%) rotate(45deg);
  }

  .node-meta,
  .timeline-node:nth-child(even) .node-meta {
    grid-column: 1;
    text-align: left;
  }

  .timeline-node:nth-child(even) .node-card {
    grid-column: 1;
    grid-row: auto;
  }

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

@media (max-width: 600px) {
  .stack-groups {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .stack-group {
    min-height: 0;
  }

  .stack-group {
    grid-column: 1;
  }

  .tech-grid,
  .stack-group--web .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.35rem;
    align-content: start;
  }
}

@media (max-width: 520px) {
  :root {
    --radius: 1.45rem;
    --font-size-hero: clamp(2.8rem, 15vw, 4.3rem);
  }

  .site-header {
    padding: 0.7rem 0.7rem 0;
  }

  main,
  footer {
    width: min(calc(100% - 1.4rem), var(--max));
  }

  main {
    padding-top: 2.5rem;
  }

  .intro h1 {
    font-size: var(--font-size-hero);
  }

  .journey,
  .stack {
    padding-inline: 1.1rem;
  }

  .timeline {
    padding-left: 1rem;
  }

  .node-card {
    padding: 1.1rem;
    border-radius: 1.15rem;
    box-shadow: 6px 7px 0 color-mix(in srgb, var(--primary) 9%, transparent);
  }

  .tasks li {
    padding-right: 0.7rem;
  }

  .contact-links a {
    align-items: flex-start;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .contact-links a:first-child {
    grid-column: auto;
    white-space: normal;
  }

  footer {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.contribution > .eyebrow {
  font-size: var(--font-size-xl);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.languages .language-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.languages .language-list div {
  display: flex;
  position: relative;
  min-height: 7rem;
  padding: 1.1rem 1.4rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: linear-gradient(
    145deg,
    var(--surface-soft),
    var(--surface-solid)
  );
}

.languages .language-list dt {
  color: var(--ink);
  font-size: var(--font-size-lg);
}

.languages .language-list dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-weight: 700;
  opacity: 1;
}

.languages .language-list div:hover {
  padding-inline: 1.4rem;
}

.languages .language-list div::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -30%;
  right: -8%;
  bottom: -30%;
  width: 64%;
  opacity: 0.2;
  filter: blur(5px);
  mask-image: linear-gradient(to left, #000 12%, transparent 100%);
  pointer-events: none;
}

.languages .language-list div > * {
  position: relative;
  z-index: 1;
}

.languages .language-list div:first-child::before {
  background: linear-gradient(
    to bottom,
    #aa151b 0 28%,
    #f1bf00 28% 72%,
    #aa151b 72% 100%
  );
}

.languages .language-list div:last-child::before {
  background:
    linear-gradient(90deg, transparent 0 47%, #c8102e 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 0 46%, #c8102e 46% 54%, transparent 54%),
    linear-gradient(90deg, transparent 0 42%, #fff 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 0 42%, #fff 42% 58%, transparent 58%),
    linear-gradient(
      45deg,
      transparent 0 39%,
      #fff 39% 45%,
      #c8102e 45% 55%,
      #fff 55% 61%,
      transparent 61%
    ),
    linear-gradient(
      -45deg,
      transparent 0 39%,
      #fff 39% 45%,
      #c8102e 45% 55%,
      #fff 55% 61%,
      transparent 61%
    ),
    #012169;
}

.languages {
  grid-column: 1 / -1;
  padding-block: clamp(1.35rem, 3vw, 2rem);
}

@font-face {
  font-family: "Kunaroh";
  src: url("assets/kunaroh/Kunaroh.ttf") format("truetype");
  font-display: optional;
}

.brand > span:last-child {
  font-family: "Kunaroh", sans-serif;
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.015em;
  transform: translateY(3px);
}

@media (max-width: 600px) {
  .languages .language-list {
    grid-template-columns: 1fr;
  }
}

.contribution {
  grid-column: span 5;
  padding: clamp(1.6rem, 4vw, 3rem);
  background: linear-gradient(145deg, #d7edff, #f8fcff);
}

.contribution-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contribution-list li {
  position: relative;
  padding: 0.75rem 0.8rem 0.75rem 1.8rem;
  border-left: 2px solid var(--primary);
  border-radius: 0 0.7rem 0.7rem 0;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
}

.contribution-list li::before {
  content: "";
  position: absolute;
  top: 1.2rem;
  left: 0.7rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
}

@media (max-width: 800px) {
  .about,
  .contribution {
    grid-column: 1 / -1;
  }
}

.intro h1 .hero-surname {
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}

.intro-meta .cv-button {
  margin-left: auto;
}

@media (max-width: 800px) {
  .intro-meta .cv-button {
    align-self: flex-end;
    margin-left: 0;
  }
}

@media (min-width: 801px) {
  .intro-meta .cv-button {
    transform: translateY(2.75rem);
  }
}

.about p {
  margin-inline: auto;
}

.company-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  vertical-align: middle;
}

.company-logo {
  display: block;
  width: 1.5rem;
  height: 1.25rem;
  object-fit: contain;
}

.company-logo--knowmad {
  width: 2.25rem;
  height: 1.9rem;
  border-radius: 0.2rem;
}

/* Visual effects layer: isolated so each enhancement can be evaluated independently. */
.scroll-progress {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--violet),
    var(--lime)
  );
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary) 55%, transparent);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.ambient-layer {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.24;
  will-change: transform;
}

.ambient-orb--one {
  top: 8%;
  left: -7rem;
  width: 20rem;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  animation: ambient-drift-one 18s ease-in-out infinite alternate;
}

.ambient-orb--two {
  top: 42%;
  right: -9rem;
  width: 28rem;
  aspect-ratio: 1;
  border: 5rem solid color-mix(in srgb, var(--violet) 8%, transparent);
  animation: ambient-drift-two 22s ease-in-out infinite alternate;
}

.ambient-orb--three {
  bottom: -9rem;
  left: 42%;
  width: 15rem;
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--lime) 18%, transparent);
  filter: blur(30px);
  animation: ambient-drift-one 15s ease-in-out -7s infinite alternate-reverse;
}

.cursor-light {
  --cursor-x: 50vw;
  --cursor-y: 50vh;
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    220px circle at var(--cursor-x) var(--cursor-y),
    color-mix(in srgb, var(--primary) 7%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor-light.is-visible {
  opacity: 1;
}

main,
footer {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
}

.nav-shell {
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
}

.site-header:hover .nav-shell {
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  box-shadow: 0 14px 38px rgba(126, 45, 91, 0.13);
}

.brand-mark {
  position: relative;
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--violet) 45%, transparent);
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow:
    0 7px 18px color-mix(in srgb, var(--primary) 30%, transparent),
    0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent);
  text-shadow: 0 1px 7px color-mix(in srgb, #17152b 30%, transparent);
  animation: brand-breathe 3.5s ease-in-out infinite;
}

.brand-mark::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -5px;
  border: 2px solid color-mix(in srgb, var(--violet) 34%, transparent);
  border-radius: inherit;
  opacity: 0;
  animation: brand-ring 3.5s ease-out infinite;
}

.nav-links a {
  position: relative;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.nav-links a:not(.nav-cv)::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  bottom: 0.3rem;
  left: 0.75rem;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-links a:not(.nav-cv):hover::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
}

.nav-links a.is-active {
  color: var(--primary-deep);
}

.card:not(.stack) {
  isolation: isolate;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.node-card {
  isolation: isolate;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.surface-glow {
  position: absolute;
  z-index: 5;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    280px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(255, 255, 255, 0.32),
    transparent 68%
  );
  mix-blend-mode: soft-light;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.card:hover > .surface-glow,
.node-card:hover > .surface-glow {
  opacity: 1;
}

.intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -55%;
  left: -30%;
  width: 42%;
  height: 210%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: rotate(18deg) translateX(-220%);
  animation: intro-sheen 8s ease-in-out 1.5s infinite;
}

.intro h1 .hero-name,
.intro h1 .hero-surname {
  display: block;
  color: var(--primary-deep);
}

.intro h1 .hero-name {
  background-image: linear-gradient(
    100deg,
    #154f80 8%,
    #08679f 42%,
    #075f91 68%,
    #304fa0 92%
  );
}

.intro h1 .hero-surname {
  background-image: linear-gradient(
    100deg,
    #064b86 10%,
    #075f9e 45%,
    #354fae 62%,
    #087198 88%
  );
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .intro h1 .hero-name,
  .intro h1 .hero-surname {
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: title-gradient 7s ease-in-out infinite alternate;
  }
}

.orbit {
  animation: orbit-float 8s ease-in-out infinite alternate;
}

.orbit::before {
  inset: -1.7rem;
  content: "";
  position: absolute;
  border: 1px dashed color-mix(in srgb, var(--violet) 28%, transparent);
  border-radius: 50%;
  animation: orbit-spin 24s linear infinite;
}

.status-card {
  transition: box-shadow 0.45s ease;
}

.status-card:hover {
  box-shadow: 0 30px 80px rgba(126, 45, 91, 0.23);
}

.portrait {
  transition:
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.5s ease;
}

.status-card:hover .portrait {
  filter: none;
  transform: none;
}

.cv-button,
.nav-cv {
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.cv-button:hover,
.nav-cv:hover {
  box-shadow: 0 14px 32px color-mix(in srgb, var(--primary) 32%, transparent);
}

.cv-button span {
  animation: arrow-bounce 1.8s ease-in-out infinite;
}

.about:hover,
.languages:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
}

.contact:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
}

.language-list div {
  transition:
    padding-inline 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.language-list div:hover {
  padding-inline: 0.65rem;
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  color: var(--primary-deep);
}

.timeline::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0.7rem;
  bottom: 0.7rem;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(var(--lime), var(--primary));
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 40%, transparent);
  transform: translateX(-50%) scaleY(var(--timeline-progress, 0));
  transform-origin: top;
  transition: transform 0.1s linear;
}

.timeline-node::before {
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.timeline-node:hover::before {
  box-shadow:
    0 0 0 10px color-mix(in srgb, var(--violet) 18%, transparent),
    0 0 24px color-mix(in srgb, var(--lime) 65%, transparent);
  transform: translateX(-50%) rotate(225deg) scale(1.12);
}

.node-card:hover {
  border-color: color-mix(in srgb, var(--violet) 45%, var(--line));
  box-shadow: 14px 17px 0 color-mix(in srgb, var(--primary) 12%, transparent);
}

.tasks li {
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
}

.tasks li:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  background: color-mix(in srgb, var(--surface-soft) 84%, white);
  transform: translateX(4px);
}

.contact-links a {
  transition:
    color 0.25s ease,
    padding-inline 0.25s ease,
    border-color 0.25s ease;
}

.contact-links a::after {
  transition: transform 0.25s ease;
}

.contact-links a:hover {
  padding-inline: 0.5rem;
  border-color: currentColor;
}

.contact-links a:hover::after {
  transform: translate(3px, -3px);
}

.contact-icon {
  transition:
    filter 0.25s ease,
    transform 0.25s ease;
}

.contact-links a:hover .contact-icon {
  filter: drop-shadow(0 4px 5px rgba(107, 79, 211, 0.25));
  transform: scale(1.12) rotate(-4deg);
}

.fx-ready .reveal-item {
  opacity: 0;
  translate: 0 24px;
  scale: 0.985;
}

.fx-ready .reveal-item.is-visible {
  opacity: 1;
  translate: 0;
  scale: 1;
  transition-delay: var(--reveal-delay, 0ms);
}

/* Avoid rasterizing the whole technology grid, which can merge glyphs in some browsers. */
.fx-ready .stack.reveal-item,
.fx-ready .stack.reveal-item.is-visible {
  translate: none;
  scale: none;
}

.fx-ready .card.reveal-item {
  transition-property:
    opacity, translate, scale, transform, border-color, box-shadow;
  transition-duration: 0.7s, 0.7s, 0.7s, 0.35s, 0.35s, 0.35s;
  transition-timing-function:
    ease, cubic-bezier(0.2, 0.8, 0.2, 1), cubic-bezier(0.2, 0.8, 0.2, 1), ease,
    ease, ease;
}

.fx-ready .timeline-node.reveal-item {
  transition:
    opacity 0.7s ease,
    translate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes ambient-drift-one {
  to {
    transform: translate(4rem, 3rem) scale(1.12);
  }
}

@keyframes ambient-drift-two {
  to {
    transform: translate(-5rem, 4rem) rotate(18deg) scale(0.92);
  }
}

@keyframes brand-breathe {
  0%,
  100% {
    box-shadow:
      0 7px 18px color-mix(in srgb, var(--primary) 30%, transparent),
      0 0 0 3px color-mix(in srgb, var(--violet) 12%, transparent);
  }
  50% {
    box-shadow:
      0 10px 25px color-mix(in srgb, var(--primary) 40%, transparent),
      0 0 0 8px color-mix(in srgb, var(--violet) 16%, transparent);
  }
}

@keyframes brand-ring {
  35% {
    opacity: 0.7;
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

@keyframes intro-sheen {
  0%,
  72% {
    transform: rotate(18deg) translateX(-220%);
  }
  100% {
    transform: rotate(18deg) translateX(520%);
  }
}

@keyframes title-gradient {
  to {
    background-position: 100% center;
  }
}

@keyframes orbit-float {
  to {
    transform: translate(-1rem, -1.2rem) rotate(8deg);
  }
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes arrow-bounce {
  0%,
  100% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(3px);
  }
}

@keyframes typewriter-caret {
  50% {
    opacity: 0;
  }
}

@media (max-width: 800px) {
  .typewriter-line {
    width: 100%;
    min-width: 0;
  }

  .timeline::after {
    left: 0;
    transform: scaleY(var(--timeline-progress, 0));
  }

  .timeline-node:hover::before {
    transform: translateX(-50%) rotate(225deg) scale(1.12);
  }

  .ambient-orb {
    opacity: 0.16;
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-light,
  .surface-glow {
    display: none;
  }

  .status-card:hover,
  .about:hover,
  .languages:hover,
  .contact:hover,
  .node-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orb,
  .brand-mark,
  .brand-mark::after,
  .intro::after,
  .intro h1 span,
  .orbit,
  .orbit::before,
  .cv-button span {
    animation: none !important;
  }

  .typewriter-text::after {
    animation: none !important;
  }

  .fx-ready .reveal-item {
    opacity: 1;
    translate: 0;
    scale: 1;
  }
}

.stack-group--web {
  grid-column: 1 / -1;
}

.stack-group--web .tech-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 600px) {
  .stack-group--web .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .intro .typewriter-line {
    font-size: 1rem;
    letter-spacing: 0.08em;
  }
}
