:root {
  color-scheme: dark;
  --bg-main: #02070d;
  --bg-section: #040b13;
  --bg-card: #07111c;
  --bg-card-soft: #050e18;
  --border: #0b2944;
  --border-light: #0d385d;
  --blue: #008cff;
  --blue-bright: #23b5ff;
  --blue-soft: #7fd5ff;
  --text-main: #f3f7fb;
  --text-secondary: #a9b7c6;
  --text-muted: #708195;
  --container: 1220px;
  --header-height: 78px;
  --radius: 13px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: soft-light;
}

::selection {
  background: rgba(0, 140, 255, 0.35);
  color: #fff;
}

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

img {
  display: block;
  max-width: 100%;
}

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

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container,
.nav-shell {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-height);
  z-index: 50;
  border-bottom: 1px solid rgba(17, 59, 93, 0.55);
  background: rgba(2, 7, 13, 0.76);
  backdrop-filter: blur(18px) saturate(140%);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.site-header.scrolled {
  background: rgba(2, 7, 13, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.nav-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 190px 1fr 190px;
  align-items: center;
  gap: 24px;
}

.brand {
  width: max-content;
  line-height: 1;
}

.brand strong {
  display: block;
  color: #d8efff;
  font-size: 27px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(0, 166, 255, 0.4);
}

.brand span {
  display: block;
  margin-top: 5px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 2.3vw, 36px);
}

.main-nav a {
  position: relative;
  padding: 28px 0 25px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: color 180ms ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 1px;
  background: var(--blue-bright);
  box-shadow: 0 0 8px var(--blue);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue-bright);
}

.main-nav a.active::after,
.main-nav a:hover::after {
  transform: scaleX(1);
}

.button {
  min-height: 44px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border-color: #1f9dff;
  background: linear-gradient(135deg, #006cf0, #088dfc);
  box-shadow: 0 8px 25px rgba(0, 111, 240, 0.2), inset 0 1px rgba(255, 255, 255, 0.12);
  color: #fff;
}

.button-primary:hover {
  box-shadow: 0 11px 30px rgba(0, 140, 255, 0.32), inset 0 1px rgba(255, 255, 255, 0.16);
}

.button-outline,
.button-dark {
  border-color: #0b61a5;
  background: rgba(4, 12, 21, 0.82);
  color: #dceaf5;
}

.button-outline:hover,
.button-dark:hover {
  border-color: var(--blue-bright);
  background: rgba(0, 107, 191, 0.1);
}

.cv-button {
  justify-self: end;
  min-width: 151px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-main);
}

.hero {
  position: relative;
  min-height: 650px;
  padding-top: var(--header-height);
  overflow: hidden;
  border-bottom: 1px solid rgba(9, 48, 80, 0.3);
  isolation: isolate;
}

.hero-background {
  position: absolute;
  inset: var(--header-height) 0 0;
  z-index: -3;
  background-image: linear-gradient(90deg, rgba(2, 7, 13, 0.98) 2%, rgba(2, 7, 13, 0.9) 32%, rgba(2, 7, 13, 0.36) 67%, rgba(2, 7, 13, 0.42) 100%), url("assets/images/hero-background.webp");
  background-size: cover;
  background-position: center 54%;
  filter: saturate(0.92) brightness(0.74);
}

.hero-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg-main) 100%);
}

.hero-glow {
  position: absolute;
  z-index: -2;
  top: 120px;
  left: 7%;
  width: 420px;
  height: 360px;
  border-radius: 50%;
  background: rgba(0, 97, 171, 0.12);
  filter: blur(110px);
}

.hero-layout {
  position: relative;
  min-height: 572px;
  display: grid;
  grid-template-columns: 54% 46%;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 660px;
  padding: 55px 0 43px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue-bright);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.section-kicker {
  display: none;
}

.hero h1 {
  margin: 0;
  max-width: 600px;
  font-size: clamp(50px, 5.3vw, 74px);
  font-weight: 800;
  letter-spacing: -0.052em;
  line-height: 0.98;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.52);
}

.hero h2 {
  margin: 20px 0 4px;
  color: #31aafd;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 600;
  line-height: 1.2;
}

.specialties {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  color: #d8e2eb;
  font-size: 14px;
  font-weight: 500;
}

