/* =========================================================
   Maksym Piatkivskyi — Portfolio
   Design tokens
   ========================================================= */
:root {
  --bg: #05060a;
  --bg-2: #090b12;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-2: rgba(255, 255, 255, 0.16);

  --text: #eef0f6;
  --muted: #9aa2b1;
  --faint: #6b7180;

  --violet: #7c5cff;
  --fuchsia: #d136e6;
  --cyan: #2ad8e6;
  --grad: linear-gradient(110deg, #7c5cff 0%, #c026d3 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(110deg, #8b6bff, #e25cf0, #4be3ee);

  --r-sm: 14px;
  --r: 20px;
  --r-lg: 28px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --glow: 0 0 60px -10px rgba(124, 92, 255, 0.55);

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* =========================================================
   Reset & base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ambient background wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 50% -10%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(40% 40% at 100% 10%, rgba(34, 211, 238, 0.1), transparent 60%),
    var(--bg);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: normal; }

::selection { background: rgba(124, 92, 255, 0.4); color: #fff; }

.container { width: min(var(--maxw), 92vw); margin-inline: auto; }

.section { padding: clamp(70px, 10vw, 140px) 0; position: relative; }

/* =========================================================
   Decorative grain + custom cursor
   ========================================================= */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot { width: 7px; height: 7px; background: #fff; }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s;
}
.cursor-ring.is-hover { width: 64px; height: 64px; border-color: var(--cyan); }
body.cursor-on { cursor: none; }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* scroll progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 9997; background: transparent;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: var(--grad); box-shadow: 0 0 14px rgba(124, 92, 255, 0.8);
}

/* =========================================================
   Buttons & shared bits
   ========================================================= */
.btn {
  --pad: 13px 24px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: var(--pad);
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent;
  position: relative; will-change: transform;
  transition: transform 0.25s var(--ease), box-shadow 0.3s, background 0.3s, border-color 0.3s;
}
.btn--lg { --pad: 17px 32px; font-size: 1.02rem; }
.btn--primary {
  color: #fff;
  background: var(--grad); background-size: 180% 180%;
  box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 0.7);
  animation: gradShift 6s ease infinite;
}
.btn--primary:hover { box-shadow: 0 16px 44px -8px rgba(124, 92, 255, 0.9); transform: translateY(-2px); }
.btn--ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--stroke-2);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--violet); transform: translateY(-2px); }
.btn__arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn__ico { width: 20px; height: 20px; display: block; flex: none; }

.kicker {
  display: inline-block;
  font-family: var(--font-head); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 18px;
}
.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 70px); }
.section__title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08;
  letter-spacing: -0.02em;
}
.section__sub { color: var(--muted); font-size: 1.08rem; margin-top: 18px; max-width: 60ch; }

