@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("./assets/fonts/PlusJakartaSans-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("./assets/fonts/PlusJakartaSans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fira Code";
  src: url("./assets/fonts/FiraCode-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fira Code";
  src: url("./assets/fonts/FiraCode-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #006fe0;
}

@property --accent-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #00a997;
}

@property --accent-soft {
  syntax: "<color>";
  inherits: true;
  initial-value: #cfe6ff;
}

@property --accent-dark {
  syntax: "<color>";
  inherits: true;
  initial-value: #72b9ff;
}

@property --accent-dark-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #5ee9d2;
}

@property --accent-dark-soft {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(114, 185, 255, 0.29);
}

@property --bg-light-a {
  syntax: "<color>";
  inherits: true;
  initial-value: #ffffff;
}

@property --bg-light-b {
  syntax: "<color>";
  inherits: true;
  initial-value: #9fd2ff;
}

@property --bg-light-c {
  syntax: "<color>";
  inherits: true;
  initial-value: #a8f4e6;
}

@property --bg-light-d {
  syntax: "<color>";
  inherits: true;
  initial-value: #ffd9a6;
}

@property --bg-dark-a {
  syntax: "<color>";
  inherits: true;
  initial-value: #081a35;
}

@property --bg-dark-b {
  syntax: "<color>";
  inherits: true;
  initial-value: #072844;
}

@property --bg-dark-c {
  syntax: "<color>";
  inherits: true;
  initial-value: #0a2a2a;
}

@property --bg-dark-d {
  syntax: "<color>";
  inherits: true;
  initial-value: #2e1f09;
}

@property --wash-light-a {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(86, 186, 255, 0.34);
}

@property --wash-light-b {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(78, 238, 205, 0.3);
}

@property --wash-light-c {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(88, 132, 255, 0.27);
}

@property --wash-light-d {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(255, 173, 88, 0.24);
}

@property --wash-dark-a {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(76, 145, 230, 0.13);
}

@property --wash-dark-b {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(58, 172, 168, 0.11);
}

@property --wash-dark-c {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(97, 111, 222, 0.1);
}

@property --wash-dark-d {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(208, 131, 66, 0.08);
}

:root {
  --font-main: "Plus Jakarta Sans", sans-serif;
  --font-ai: "Fira Code", monospace;
  --a11y-text-zoom: 1;
  --flow-duration: 8.6s;
  --flow-ease: cubic-bezier(0.37, 0, 0.2, 1);
  --bg: #e9f2ff;
  --bg-2: #deecff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --border: rgba(15, 46, 86, 0.16);
  --text: #0f2238;
  --muted: #355b84;
  --accent: #006fe0;
  --accent-2: #00a997;
  --accent-soft: #cfe6ff;
  --accent-dark: #72b9ff;
  --accent-dark-2: #5ee9d2;
  --accent-dark-soft: rgba(114, 185, 255, 0.29);
  --shadow: 0 16px 38px rgba(16, 41, 72, 0.13);
  --hero-indent: 0.35rem;
  --parallax-y: 0px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --content-safe-area-right: calc(var(--safe-area-right) * 0.72);
  --content-safe-area-left: calc(var(--safe-area-left) * 0.72);
  --safe-area-top-fallback: 0px;
  --bg-light-a: #ffffff;
  --bg-light-b: #9fd2ff;
  --bg-light-c: #a8f4e6;
  --bg-light-d: #ffd9a6;
  --bg-dark-a: #1a4e82;
  --bg-dark-b: #116387;
  --bg-dark-c: #0d5b50;
  --bg-dark-d: #7a4f17;
  --wash-light-a: rgba(86, 186, 255, 0.34);
  --wash-light-b: rgba(78, 238, 205, 0.3);
  --wash-light-c: rgba(88, 132, 255, 0.27);
  --wash-light-d: rgba(255, 173, 88, 0.24);
  --wash-dark-a: rgba(115, 194, 255, 0.29);
  --wash-dark-b: rgba(84, 228, 208, 0.25);
  --wash-dark-c: rgba(136, 152, 255, 0.24);
  --wash-dark-d: rgba(255, 177, 96, 0.2);
  transition:
    --accent var(--flow-duration) var(--flow-ease),
    --accent-2 var(--flow-duration) var(--flow-ease),
    --accent-soft var(--flow-duration) var(--flow-ease),
    --accent-dark var(--flow-duration) var(--flow-ease),
    --accent-dark-2 var(--flow-duration) var(--flow-ease),
    --accent-dark-soft var(--flow-duration) var(--flow-ease),
    --bg-light-a var(--flow-duration) var(--flow-ease),
    --bg-light-b var(--flow-duration) var(--flow-ease),
    --bg-light-c var(--flow-duration) var(--flow-ease),
    --bg-light-d var(--flow-duration) var(--flow-ease),
    --bg-dark-a var(--flow-duration) var(--flow-ease),
    --bg-dark-b var(--flow-duration) var(--flow-ease),
    --bg-dark-c var(--flow-duration) var(--flow-ease),
    --bg-dark-d var(--flow-duration) var(--flow-ease),
    --wash-light-a var(--flow-duration) var(--flow-ease),
    --wash-light-b var(--flow-duration) var(--flow-ease),
    --wash-light-c var(--flow-duration) var(--flow-ease),
    --wash-light-d var(--flow-duration) var(--flow-ease),
    --wash-dark-a var(--flow-duration) var(--flow-ease),
    --wash-dark-b var(--flow-duration) var(--flow-ease),
    --wash-dark-c var(--flow-duration) var(--flow-ease),
    --wash-dark-d var(--flow-duration) var(--flow-ease);
}