.specialties i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 6px var(--blue);
}

.hero-description {
  max-width: 600px;
  margin: 19px 0 22px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.location {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 20px 0 0;
  color: #94a9bd;
  font-size: 12px;
}

.location svg {
  color: var(--blue-bright);
}

.location span {
  color: #39536a;
}

.hero-portrait {
  position: absolute;
  right: -18px;
  bottom: -8px;
  z-index: 2;
  width: min(46vw, 575px);
  height: 555px;
}

.hero-portrait img {
  position: absolute;
  right: 25px;
  bottom: 0;
  width: auto;
  height: 540px;
  object-fit: contain;
  object-position: bottom right;
  filter: drop-shadow(-20px 10px 28px rgba(0, 0, 0, 0.55));
}

.portrait-halo {
  position: absolute;
  right: 10px;
  bottom: 58px;
  width: 380px;
  height: 390px;
  border-radius: 48%;
  background: radial-gradient(circle, rgba(0, 137, 255, 0.18), transparent 67%);
  filter: blur(12px);
}

.handwritten {
  position: absolute;
  right: -8px;
  bottom: 105px;
  z-index: 3;
  margin: 0;
  color: #7fcaff;
  font-family: "Caveat", cursive;
  font-size: 27px;
  font-weight: 500;
  line-height: 0.95;
  text-align: center;
  transform: rotate(-7deg);
  text-shadow: 0 0 14px rgba(0, 140, 255, 0.42);
}

.metrics-section {
  position: relative;
  z-index: 8;
  margin-top: -58px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(4, 11, 19, 0.95);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(16px);
}

.metric {
  position: relative;
  min-height: 122px;
  padding: 25px 23px;
  display: flex;
  align-items: flex-start;
  gap: 17px;
}

.metric:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 26px;
  right: 0;
  bottom: 26px;
  width: 1px;
  background: linear-gradient(transparent, #123754, transparent);
}

.metric-icon {
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #0b416c;
  border-radius: 10px;
  background: #051526;
  color: var(--blue-bright);
}

.metric-icon svg {
  width: 23px;
  height: 23px;
}

.metric strong {
  display: block;
  color: #dff3ff;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.05;
}

.metric p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.section {
  padding: 66px 0 0;
}

.section h2,
.contact h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 35px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 325px;
  align-items: center;
  gap: 80px;
}

.section-copy > p:not(.section-kicker) {
  max-width: 770px;
  margin: 16px 0 23px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.button-small {
  min-height: 40px;
  padding-inline: 18px;
  font-size: 12px;
}

.values-card {
  position: relative;
  padding: 22px 25px;
  display: grid;
  gap: 15px;
  border: 1px solid rgba(11, 41, 68, 0.72);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(7, 17, 28, 0.88), rgba(3, 9, 16, 0.96));
}

.values-card::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 2px;
  background: linear-gradient(transparent, var(--blue), transparent);
  box-shadow: 0 0 9px var(--blue);
}

.values-card div {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #abc0d3;
  font-size: 13px;
}

.values-card svg {
  color: var(--blue-bright);
}

.section-heading {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  color: var(--blue-bright);
  font-size: 12px;
  font-weight: 500;
}

.text-link svg {
  transition: transform 180ms ease;
}

.text-link:hover svg {
  transform: translateX(4px);
}

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

.project-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(155deg, #081522, #040b13 75%);
  box-shadow: 0 13px 32px rgba(0, 0, 0, 0.18);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: #12588e;
  box-shadow: 0 19px 40px rgba(0, 0, 0, 0.3), 0 0 22px rgba(0, 118, 217, 0.08);
}

.project-image {
  position: relative;
  aspect-ratio: 16 / 7.6;
  margin: 14px 14px 0;
  overflow: hidden;
  border-radius: 7px;
  background: #07131f;
}

.project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(2, 7, 13, 0.5));
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover .project-image img {
  transform: scale(1.035);
}

.project-body {
  padding: 16px 17px 18px;
}