.gradient-text {
  background: var(--grad); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gradShift 7s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.link-underline { position: relative; color: var(--muted); font-weight: 500; }
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease);
}
.link-underline:hover { color: var(--text); }
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* =========================================================
   Navbar
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 18px clamp(20px, 4vw, 48px);
  transition: background 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8, 9, 16, 0.7);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--stroke);
  padding-top: 12px; padding-bottom: 12px;
}
.nav__brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.nav__logo {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; color: #fff;
  background: var(--grad); background-size: 160% 160%;
  box-shadow: var(--glow); animation: gradShift 6s ease infinite;
}
.nav__brand-text { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.nav__brand-text .dot { color: var(--violet); }
.nav__links { display: flex; gap: 6px; }
.nav__link {
  position: relative; padding: 8px 14px; border-radius: 999px;
  font-size: 0.93rem; color: var(--muted); font-weight: 500;
  transition: color 0.25s, background 0.25s;
}
.nav__link:hover { color: var(--text); }
.nav__link.active { color: var(--text); background: var(--surface); }
.nav__cta { padding: 9px 20px; }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s var(--ease); }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); z-index: 99;
  background: rgba(8, 9, 16, 0.92); backdrop-filter: blur(20px);
  border-left: 1px solid var(--stroke);
  display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 40px;
  transform: translateX(100%); transition: transform 0.45s var(--ease); visibility: hidden;
}
.mobile-menu.open { transform: translateX(0); visibility: visible; }
.mobile-menu a { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; padding: 10px 0; color: var(--muted); transition: color 0.25s, transform 0.25s; }
.mobile-menu a:hover { color: var(--text); transform: translateX(6px); }

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 104px 0 70px; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.aurora {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.55; will-change: transform;
}
.aurora--1 { width: 50vw; height: 50vw; top: -12%; left: -8%; background: radial-gradient(circle, #7c5cff, transparent 65%); animation: float1 16s ease-in-out infinite; }
.aurora--2 { width: 42vw; height: 42vw; top: 8%; right: -10%; background: radial-gradient(circle, #d136e6, transparent 65%); animation: float2 19s ease-in-out infinite; }
.aurora--3 { width: 38vw; height: 38vw; bottom: -18%; left: 28%; background: radial-gradient(circle, #22d3ee, transparent 65%); opacity: 0.4; animation: float1 22s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,30px) scale(1.08); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px,40px) scale(1.12); } }

.hero__grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
}
#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 50px; align-items: center;
}
.hero__content { max-width: 640px; }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--stroke-2);
  font-size: 0.85rem; color: var(--muted); font-weight: 500; backdrop-filter: blur(8px);
  margin-bottom: 26px;
}
.badge__pulse { width: 8px; height: 8px; border-radius: 50%; background: #2ad8e6; box-shadow: 0 0 0 0 rgba(42,216,230,0.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(42,216,230,0.6); } 70% { box-shadow: 0 0 0 10px rgba(42,216,230,0); } 100% { box-shadow: 0 0 0 0 rgba(42,216,230,0); } }

.hero__title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 4.3rem); line-height: 1.04; letter-spacing: -0.03em;
}
.hero__title .line { display: block; }
.hero__title em { color: var(--cyan); position: relative; }

.hero__roles { font-family: var(--font-head); font-size: clamp(1.05rem, 2.4vw, 1.42rem); margin-top: 18px; color: var(--text); display: flex; align-items: center; gap: 8px; min-height: 1.6em; }
.hero__static { color: var(--violet); }
.typed { font-weight: 600; }
.caret { color: var(--cyan); animation: blink 1s steps(2) infinite; font-weight: 400; }
@keyframes blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

.hero__lede { color: var(--muted); font-size: 1.06rem; margin-top: 18px; max-width: 52ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero__meta { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 30px; color: var(--muted); font-size: 0.95rem; }
.hero__meta li { position: relative; }
.hero__meta li + li::before { content: ""; position: absolute; left: -14px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); transform: translateY(-50%); }
.hero__meta strong { color: var(--text); font-family: var(--font-head); }

/* hero photo */
.hero__visual { display: grid; place-items: center; }
.photo-frame {
  position: relative; width: clamp(240px, 28vw, 340px); aspect-ratio: 4/5;
  border-radius: var(--r-lg); will-change: transform; transform-style: preserve-3d;
}
.photo-frame__img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg);
  border: 1px solid var(--stroke-2);
  box-shadow: var(--shadow);
  filter: saturate(1.05) contrast(1.03);
}
.photo-frame__glow {
  position: absolute; inset: -3px; border-radius: calc(var(--r-lg) + 3px); z-index: -1;
  background: var(--grad); background-size: 200% 200%;
  filter: blur(22px); opacity: 0.6; animation: gradShift 6s ease infinite;
}
.photo-frame__ring {
  position: absolute; inset: -10px; border-radius: calc(var(--r-lg) + 10px);
  border: 1px solid var(--stroke-2);
  -webkit-mask: linear-gradient(#000, transparent 70%);
  mask: linear-gradient(#000, transparent 70%);
}
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 12px; font-size: 0.82rem; font-weight: 600;
  background: rgba(12,14,22,0.82); border: 1px solid var(--stroke-2);
  backdrop-filter: blur(10px); box-shadow: var(--shadow);
  transform: translateZ(60px);
}
.float-chip img { width: 17px; height: 17px; }
.float-chip--1 { top: 12%; left: -16%; animation: bob 5s ease-in-out infinite; }
.float-chip--2 { top: 46%; right: -20%; animation: bob 5.6s ease-in-out infinite 0.4s; }
.float-chip--3 { bottom: 10%; left: -10%; animation: bob 6.2s ease-in-out infinite 0.8s; }
@keyframes bob { 0%,100% { transform: translateZ(60px) translateY(0); } 50% { transform: translateZ(60px) translateY(-10px); } }
.photo-frame__status {
  position: absolute; bottom: -18px; right: 8px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px; font-size: 0.78rem; font-weight: 500;
  background: rgba(12,14,22,0.85); border: 1px solid var(--stroke-2); backdrop-filter: blur(10px);
  transform: translateZ(40px);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; }

.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--faint); font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
}
.mouse { width: 24px; height: 38px; border: 2px solid var(--stroke-2); border-radius: 14px; display: flex; justify-content: center; padding-top: 7px; }
.wheel { width: 3px; height: 7px; border-radius: 2px; background: var(--violet); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }

/* =========================================================
   Marquee
   ========================================================= */
.marquee { overflow: hidden; border-block: 1px solid var(--stroke); padding: 22px 0; background: rgba(255,255,255,0.015); }
.marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; animation: scroll-x 38s linear infinite; }
.marquee__track span { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--text); opacity: 0.55; white-space: nowrap; }
.marquee__track i { color: var(--violet); font-size: 0.9rem; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* =========================================================
   About
   ========================================================= */
.about__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.about__media { position: relative; }
.about__photo { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/5; max-width: 420px; transform-style: preserve-3d; will-change: transform; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.04); }
.about__photo-frame { position: absolute; inset: 0; border-radius: var(--r-lg); border: 1px solid var(--stroke-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04); background: linear-gradient(180deg, transparent 55%, rgba(5,6,10,0.55)); }

.about__body p { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }
.about__body p strong { color: var(--text); font-weight: 600; }
.about__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.about__facts li { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--stroke); }
.about__facts span { font-size: 0.78rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; }
.about__facts strong { font-family: var(--font-head); font-weight: 500; font-size: 0.98rem; }
.about__cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 32px; }

/* =========================================================
   Stats
   ========================================================= */
.stats { padding-block: clamp(50px, 7vw, 90px); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat {
  text-align: center; padding: 34px 20px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--stroke);
  position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity 0.4s; }
.stat:hover { border-color: var(--stroke-2); }
.stat__num { display: block; font-family: var(--font-head); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat__label { display: block; margin-top: 12px; color: var(--muted); font-size: 0.92rem; }

/* =========================================================
   Services / cards
   ========================================================= */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 32px 26px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--stroke);
  overflow: hidden; transform-style: preserve-3d; will-change: transform;
  transition: border-color 0.4s, transform 0.3s var(--ease), background 0.4s;
}
.card:hover { border-color: var(--stroke-2); background: var(--surface-2); }
.card__icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: #f4f6fb; border: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 20px; transform: translateZ(30px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.55); }
.card__icon img { width: 38px; height: 38px; display: block; }
.card h3 { font-family: var(--font-head); font-size: 1.18rem; font-weight: 600; transform: translateZ(20px); }
.card p { color: var(--muted); margin-top: 12px; font-size: 0.96rem; transform: translateZ(12px); }
.card__glow { position: absolute; top: var(--my, 50%); left: var(--mx, 50%); width: 280px; height: 280px; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(124,92,255,0.22), transparent 70%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.card:hover .card__glow { opacity: 1; }

/* =========================================================
   Skills
   ========================================================= */
.skills__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tech {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px 14px; border-radius: var(--r); text-align: center;
  background: var(--surface); border: 1px solid var(--stroke);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.tech img { width: 42px; height: 42px; transition: transform 0.4s var(--ease); filter: grayscale(0.15); }
.tech span { font-size: 0.88rem; color: var(--muted); font-weight: 500; }
.tech:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 9%, var(--surface)); box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--c) 80%, transparent); }
.tech:hover img { transform: scale(1.14) rotate(-4deg); filter: grayscale(0); }
.tech:hover span { color: var(--text); }

.skills__tags { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.skills__tags .kicker { margin: 0; color: var(--faint); }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; }
.tag { padding: 9px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--stroke); font-size: 0.9rem; color: var(--muted); transition: 0.3s; }
.tag:hover { border-color: var(--violet); color: var(--text); transform: translateY(-2px); }
.tag--muted { opacity: 0.6; }

/* =========================================================
   Timeline
   ========================================================= */