@supports (padding-top: constant(safe-area-inset-top)) {
  :root {
    --safe-area-top: constant(safe-area-inset-top);
    --safe-area-right: constant(safe-area-inset-right);
    --safe-area-bottom: constant(safe-area-inset-bottom);
    --safe-area-left: constant(safe-area-inset-left);
  }
}

@supports (-webkit-touch-callout: none) {
  :root {
    --safe-area-top-fallback: 1.1rem;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: calc(100% * var(--a11y-text-zoom));
  min-height: 100%;
  background-color: #deecff;
}

html.dark-mode {
  background-color: #02060c;
}

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

.print-blocked-message {
  display: none;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 58%, #ffffff);
  outline-offset: 2px;
}

html.dark-mode a:focus-visible,
html.dark-mode button:focus-visible {
  outline-color: color-mix(in srgb, var(--accent) 72%, #ffffff);
}

.skip-link {
  position: fixed;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 100;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 96%, white);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transform: translateY(-140%);
  transition: transform 0.18s ease;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-main);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  padding-bottom: var(--safe-area-bottom);
  background:
    radial-gradient(circle at 14% 14%, var(--bg-light-a) 0%, transparent 54%),
    radial-gradient(circle at 86% 0%, var(--bg-light-b) 0%, transparent 50%),
    radial-gradient(circle at 8% 88%, var(--bg-light-c) 0%, transparent 44%),
    radial-gradient(circle at 62% 72%, var(--bg-light-d) 0%, transparent 36%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  background-size: 115% 115%, 125% 125%, 135% 135%, 125% 125%, 100% 100%;
  animation: ambientShift 28s ease-in-out infinite alternate;
}

body.dark-mode,
html.dark-mode body {
  --bg: #060d19;
  --bg-2: #050a14;
  --surface: rgba(18, 32, 52, 0.86);
  --surface-strong: #11233e;
  --border: rgba(159, 200, 241, 0.25);
  --text: #f2f7ff;
  --muted: #a7c0df;
  --accent: var(--accent-dark);
  --accent-2: var(--accent-dark-2);
  --accent-soft: var(--accent-dark-soft);
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
  background:
    radial-gradient(circle at 12% 14%, color-mix(in srgb, var(--bg-dark-a) 82%, transparent) 0%, transparent 56%),
    radial-gradient(circle at 86% 4%, color-mix(in srgb, var(--bg-dark-b) 74%, transparent) 0%, transparent 50%),
    radial-gradient(circle at 8% 90%, color-mix(in srgb, var(--bg-dark-c) 66%, transparent) 0%, transparent 44%),
    radial-gradient(circle at 64% 76%, color-mix(in srgb, var(--bg-dark-d) 58%, transparent) 0%, transparent 36%),
    linear-gradient(165deg, #01040b 0%, #020913 46%, #04081a 72%, #01030a 100%);
  background-color: #02060c;
  background-size: 115% 115%, 125% 125%, 135% 135%, 125% 125%, 100% 100%;
  animation: ambientShiftDark 30s ease-in-out infinite alternate;
}

body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.52;
  background:
    radial-gradient(circle at 78% 26%, var(--wash-light-a) 0%, transparent 48%),
    radial-gradient(circle at 22% 76%, var(--wash-light-b) 0%, transparent 44%),
    radial-gradient(circle at 52% 48%, var(--wash-light-c) 0%, transparent 46%),
    radial-gradient(circle at 42% 20%, var(--wash-light-d) 0%, transparent 42%);
  filter: blur(4px) saturate(128%);
  animation: colorWash 22s ease-in-out infinite alternate;
}

body.dark-mode::before,
html.dark-mode body::before {
  opacity: 0.34;
  background:
    radial-gradient(circle at 80% 24%, var(--wash-dark-a) 0%, transparent 50%),
    radial-gradient(circle at 18% 74%, var(--wash-dark-b) 0%, transparent 46%),
    radial-gradient(circle at 54% 52%, var(--wash-dark-c) 0%, transparent 48%),
    radial-gradient(circle at 42% 20%, var(--wash-dark-d) 0%, transparent 44%);
  filter: blur(6px) saturate(118%);
}

body.dark-mode .noise-layer,
html.dark-mode body .noise-layer {
  opacity: 0.11;
  background-image: linear-gradient(transparent 95%, rgba(196, 215, 236, 0.08) 95%);
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: linear-gradient(transparent 95%, rgba(16, 33, 54, 0.09) 95%);
  background-size: 100% 3px;
  transform: translateY(calc(var(--parallax-y) * -0.32));
  transition: transform 0.08s linear;
}

html.performance-mode body,
html.performance-mode body.dark-mode,
html.performance-mode body::before {
  animation: none !important;
}

html.performance-mode,
html.reduce-motion-force {
  --flow-duration: 0s;
  transition: none !important;
}

html.performance-mode body::before {
  filter: none;
  opacity: 0.22;
}

html.performance-mode .topbar {
  backdrop-filter: none;
}

html.performance-mode .noise-layer,
html.performance-mode .hero::after,
html.performance-mode .profile-flip {
  animation: none !important;
  transition: none !important;
}

html.performance-mode .noise-layer,
html.performance-mode .hero::after {
  transform: none !important;
}

.wrapper {
  width: min(1100px, calc(100% - clamp(1rem, 4vw, 2rem)));
  padding-left: var(--safe-area-left);
  padding-right: var(--safe-area-right);
  margin: 0 auto;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  width: 100%;
  padding: calc(0.6rem + var(--safe-area-top)) 0 0.6rem;
  padding: calc(0.6rem + max(var(--safe-area-top), var(--safe-area-top-fallback))) 0 0.6rem;
  background: rgba(238, 244, 255, 0.58);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(16, 33, 54, 0.08);
  opacity: 0;
  transform: translateY(-110%);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

body.dark-mode .topbar {
  background: rgba(10, 17, 28, 0.65);
}

body.scrolled .topbar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: var(--content-safe-area-left);
  padding-right: var(--content-safe-area-right);
}

.brand {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding-left: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

body.scrolled .brand {
  opacity: 1;
  transform: translateY(0);
}

.controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cv {
  display: grid;
  gap: clamp(0.85rem, 1.6vw, 1rem);
  padding:
    calc(clamp(2.15rem, 3.8vw, 2.5rem) + var(--safe-area-top))
    var(--content-safe-area-right)
    2.2rem
    var(--content-safe-area-left);
  padding:
    calc(clamp(2.15rem, 3.8vw, 2.5rem) + max(var(--safe-area-top), var(--safe-area-top-fallback)))
    var(--content-safe-area-right)
    2.2rem
    var(--content-safe-area-left);
}

.reader-article {
  display: contents;
}

.top-boxes {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  overflow-wrap: anywhere;
}

@supports (content-visibility: auto) {
  .layout .card:not(.project-box),
  .impact-card {
    content-visibility: auto;
    contain-intrinsic-size: 1px 420px;
  }
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 44%),
    radial-gradient(circle at 82% 12%, color-mix(in srgb, var(--accent-2) 18%, transparent) 0%, transparent 42%),
    radial-gradient(circle at 58% 88%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 47%),
    linear-gradient(140deg, color-mix(in srgb, var(--accent) 10%, transparent), color-mix(in srgb, var(--accent-2) 9%, transparent)),
    var(--surface-strong);
  border-color: color-mix(in srgb, var(--accent) 20%, var(--border));
  box-shadow:
    0 14px 32px color-mix(in srgb, var(--accent) 11%, transparent),
    var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 40%),
    linear-gradient(292deg, color-mix(in srgb, var(--accent-2) 5%, transparent), transparent 44%);
  opacity: 0.78;
}