.project-body h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.project-body p {
  min-height: 45px;
  margin: 7px 0 13px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tags span {
  padding: 4px 9px;
  border: 1px solid #0d548d;
  border-radius: 5px;
  background: rgba(0, 99, 181, 0.12);
  color: #bfe5ff;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
}

.tech-strip {
  padding: 21px 22px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  border: 1px solid rgba(11, 41, 68, 0.55);
  border-radius: var(--radius);
  background: rgba(5, 13, 22, 0.7);
}

.tech {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #c2d0dc;
  font-size: 10px;
}

.tech img {
  width: 37px;
  height: 37px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 123, 219, 0.2));
  transition: transform 180ms ease, filter 180ms ease;
}

.tech:hover img {
  transform: translateY(-3px);
  filter: drop-shadow(0 0 10px rgba(0, 164, 255, 0.42));
}

.anchor-target {
  position: relative;
  top: -80px;
}

.experience {
  padding-bottom: 67px;
}

.experience-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  align-items: center;
  gap: 70px;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 12px;
  left: 7px;
  width: 1px;
  background: linear-gradient(var(--blue-bright), #0b5186 80%, transparent);
}

.timeline article {
  position: relative;
  padding: 0 0 25px 37px;
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 18px;
}

.timeline article:last-child {
  padding-bottom: 0;
}

.timeline article::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 1px;
  width: 11px;
  height: 11px;
  border: 3px solid #007bf0;
  border-radius: 50%;
  background: #84d8ff;
  box-shadow: 0 0 11px rgba(0, 140, 255, 0.85);
}

.timeline-date {
  color: var(--blue-bright);
  font-size: 11px;
  font-weight: 600;
}

.timeline-content h3 {
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.35;
}

.timeline-content h3 span {
  color: #d9e8f4;
  font-weight: 500;
}

.timeline-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.55;
}

.quote-card {
  position: relative;
  margin: 0;
  padding: 31px 31px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(6, 18, 30, 0.95), rgba(3, 9, 16, 0.82));
  color: #79caff;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.48;
  box-shadow: inset 0 0 40px rgba(0, 92, 163, 0.05);
}

.quote-card span {
  position: absolute;
  top: 9px;
  left: 16px;
  color: rgba(0, 153, 255, 0.25);
  font-size: 52px;
  font-family: Georgia, serif;
  line-height: 1;
}