.timeline { position: relative; padding-left: 0; max-width: 880px; margin-inline: auto; }
.timeline__line { position: absolute; left: 24px; top: 6px; bottom: 6px; width: 2px; background: var(--stroke); border-radius: 2px; }
.timeline__progress { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: var(--grad); border-radius: 2px; box-shadow: 0 0 12px rgba(124,92,255,0.6); }
.t-item { position: relative; padding-left: 70px; margin-bottom: 26px; }
.t-item__dot {
  position: absolute; left: 15px; top: 26px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--violet); box-shadow: 0 0 0 4px rgba(124,92,255,0.15);
  z-index: 2;
}
.t-item__dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--grad); }
.t-item__dot--alt { border-color: var(--faint); box-shadow: 0 0 0 4px rgba(255,255,255,0.05); }
.t-item__dot--alt::after { background: var(--faint); }
.t-item__card {
  padding: 26px 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--stroke);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s; will-change: transform;
}
.t-item__card:hover { border-color: var(--stroke-2); background: var(--surface-2); }
.t-item__card--alt { opacity: 0.92; }
.t-item__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.t-item__date { font-family: var(--font-head); font-size: 0.85rem; color: var(--violet); font-weight: 600; letter-spacing: 0.04em; }
.t-item__tag { font-size: 0.72rem; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--stroke); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.t-item__tag--now { background: rgba(61,220,132,0.12); border-color: rgba(61,220,132,0.4); color: #5ee6a0; }
.t-item__tag--alt { opacity: 0.75; }
.t-item h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; }
.t-item h3 .grade { color: var(--faint); font-weight: 400; font-size: 0.9rem; }
.t-item__org { display: inline-block; color: var(--cyan); font-weight: 500; font-size: 0.95rem; margin-top: 2px; margin-bottom: 14px; }
.t-item ul { display: flex; flex-direction: column; gap: 8px; }
.t-item ul li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.98rem; }
.t-item ul li::before { content: "▸"; position: absolute; left: 0; color: var(--violet); }
.t-item__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.t-item__chips span { font-size: 0.78rem; padding: 5px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--stroke); color: var(--muted); }

/* =========================================================
   Languages
   ========================================================= */
.langs__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.langs__bars { display: flex; flex-direction: column; gap: 24px; }
.lang__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.lang__top span { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.lang__top em { color: var(--muted); font-size: 0.88rem; }
.bar { height: 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--stroke); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--grad); background-size: 200% 200%; box-shadow: 0 0 14px rgba(124,92,255,0.5); transition: width 1.4s var(--ease); animation: gradShift 6s ease infinite; }
.lang.in-view .bar span { width: var(--w); }

/* =========================================================
   Contact
   ========================================================= */
.contact { overflow: hidden; }
.contact__bg { position: absolute; inset: 0; z-index: 0; }
.aurora--c1 { width: 46vw; height: 46vw; top: -20%; left: -10%; background: radial-gradient(circle, #7c5cff, transparent 65%); filter: blur(80px); opacity: 0.4; }
.aurora--c2 { width: 42vw; height: 42vw; bottom: -25%; right: -12%; background: radial-gradient(circle, #22d3ee, transparent 65%); filter: blur(80px); opacity: 0.32; }
.contact__inner { position: relative; z-index: 2; text-align: center; max-width: 760px; }
.contact__title { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.1rem, 5.5vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 20px; }
.contact__sub { color: var(--muted); font-size: 1.1rem; max-width: 56ch; margin: 0 auto; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 40px; }
.contact__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 50px; text-align: left; }
.c-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--stroke); transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s; }
.c-card:hover { transform: translateY(-4px); border-color: var(--stroke-2); background: var(--surface-2); }
.c-card__ico { font-size: 1.5rem; line-height: 1; }
.c-card__ico img { width: 32px; height: 32px; display: block; }
.c-card__k { font-size: 0.78rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 8px; }
.c-card__v { font-family: var(--font-head); font-weight: 500; font-size: 0.98rem; word-break: break-word; }

/* =========================================================
   Footer
   ========================================================= */
.footer { border-top: 1px solid var(--stroke); padding: 50px 0 40px; position: relative; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand strong { display: block; font-family: var(--font-head); }
.footer__brand span { color: var(--muted); font-size: 0.88rem; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); font-size: 0.92rem; transition: color 0.25s; }
.footer__links a:hover { color: var(--text); }
.footer__note { color: var(--faint); font-size: 0.85rem; flex-basis: 100%; padding-top: 24px; margin-top: 8px; border-top: 1px solid var(--stroke); }
.to-top { position: absolute; right: clamp(20px, 4vw, 48px); top: 40px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--stroke-2); font-size: 1.2rem; transition: 0.3s; }
.to-top:hover { background: var(--grad); transform: translateY(-3px); border-color: transparent; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 60px; }
  .hero__visual { order: -1; }
  .photo-frame { width: clamp(220px, 60vw, 300px); }
  .about__grid, .langs__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 420px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .skills__grid { grid-template-columns: repeat(4, 1fr); }
  .contact__cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .about__facts { grid-template-columns: 1fr; }
  .skills__grid { grid-template-columns: repeat(3, 1fr); }
  .hero__meta { gap: 18px; }
  .float-chip--1 { left: -6%; }
  .float-chip--2 { right: -8%; }
}
@media (max-width: 480px) {
  .stats__grid, .cards { grid-template-columns: 1fr; }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .t-item { padding-left: 56px; }
  .timeline__line { left: 17px; }
  .t-item__dot { left: 8px; }
}