.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  top: -170px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 72%);
  transform: translateY(calc(var(--parallax-y) * -0.22));
  transition: transform 0.1s linear;
  animation: orbDrift 13s ease-in-out infinite alternate;
}

.location {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.42rem 0.68rem;
}

.hero-body {
  padding-left: var(--hero-indent);
}

.hero-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: 175px 1fr;
  gap: 1rem;
  align-items: center;
}

.profile-flip {
  width: 175px;
  height: 175px;
  border-radius: 18px;
  perspective: 1000px;
  animation: avatarFloat 7s ease-in-out infinite;
}

.contacts a,
.footer-btn,
.a11y-toggle,
.a11y-action {
  min-height: 2rem;
}

.profile-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.2, 0.65, 0.2, 1);
}

.profile-face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  background: rgba(255, 255, 255, 0.9);
}

.profile-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-back {
  transform: rotateY(180deg);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.profile-back .avatar-img {
  object-fit: contain;
  padding: 0.35rem;
  filter: drop-shadow(0 8px 18px rgba(9, 20, 46, 0.24));
}

.profile-front {
  border: 0;
}

body.dark-mode .profile-front,
html.dark-mode body .profile-front {
  border: 0;
  background: rgba(11, 21, 35, 0.94);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}

.profile-flip:hover .profile-flip-inner {
  transform: rotateY(180deg);
}

h1,
h2,
h3 {
  font-family: var(--font-main);
  margin: 0;
}

h1 {
  margin-top: 0.45rem;
  font-size: clamp(1.82rem, 4.3vw, 2.98rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.title {
  margin: 0.6rem 0 0;
  font-weight: 600;
  color: var(--muted);
}

.summary {
  margin: 0.85rem 0 0;
  max-width: 92ch;
  line-height: 1.55;
}

.contacts {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.contacts a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.86rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.42rem 0.68rem;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.contacts a:hover {
  transform: translateY(-1px);
  border-color: rgba(5, 87, 179, 0.35);
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  max-width: 100%;
  min-width: 0;
}

.contacts a,
.location {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.contact-chip::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  display: inline-block;
  opacity: 0.85;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.chip-location::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M14.75 10C14.75 11.5188 13.5188 12.75 12 12.75C10.4812 12.75 9.25 11.5188 9.25 10C9.25 8.48122 10.4812 7.25 12 7.25C13.5188 7.25 14.75 8.48122 14.75 10Z' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M19.25 10C19.25 14.5547 15.1753 18.6833 13.1354 20.4648C12.4778 21.0392 11.5222 21.0392 10.8646 20.4648C8.82471 18.6833 4.75 14.5547 4.75 10C4.75 5.99594 7.99594 2.75 12 2.75C16.0041 2.75 19.25 5.99594 19.25 10Z' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M14.75 10C14.75 11.5188 13.5188 12.75 12 12.75C10.4812 12.75 9.25 11.5188 9.25 10C9.25 8.48122 10.4812 7.25 12 7.25C13.5188 7.25 14.75 8.48122 14.75 10Z' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M19.25 10C19.25 14.5547 15.1753 18.6833 13.1354 20.4648C12.4778 21.0392 11.5222 21.0392 10.8646 20.4648C8.82471 18.6833 4.75 14.5547 4.75 10C4.75 5.99594 7.99594 2.75 12 2.75C16.0041 2.75 19.25 5.99594 19.25 10Z' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.chip-phone::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M10.75 4.25H13.25M7.75 22.25H16.25C17.3546 22.25 18.25 21.3546 18.25 20.25V3.75C18.25 2.64543 17.3546 1.75 16.25 1.75H7.75C6.64543 1.75 5.75 2.64543 5.75 3.75V20.25C5.75 21.3546 6.64543 22.25 7.75 22.25Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M10.75 4.25H13.25M7.75 22.25H16.25C17.3546 22.25 18.25 21.3546 18.25 20.25V3.75C18.25 2.64543 17.3546 1.75 16.25 1.75H7.75C6.64543 1.75 5.75 2.64543 5.75 3.75V20.25C5.75 21.3546 6.64543 22.25 7.75 22.25Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.chip-email::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21.25 6.75H20.5V17.25H21.25H22V6.75H21.25ZM4.75 4.75V5.5H19.25V4.75V4H4.75V4.75ZM2.75 17.25H3.5V6.75H2.75H2V17.25H2.75ZM19.25 19.25V18.5H4.75V19.25V20H19.25V19.25ZM2.75 17.25H2C2 18.7688 3.23122 20 4.75 20V19.25V18.5C4.05964 18.5 3.5 17.9404 3.5 17.25H2.75ZM4.75 4.75V4C3.23122 4 2 5.23122 2 6.75H2.75H3.5C3.5 6.05964 4.05964 5.5 4.75 5.5V4.75ZM21.25 17.25H20.5C20.5 17.9404 19.9404 18.5 19.25 18.5V19.25V20C20.7688 20 22 18.7688 22 17.25H21.25ZM21.25 6.75H22C22 5.23122 20.7688 4 19.25 4V4.75V5.5C19.9404 5.5 20.5 6.05964 20.5 6.75H21.25Z' fill='black'/%3E%3Cpath d='M21.25 8L12.8999 12.2073C12.3339 12.4925 11.6661 12.4925 11.1 12.2073L2.75 8' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M21.25 6.75H20.5V17.25H21.25H22V6.75H21.25ZM4.75 4.75V5.5H19.25V4.75V4H4.75V4.75ZM2.75 17.25H3.5V6.75H2.75H2V17.25H2.75ZM19.25 19.25V18.5H4.75V19.25V20H19.25V19.25ZM2.75 17.25H2C2 18.7688 3.23122 20 4.75 20V19.25V18.5C4.05964 18.5 3.5 17.9404 3.5 17.25H2.75ZM4.75 4.75V4C3.23122 4 2 5.23122 2 6.75H2.75H3.5C3.5 6.05964 4.05964 5.5 4.75 5.5V4.75ZM21.25 17.25H20.5C20.5 17.9404 19.9404 18.5 19.25 18.5V19.25V20C20.7688 20 22 18.7688 22 17.25H21.25ZM21.25 6.75H22C22 5.23122 20.7688 4 19.25 4V4.75V5.5C19.9404 5.5 20.5 6.05964 20.5 6.75H21.25Z' fill='black'/%3E%3Cpath d='M21.25 8L12.8999 12.2073C12.3339 12.4925 11.6661 12.4925 11.1 12.2073L2.75 8' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.chip-linkedin::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M19.65 3H4.35C3.99196 3 3.64858 3.14223 3.39541 3.39541C3.14223 3.64858 3 3.99196 3 4.35V19.65C3 20.008 3.14223 20.3514 3.39541 20.6046C3.64858 20.8578 3.99196 21 4.35 21H19.65C20.008 21 20.3514 20.8578 20.6046 20.6046C20.8578 20.3514 21 20.008 21 19.65V4.35C21 3.99196 20.8578 3.64858 20.6046 3.39541C20.3514 3.14223 20.008 3 19.65 3ZM8.4 18.3H5.7V10.2H8.4V18.3ZM7.05 8.625C6.74056 8.61616 6.4406 8.51632 6.18758 8.33797C5.93456 8.15962 5.7397 7.91066 5.62737 7.6222C5.51503 7.33374 5.49019 7.01857 5.55595 6.71607C5.6217 6.41358 5.77515 6.13716 5.9971 5.92138C6.21906 5.70559 6.49968 5.55999 6.80391 5.50278C7.10814 5.44556 7.42248 5.47927 7.70766 5.59969C7.99284 5.7201 8.23622 5.92189 8.40737 6.17983C8.57853 6.43778 8.66987 6.74044 8.67 7.05C8.66289 7.47331 8.4885 7.8766 8.18495 8.17173C7.88139 8.46685 7.47335 8.62982 7.05 8.625ZM18.3 18.3H15.6V14.034C15.6 12.756 15.06 12.297 14.358 12.297C14.1522 12.3107 13.9511 12.3649 13.7663 12.4566C13.5815 12.5482 13.4166 12.6755 13.2811 12.831C13.1457 12.9866 13.0422 13.1674 12.9768 13.363C12.9114 13.5586 12.8853 13.7652 12.9 13.971C12.8955 14.0129 12.8955 14.0551 12.9 14.097V18.3H10.2V10.2H12.81V11.37C13.0733 10.9695 13.435 10.6433 13.8605 10.4227C14.286 10.2021 14.761 10.0944 15.24 10.11C16.635 10.11 18.264 10.884 18.264 13.404L18.3 18.3Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M19.65 3H4.35C3.99196 3 3.64858 3.14223 3.39541 3.39541C3.14223 3.64858 3 3.99196 3 4.35V19.65C3 20.008 3.14223 20.3514 3.39541 20.6046C3.64858 20.8578 3.99196 21 4.35 21H19.65C20.008 21 20.3514 20.8578 20.6046 20.6046C20.8578 20.3514 21 20.008 21 19.65V4.35C21 3.99196 20.8578 3.64858 20.6046 3.39541C20.3514 3.14223 20.008 3 19.65 3ZM8.4 18.3H5.7V10.2H8.4V18.3ZM7.05 8.625C6.74056 8.61616 6.4406 8.51632 6.18758 8.33797C5.93456 8.15962 5.7397 7.91066 5.62737 7.6222C5.51503 7.33374 5.49019 7.01857 5.55595 6.71607C5.6217 6.41358 5.77515 6.13716 5.9971 5.92138C6.21906 5.70559 6.49968 5.55999 6.80391 5.50278C7.10814 5.44556 7.42248 5.47927 7.70766 5.59969C7.99284 5.7201 8.23622 5.92189 8.40737 6.17983C8.57853 6.43778 8.66987 6.74044 8.67 7.05C8.66289 7.47331 8.4885 7.8766 8.18495 8.17173C7.88139 8.46685 7.47335 8.62982 7.05 8.625ZM18.3 18.3H15.6V14.034C15.6 12.756 15.06 12.297 14.358 12.297C14.1522 12.3107 13.9511 12.3649 13.7663 12.4566C13.5815 12.5482 13.4166 12.6755 13.2811 12.831C13.1457 12.9866 13.0422 13.1674 12.9768 13.363C12.9114 13.5586 12.8853 13.7652 12.9 13.971C12.8955 14.0129 12.8955 14.0551 12.9 14.097V18.3H10.2V10.2H12.81V11.37C13.0733 10.9695 13.435 10.6433 13.8605 10.4227C14.286 10.2021 14.761 10.0944 15.24 10.11C16.635 10.11 18.264 10.884 18.264 13.404L18.3 18.3Z' fill='black'/%3E%3C/svg%3E");
}

body.dark-mode .contacts a,
body.dark-mode .location {
  background: rgba(20, 33, 52, 0.95);
}

h2 {
  font-size: 1rem;
  margin-bottom: 0.7rem;
}

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

.strengths li {
  border-left: 3px solid var(--accent);
  padding-left: 0.65rem;
  line-height: 1.45;
}

.ai-box {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent)),
    var(--surface-strong);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}

.ai-list {
  gap: 0.58rem;
}

.ai-list li {
  border-left: 0;
  padding-left: 0;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 10px;
  padding: 0.52rem 0.62rem;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  font-family: var(--font-ai);
  font-size: 0.86rem;
  line-height: 1.4;
}

.ai-list li::before {
  content: ">";
  color: var(--accent);
  margin-right: 0.46rem;
  font-weight: 700;
}

.ai-typing {
  position: relative;
}

.ai-typing.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 1.05em;
  margin-left: 0.16em;
  vertical-align: -0.16em;
  background: color-mix(in srgb, var(--accent) 84%, var(--text));
  animation: caretBlink 0.9s steps(1, end) infinite;
}

.impact-card {
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--accent) 13%, transparent) 0%, transparent 46%),
    linear-gradient(150deg, color-mix(in srgb, var(--accent) 8%, transparent), color-mix(in srgb, var(--accent-2) 8%, transparent)),
    var(--surface-strong);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
}