.contact {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(100deg, #04101c, #061426 62%, #071834);
}

.contact-glow {
  position: absolute;
  right: 6%;
  bottom: -150px;
  width: 500px;
  height: 280px;
  border-radius: 50%;
  background: rgba(0, 111, 255, 0.21);
  filter: blur(100px);
}

.contact-grid {
  position: relative;
  min-height: 192px;
  padding-block: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 45px;
}

.contact h2 {
  font-size: 31px;
}

.contact-lead {
  margin: 6px 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #b4c7d8;
  font-size: 12px;
  transition: color 180ms ease;
}

.contact-list a:hover {
  color: #fff;
}

.contact-list svg {
  color: var(--blue-bright);
}

.contact-button {
  min-width: 240px;
  min-height: 58px;
  font-size: 14px;
}

.site-footer {
  padding: 24px 0 28px;
  background: #02070d;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 40px;
}

.footer-identity {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-identity strong {
  color: #dff3ff;
  font-size: 26px;
  letter-spacing: 0.06em;
}

.footer-identity p {
  margin: 0;
  color: #c2d0dc;
  font-size: 10px;
  line-height: 1.5;
}

.footer-identity span {
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 42px;
}

.footer-links a {
  color: var(--blue-bright);
  font-size: 11px;
}

.footer-words {
  justify-self: end;
  margin: 0;
  color: #087ac8;
  font-size: 9px;
  line-height: 1.2;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  padding: 12px 16px;
  border: 1px solid #0d5f9d;
  border-radius: 8px;
  background: #071421;
  color: #dceaf5;
  font-size: 12px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  .nav-shell {
    grid-template-columns: 150px 1fr 150px;
    gap: 14px;
  }

  .main-nav { gap: 18px; }
  .main-nav a { font-size: 12px; }
  .cv-button { min-width: 140px; padding-inline: 13px; }
  .hero-layout { grid-template-columns: 57% 43%; }
  .hero-portrait { right: -35px; width: 48vw; }
  .hero-portrait img { height: 500px; }
  .handwritten { right: 4px; }
  .metric { padding-inline: 17px; gap: 12px; }
  .metric-icon { flex-basis: 38px; width: 38px; height: 38px; }
  .metric strong { font-size: 22px; }
  .about-grid { gap: 50px; }
  .experience-grid { gap: 45px; }
  .tech-strip { grid-template-columns: repeat(5, 1fr); row-gap: 24px; }
}

@media (max-width: 860px) {
  :root { --header-height: 68px; }
  .container, .nav-shell { width: min(calc(100% - 36px), var(--container)); }
  .nav-shell { grid-template-columns: 1fr auto auto; }
  .menu-toggle { display: inline-flex; order: 3; }
  .cv-button { order: 2; min-width: auto; }
  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 auto;
    padding: 18px;
    display: grid;
    gap: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(3, 9, 16, 0.98);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 230ms ease, opacity 230ms ease, visibility 230ms ease;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav a { padding: 13px 18px; border-bottom: 1px solid rgba(11, 41, 68, 0.45); font-size: 14px; }
  .main-nav a::after { display: none; }
  .hero { min-height: auto; }
  .hero-layout { min-height: 780px; grid-template-columns: 1fr; align-items: start; }
  .hero-copy { max-width: 620px; padding-top: 54px; }
  .hero-portrait { right: 1%; bottom: 0; width: 52%; height: 480px; }
  .hero-portrait img { right: 0; height: 470px; }
  .hero-background { background-position: 63% center; }
  .handwritten { right: -1px; bottom: 22px; font-size: 24px; }
  .metrics-section { margin-top: -32px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2)::after { display: none; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .values-card { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card:last-child { grid-column: 1 / -1; max-width: calc(50% - 11px); }
  .experience-grid { grid-template-columns: 1fr; gap: 34px; }
  .quote-card { max-width: 440px; }
  .contact-grid { grid-template-columns: 1fr auto; }
  .contact-list { gap: 12px 20px; }
  .contact-button { min-width: 180px; }
}

@media (max-width: 620px) {
  .container, .nav-shell { width: min(calc(100% - 28px), var(--container)); }
  .brand strong { font-size: 23px; }
  .brand span { display: none; }
  .cv-button { min-height: 38px; padding-inline: 12px; font-size: 11px; }
  .cv-button svg { display: none; }
  .hero-layout { min-height: 925px; }
  .hero-copy { padding-top: 42px; }
  .hero h1 { font-size: clamp(46px, 14vw, 62px); }
  .hero h2 { margin-top: 16px; font-size: 23px; }
  .specialties { font-size: 12px; }
  .hero-description { font-size: 14px; }
  .hero-actions .button { flex: 1 1 calc(50% - 6px); padding-inline: 10px; }
  .hero-actions .button-primary { flex-basis: 100%; }
  .location { align-items: flex-start; font-size: 11px; }
  .hero-portrait { right: 0; width: 100%; height: 485px; }
  .hero-portrait img { right: 50%; height: 465px; transform: translateX(50%); }
  .portrait-halo { right: 50%; transform: translateX(50%); }
  .handwritten { right: 4%; bottom: 27px; }
  .metrics-section { margin-top: -20px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 132px; padding: 19px 15px; display: block; }
  .metric:nth-child(odd)::after { top: 15px; bottom: 15px; }
  .metric-icon { margin-bottom: 10px; }
  .metric strong { font-size: 21px; }
  .metric p { margin-top: 5px; font-size: 10px; }
  .section { padding-top: 54px; }
  .about-grid { gap: 25px; }
  .values-card { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card:last-child { grid-column: auto; max-width: none; }
  .project-body p { min-height: auto; }
  .tech-strip { grid-template-columns: repeat(3, 1fr); padding-inline: 10px; }
  .timeline article { grid-template-columns: 1fr; gap: 4px; }
  .timeline-content h3 { font-size: 13px; }
  .quote-card { font-size: 19px; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-list { display: grid; }
  .contact-button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .footer-identity { justify-content: center; }
  .footer-links { justify-content: center; gap: 32px; }
  .footer-words { display: none; }
}

@media (max-width: 540px) {
  .cv-button { display: none; }
  .nav-shell { grid-template-columns: 1fr auto; }
}

@media (max-width: 390px) {
  .hero-layout { min-height: 940px; }
  .hero h1 { font-size: 44px; }
  .handwritten { font-size: 21px; }
}