.project-box {
  background:
    radial-gradient(circle at 86% 14%, color-mix(in srgb, var(--accent-2) 13%, transparent) 0%, transparent 44%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent-2) 8%, transparent), color-mix(in srgb, var(--accent) 6%, transparent)),
    var(--surface-strong);
  border-color: color-mix(in srgb, var(--accent-2) 16%, var(--border));
}

#cv-project article {
  margin-top: 0.2rem;
}

#cv-project small {
  color: var(--muted);
  font-size: 0.8rem;
}

#cv-project p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-reference-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.52;
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.project-reference-link:hover,
.project-reference-link:focus-visible {
  opacity: 0.84;
  text-decoration: underline;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.impact-item {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem;
}

body.dark-mode .impact-item {
  background: rgba(18, 30, 47, 0.92);
  border-color: rgba(166, 195, 227, 0.24);
}

.impact-value {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.impact-item p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

body.dark-mode .impact-item p {
  color: var(--muted);
}

.layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.45fr 1fr;
}

.main-col {
  display: grid;
  gap: 1rem;
}

#cv-experience article {
  position: relative;
  padding: 0.18rem 0 0.05rem 1.55rem;
  margin-top: 1.1rem;
}

#cv-experience {
  position: relative;
}

#cv-experience::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  bottom: 0.42rem;
  left: 0.44rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(5, 87, 179, 0.4), rgba(0, 138, 122, 0.2));
}

#cv-experience article::before {
  content: "";
  position: absolute;
  left: 0.17rem;
  top: 0.4rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: none;
}

#cv-experience article:first-child {
  margin-top: 0.35rem;
}

#cv-experience article:not(:last-child) {
  padding-bottom: 0.5rem;
}

#cv-experience small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

#cv-experience p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

#cv-education {
  margin: 0;
  line-height: 1.5;
  white-space: pre-line;
}

ul {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
}

li {
  line-height: 1.42;
}

.stealth-link,
.stealth-link:visited,
.stealth-link:hover,
.stealth-link:active {
  color: inherit;
  text-decoration: none;
  font: inherit;
}

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

.keywords {
  color: var(--muted);
  line-height: 1.5;
}

.footer-bar {
  position: static;
  margin-top: 0.4rem;
  padding: 0.7rem 0 calc(1rem + var(--safe-area-bottom));
  background: transparent;
  border-top: 1px solid rgba(16, 33, 54, 0.12);
}

body.dark-mode .footer-bar {
  background: transparent;
  border-top-color: rgba(166, 195, 227, 0.18);
}

.footer-shell {
  display: grid;
  gap: 0.5rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.footer-row-top {
  justify-content: flex-end;
}

.footer-info {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  opacity: 0.82;
}

.footer-info a,
.footer-meta a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
}

.footer-info a::after,
.footer-meta a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.footer-info a:hover::after,
.footer-meta a:hover::after {
  transform: scaleX(1);
}

.footer-divider {
  height: 1px;
  width: 100%;
  background: var(--border);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
  opacity: 0.82;
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-label {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 500;
  opacity: 0.72;
  margin: 0 0.34rem 0 0.12rem;
  padding-right: 0.42rem;
  border-right: 1px solid rgba(16, 33, 54, 0.14);
}

body.dark-mode .footer-label {
  border-right-color: rgba(166, 195, 227, 0.18);
}

.footer-segment {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 0.05rem;
}

.footer-btn {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.81rem;
  font-weight: 500;
  padding: 0.2rem 0.38rem;
  cursor: pointer;
  opacity: 0.82;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.footer-btn:hover {
  opacity: 1;
  background: rgba(5, 87, 179, 0.07);
}

.footer-btn.active {
  color: var(--text);
  font-weight: 600;
  opacity: 1;
  background: rgba(5, 87, 179, 0.09);
}

body.dark-mode .footer-btn.active {
  background: rgba(97, 167, 255, 0.16);
}

.a11y-dock {
  position: fixed;
  right: clamp(0.55rem, 1.8vw, 1.15rem);
  bottom: calc(clamp(0.55rem, 1.8vw, 1.15rem) + var(--safe-area-bottom));
  z-index: 32;
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.a11y-toggle {
  border: 0;
  background: transparent;
  color: var(--accent);
  border-radius: 10px;
  width: 3.04rem;
  height: 3.04rem;
  font: inherit;
  font-size: 1.18rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.a11y-toggle-icon {
  width: 1.78rem;
  height: 1.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.a11y-toggle-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
}

.a11y-panel {
  width: min(92vw, 290px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 95%, white);
  box-shadow: var(--shadow);
  padding: 0.72rem;
}

.a11y-panel h2 {
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.55rem;
}

.a11y-actions {
  display: grid;
  gap: 0.42rem;
}

.a11y-zoom-control {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.56rem 0.56rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.a11y-zoom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 0.42rem;
}

.a11y-zoom-slider {
  width: 100%;
  accent-color: var(--accent);
}

.a11y-action {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.48rem 0.56rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.a11y-action-label {
  min-width: 0;
}

.a11y-switch {
  width: 2.15rem;
  height: 1.24rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--muted) 40%, var(--border));
  background: color-mix(in srgb, var(--muted) 16%, transparent);
  display: inline-flex;
  align-items: center;
  padding: 0.1rem;
  flex: 0 0 auto;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.a11y-switch-thumb {
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-strong) 90%, white);
  border: 1px solid color-mix(in srgb, var(--muted) 28%, var(--border));
  transform: translateX(0);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.a11y-action[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
  background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
}

.a11y-action[aria-pressed="true"] .a11y-switch {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--border));
  background: color-mix(in srgb, var(--accent) 34%, var(--accent-soft));
}

.a11y-action[aria-pressed="true"] .a11y-switch-thumb {
  transform: translateX(0.9rem);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  background: color-mix(in srgb, white 90%, var(--accent-soft));
}

.a11y-action-reset {
  border: 1px solid color-mix(in srgb, #c43a3a 44%, var(--border));
  background: color-mix(in srgb, #c43a3a 11%, transparent);
  color: color-mix(in srgb, #8e2020 74%, var(--text));
  font-weight: 500;
  justify-content: center;
}

.a11y-action-reset:hover {
  border-color: color-mix(in srgb, #c43a3a 64%, var(--border));
  background: color-mix(in srgb, #c43a3a 17%, transparent);
}

html.dark-mode .a11y-action-reset {
  border-color: color-mix(in srgb, #ff9f9f 46%, var(--border));
  background: color-mix(in srgb, #ff6f6f 20%, transparent);
  color: #ffd9d9;
}

.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.995);
  transition:
    opacity 0.56s cubic-bezier(0.2, 0.65, 0.2, 1),
    transform 0.56s cubic-bezier(0.2, 0.65, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

html.high-contrast {
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --border: rgba(0, 0, 0, 0.5);
  --text: #081627;
  --muted: #133b68;
  --accent: #005ec9;
  --accent-2: #007f70;
  --accent-soft: #d6e9ff;
}

html.dark-mode.high-contrast,
html.dark-mode.high-contrast body {
  --surface: rgba(9, 17, 29, 0.98);
  --surface-strong: #0c1828;
  --border: rgba(219, 233, 252, 0.42);
  --text: #f8fbff;
  --muted: #d2e4ff;
  --accent: #8ec6ff;
  --accent-2: #78f1e2;
  --accent-soft: rgba(146, 198, 255, 0.26);
}

html.reduce-motion-force body,
html.reduce-motion-force body.dark-mode,
html.reduce-motion-force body::before,
html.reduce-motion-force .reveal,
html.reduce-motion-force .card,
html.reduce-motion-force .contacts a,
html.reduce-motion-force .footer-btn,
html.reduce-motion-force .profile-flip,
html.reduce-motion-force .hero::after,
html.reduce-motion-force .ai-typing.is-typing::after,
html.reduce-motion-force .noise-layer {
  animation: none !important;
  transition: none !important;
}

html.reading-mode .summary,
html.reading-mode #cv-experience p,
html.reading-mode #cv-project p,
html.reading-mode li {
  line-height: 1.7;
}

html.reading-mode .cv {
  width: min(1040px, calc(100% - clamp(1rem, 4vw, 2rem)));
}

html.underline-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(16, 33, 54, 0.16);
    border-color: rgba(5, 87, 179, 0.24);
  }

  body.dark-mode .card:hover {
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
    border-color: rgba(97, 167, 255, 0.3);
  }
}

@keyframes orbDrift {
  0% {
    transform: translateY(calc(var(--parallax-y) * -0.22)) translateX(0);
  }

  100% {
    transform: translateY(calc(var(--parallax-y) * -0.22)) translateX(-16px);
  }
}

@keyframes avatarFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes ambientShift {
  0% {
    background-position: 14% 14%, 86% 0%, 8% 88%, 62% 72%, 50% 50%;
  }

  50% {
    background-position: 20% 9%, 80% 8%, 12% 80%, 58% 66%, 52% 48%;
  }

  100% {
    background-position: 10% 18%, 88% 4%, 6% 92%, 66% 76%, 48% 52%;
  }
}

@keyframes ambientShiftDark {
  0% {
    background-position: 14% 14%, 86% 0%, 8% 88%, 62% 72%, 50% 50%;
  }

  50% {
    background-position: 18% 10%, 82% 7%, 12% 84%, 58% 66%, 53% 47%;
  }

  100% {
    background-position: 11% 17%, 89% 3%, 7% 91%, 66% 76%, 47% 53%;
  }
}

@keyframes colorWash {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(4px) saturate(120%) hue-rotate(0deg);
  }

  50% {
    transform: translate3d(-1.6%, 1.2%, 0) scale(1.03);
    filter: blur(5px) saturate(148%) hue-rotate(10deg);
  }

  100% {
    transform: translate3d(1.8%, -1.4%, 0) scale(1.05);
    filter: blur(4px) saturate(136%) hue-rotate(-8deg);
  }
}

@keyframes caretBlink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@media (min-width: 1600px) {
  .wrapper {
    width: min(1240px, calc(100% - clamp(1.75rem, 3vw, 3rem)));
  }

  .cv {
    gap: clamp(1rem, 1.2vw, 1.2rem);
    padding:
      calc(clamp(2.45rem, 3vw, 2.9rem) + var(--safe-area-top))
      var(--content-safe-area-right)
      2.6rem
      var(--content-safe-area-left);
    padding:
      calc(clamp(2.45rem, 3vw, 2.9rem) + max(var(--safe-area-top), var(--safe-area-top-fallback)))
      var(--content-safe-area-right)
      2.6rem
      var(--content-safe-area-left);
  }

  .card {
    padding: 1.25rem 1.35rem;
  }

  .hero-grid {
    gap: 1.15rem;
  }

  h1 {
    font-size: clamp(2.1rem, 2.9vw, 3.35rem);
  }

  .summary {
    max-width: 78ch;
    font-size: 1.03rem;
    line-height: 1.6;
  }

  #cv-experience p,
  #cv-project p,
  li {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

@media (min-width: 2200px) {
  .wrapper {
    width: min(1360px, calc(100% - clamp(2rem, 3vw, 3.5rem)));
  }

  .cv {
    gap: clamp(1.1rem, 1.1vw, 1.3rem);
    padding:
      calc(2.75rem + var(--safe-area-top))
      var(--content-safe-area-right)
      2.9rem
      var(--content-safe-area-left);
    padding:
      calc(2.75rem + max(var(--safe-area-top), var(--safe-area-top-fallback)))
      var(--content-safe-area-right)
      2.9rem
      var(--content-safe-area-left);
  }

  .card {
    padding: 1.35rem 1.5rem;
    border-radius: 20px;
  }

  h1 {
    font-size: clamp(2.28rem, 2.5vw, 3.7rem);
  }

  .title {
    font-size: 1.08rem;
  }

  .summary {
    max-width: 76ch;
    font-size: 1.08rem;
  }

  #cv-experience p,
  #cv-project p,
  li {
    font-size: 0.98rem;
  }
}

@media (min-resolution: 2dppx) and (min-width: 1600px) {
  .card {
    border-color: color-mix(in srgb, var(--border) 82%, var(--text));
    box-shadow: 0 18px 42px color-mix(in srgb, var(--text) 10%, transparent);
  }

  body.dark-mode .card {
    border-color: color-mix(in srgb, var(--border) 88%, #d9e8ff 12%);
  }
}

@media (max-width: 940px) {
  .top-boxes {
    grid-template-columns: 1fr;
  }

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

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

  .hero-body {
    padding-left: 0.2rem;
  }

  .hero h1 {
    text-align: center;
  }

  .hero .title {
    width: min(100%, 52ch);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .hero .summary {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

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

  .profile-flip {
    justify-self: center;
    width: 145px;
    height: 145px;
  }

  .contacts {
    justify-content: center;
    align-items: center;
  }

  .topbar-inner {
    justify-content: center;
    padding-left: var(--content-safe-area-left);
    padding-right: var(--content-safe-area-right);
  }

  .footer-shell {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .footer-divider {
    display: none;
  }

  .footer-row-bottom {
    order: 1;
    display: contents;
  }

  .footer-row-top {
    order: 2;
    justify-content: center;
  }

  .footer-row-bottom .footer-group[aria-label="Language"] {
    order: 1;
    justify-content: center;
  }

  .footer-meta {
    order: 3;
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    --flow-duration: 0s;
    transition: none !important;
  }

  body,
  body.dark-mode,
  body::before,
  .reveal,
  .card,
  .contacts a,
  .footer-btn,
  .profile-flip,
  .hero::after,
  .ai-typing.is-typing::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 620px) {
  body.dark-mode,
  html.dark-mode body {
    background:
      radial-gradient(circle at 12% 14%, color-mix(in srgb, var(--bg-dark-a) 68%, transparent) 0%, transparent 56%),
      radial-gradient(circle at 86% 4%, color-mix(in srgb, var(--bg-dark-b) 60%, transparent) 0%, transparent 50%),
      radial-gradient(circle at 8% 90%, color-mix(in srgb, var(--bg-dark-c) 54%, transparent) 0%, transparent 44%),
      radial-gradient(circle at 64% 76%, color-mix(in srgb, var(--bg-dark-d) 46%, transparent) 0%, transparent 36%),
      linear-gradient(165deg, #010309 0%, #010711 46%, #030614 72%, #010208 100%);
  }

  .card {
    padding: 0.95rem;
  }

  .controls {
    justify-content: flex-end;
  }

  #cv-experience article {
    padding-left: 1.1rem;
  }

  .contacts {
    gap: 0.42rem;
  }

  .contacts a,
  .location {
    width: auto;
    max-width: 100%;
    min-height: 1.85rem;
    padding: 0.32rem 0.56rem;
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .contact-chip::before {
    width: 0.82rem;
    height: 0.82rem;
    flex: 0 0 auto;
  }

  .profile-flip {
    width: 125px;
    height: 125px;
  }

  .noise-layer {
    opacity: 0.1;
    transition: none;
  }

  body::before {
    animation-duration: 30s;
    filter: blur(3px) saturate(110%);
  }

  .footer-row {
    justify-content: center;
  }

  .footer-meta a {
    display: none;
  }

  .a11y-dock {
    right: 0.45rem;
    left: 0.45rem;
    justify-items: stretch;
  }

  .a11y-toggle {
    width: 2.7rem;
    justify-self: end;
  }

  .a11y-panel {
    width: 100%;
  }
}

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

  html,
  body {
    background: #ffffff !important;
  }

  body * {
    display: none !important;
  }

  #print-blocked-message,
  #print-blocked-message * {
    display: block !important;
  }

  #print-blocked-message {
    max-width: 620px;
    margin: 18mm auto 0;
    padding: 0;
    font-family: var(--font-main);
    color: #0f2238;
    text-align: left;
  }

  #print-blocked-title {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    line-height: 1.15;
  }

  #print-blocked-copy {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
  }
}

#cv-skills-mobile.mobile-chip-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.46rem;
}

#cv-skills-mobile .mobile-chip {
  list-style: none;
  padding: 0.28rem 0.62rem;
  margin: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: color-mix(in srgb, var(--text) 92%, #000 8%);
  background: color-mix(in srgb, var(--accent-soft) 42%, #ffffff 58%);
}

#cv-skills-mobile .mobile-chip:nth-child(2n) {
  background: color-mix(in srgb, var(--accent-soft) 34%, #ffffff 66%);
}

#cv-skills-mobile .mobile-chip:nth-child(3n) {
  background: color-mix(in srgb, var(--accent-2) 10%, #ffffff 90%);
}

#cv-skills-mobile .mobile-chip:nth-child(4n) {
  background: color-mix(in srgb, var(--accent) 9%, #ffffff 91%);
}

#cv-skills-mobile .mobile-chip:nth-child(5n) {
  background: color-mix(in srgb, var(--accent-2) 8%, #ffffff 92%);
}

body.dark-mode #cv-skills-mobile .mobile-chip {
  color: #eef6ff;
  border-color: color-mix(in srgb, var(--accent) 24%, rgba(178, 207, 238, 0.34));
  background: color-mix(in srgb, var(--accent) 16%, rgba(20, 34, 54, 0.94));
}

body.dark-mode #cv-skills-mobile .mobile-chip:nth-child(2n) {
  background: color-mix(in srgb, var(--accent-2) 14%, rgba(20, 34, 54, 0.94));
}

body.dark-mode #cv-skills-mobile .mobile-chip:nth-child(3n) {
  background: color-mix(in srgb, var(--accent) 12%, rgba(22, 36, 57, 0.95));
}

body.dark-mode #cv-skills-mobile .mobile-chip:nth-child(4n) {
  background: color-mix(in srgb, var(--accent-2) 10%, rgba(22, 36, 57, 0.95));
}

body.dark-mode #cv-skills-mobile .mobile-chip:nth-child(5n) {
  background: color-mix(in srgb, var(--accent) 10%, rgba(22, 36, 57, 0.95));
}
