/* ==========================================================================
   Yash Patil — Portfolio v4
   Near-black canvas, five-color accent system, editorial type, 3D.
   ========================================================================== */

:root {
  --bg: #08080a;
  --bg-2: #111114;
  --fg: #f4f3ef;
  --muted: #8d8d93;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .18);
  --card-hover: rgba(255, 255, 255, .06);
  --panel: color-mix(in srgb, var(--bg) 72%, transparent);

  --c1: #8b5cf6;   /* violet */
  --c2: #22d3ee;   /* cyan   */
  --c3: #a3e635;   /* lime   */
  --c4: #ff7a45;   /* orange */
  --c5: #f472b6;   /* pink   */
  --xp: #22c55e;   /* XPENC brand green */
  --live: #3ddc84;
  --grad: linear-gradient(100deg, var(--c1), var(--c2) 50%, var(--c3));
  --aurora-op: .55;

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="light"] {
  --bg: #f3f2ee;
  --bg-2: #e9e8e3;
  --fg: #0b0b0d;
  --muted: #66666c;
  --line: rgba(0, 0, 0, .09);
  --line-2: rgba(0, 0, 0, .2);
  --card-hover: rgba(0, 0, 0, .05);
  --c1: #6d28d9;
  --c2: #0891b2;
  --c3: #4d7c0f;
  --c4: #ea580c;
  --c5: #db2777;
  --xp: #15803d;
  --live: #16a34a;
  --aurora-op: .35;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
strong { font-weight: 600; color: var(--fg); }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.i-fill { fill: currentColor; stroke: none; }
::selection { background: var(--c1); color: #fff; }
:focus-visible { outline: 2px solid var(--c2); outline-offset: 3px; border-radius: 6px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
.serif, .serif-i { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.serif-i { font-style: italic; }
.wrap { width: min(1320px, 100% - var(--gutter) * 2); margin-inline: auto; }
.section { position: relative; padding-block: clamp(96px, 14vh, 170px); }
main, .nav, .footer { position: relative; z-index: 2; }

/* Gradient text. Inside [data-split] headings each word is its own inline-block,
   so the gradient is applied per word rather than on the parent. */
.grad-text, .h2 .serif-i { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 6s ease-in-out infinite alternate; }
.h2 .serif-i { font-size: 1.08em; letter-spacing: -.02em; padding-right: .06em; }
[data-split] .serif-i, [data-split] .grad-text { background: none; color: inherit; animation: none; }
[data-split] .serif-i .w > span, [data-split] .grad-text .w > span { background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradShift 6s ease-in-out infinite alternate; padding-right: .05em; }
@keyframes gradShift { to { background-position: 100% 0; } }

/* --- Background layers ---------------------------------------------------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: var(--aurora-op); }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(90px); opacity: .35; will-change: transform; }
.aurora i:nth-child(1) { background: var(--c1); top: -18vmax; left: -12vmax; animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: var(--c2); bottom: -22vmax; right: -14vmax; animation: drift2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: var(--c5); top: 40%; left: 45%; width: 30vmax; height: 30vmax; opacity: .18; animation: drift3 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.2); } }
@keyframes drift2 { to { transform: translate(-22vw, -18vh) scale(.85); } }
@keyframes drift3 { to { transform: translate(-30vw, -25vh) scale(1.3); } }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }

/* --- Loader --------------------------------------------------------------- */
#loader { display: none; }
.js #loader {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--gutter); background: #08080a; color: #f4f3ef;
  animation: loaderFailsafe 0s 6s forwards;   /* never block the page if JS stalls */
}
@keyframes loaderFailsafe { to { visibility: hidden; opacity: 0; } }
.loader-top { display: flex; justify-content: space-between; }
.loader-word { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); height: 1.15em; overflow: hidden; font-size: clamp(44px, 7vw, 96px); font-family: var(--serif); font-style: italic; line-height: 1.15; }
.loader-word span { display: block; height: 1.15em; animation: loaderWords 2.4s var(--ease) infinite; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes loaderWords { 0%, 25% { transform: translateY(0); } 33%, 58% { transform: translateY(-100%); } 66%, 92% { transform: translateY(-200%); } 100% { transform: translateY(0); } }
.loader-count { font-size: clamp(96px, 22vw, 320px); font-weight: 800; letter-spacing: -.06em; line-height: .8; align-self: flex-end; }
.loader-count small { font-size: .3em; letter-spacing: 0; vertical-align: top; }
.loader-bar { height: 2px; background: rgba(255, 255, 255, .12); }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--grad); }

/* --- Cursor --------------------------------------------------------------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
  .has-cursor input, .has-cursor textarea { cursor: text; }
  .has-cursor .cursor { display: block; opacity: 0; transition: opacity .3s; }
  .has-cursor .cursor.is-on { opacity: 1; }
}
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 99; pointer-events: none; border-radius: 50%; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--fg); }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid var(--line-2); display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s;
}
.cursor-ring em { font-style: normal; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: #08080a; font-weight: 500; opacity: 0; transition: opacity .2s; }
.cursor.is-hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--c2); }
.cursor.is-label .cursor-ring { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--grad); border-color: transparent; }
.cursor.is-label .cursor-ring em { opacity: 1; }
.cursor.is-label .cursor-dot { opacity: 0; }

.hover-preview {
  position: fixed; top: 0; left: 0; z-index: 3; width: 320px; aspect-ratio: 16/10; object-fit: cover;
  border-radius: 14px; pointer-events: none; opacity: 0; transform: scale(.8);
  transition: opacity .3s, transform .4s var(--ease); box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.hover-preview.on { opacity: 1; transform: scale(1); }

/* --- Shared bits ---------------------------------------------------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 28px; }
.eyebrow b { font-weight: 500; color: #08080a; background: var(--grad); padding: 3px 8px; border-radius: 99px; font-size: 11px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.h2 { font-size: clamp(44px, 7.4vw, 112px); font-weight: 700; letter-spacing: -.045em; line-height: .95; }
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); max-width: 54ch; }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
[data-split] .w > span { display: inline-block; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 99px;
  font-weight: 500; font-size: 15px; white-space: nowrap; position: relative; overflow: hidden; isolation: isolate;
  transition: background .3s, color .3s, border-color .3s, box-shadow .4s, background-position .6s;
}
.btn svg { font-size: 18px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn-grad { background: var(--grad); background-size: 200% 100%; color: #08080a; font-weight: 600; }
.btn-grad::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn-grad:hover { box-shadow: 0 10px 40px -8px color-mix(in srgb, var(--c2) 70%, transparent); background-position: 100% 0; }
.btn-grad:hover::after { transform: translateX(120%); }
.btn-line { border: 1px solid var(--line-2); }
.btn-line:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-ghost { padding: 0 12px; color: var(--muted); }
.btn-ghost:hover { color: var(--fg); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 11px; text-transform: uppercase; padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); }

/* --- Nav ------------------------------------------------------------------ */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1320px, 100% - 28px); height: 60px; padding: 0 10px 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 99px;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  transition: transform .5s var(--ease), background .5s;
}
.nav.is-hidden { transform: translate(-50%, -140%); }
.nav-logo { font-weight: 800; font-size: 20px; letter-spacing: -.04em; }
.nav-logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { position: relative; padding: 8px 14px; font-size: 14px; color: var(--muted); border-radius: 99px; transition: color .3s, background .3s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); background: var(--card-hover); }
.nav-links a.active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--c2); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: 18px; transition: background .3s, transform .5s var(--ease); }
.theme-btn:hover { background: var(--card-hover); transform: rotate(25deg); }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; background: var(--fg); position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--bg); transition: transform .4s var(--ease), top .4s var(--ease); }
.menu-btn span:first-child { top: 16px; }
.menu-btn span:last-child { top: 23px; }
.menu-open .menu-btn span:first-child { top: 19.5px; transform: rotate(45deg); }
.menu-open .menu-btn span:last-child { top: 19.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--bg); padding: 110px var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: circle(0% at calc(100% - 44px) 44px); transition: clip-path .8s var(--ease), visibility 0s .8s; visibility: hidden;
}
.menu-open .menu { clip-path: circle(150% at calc(100% - 44px) 44px); visibility: visible; transition: clip-path .8s var(--ease); }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { display: flex; align-items: baseline; gap: 16px; font-size: clamp(40px, 12vw, 80px); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; border-bottom: 1px solid var(--line); padding: 8px 0; }
.menu nav a i { font-style: normal; color: var(--c2); }
.menu-foot { color: var(--muted); }

/* --- Hero ----------------------------------------------------------------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 110px; }
.hero-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(20px, 3vh, 32px); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); backdrop-filter: blur(10px); font-size: 14px; }
.pill-ico { font-size: 16px; color: var(--c1); }
.pill-violet { border-color: color-mix(in srgb, var(--c1) 55%, transparent); background: color-mix(in srgb, var(--c1) 16%, var(--panel)); }
.hero-title { font-size: clamp(80px, 17.5vw, 270px); font-weight: 800; letter-spacing: -.05em; line-height: .84; margin-left: -.04em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .05em; }
.hero-title .line-indent { padding-left: 1.05em; display: flex; align-items: flex-end; }
.hero-title .ch { display: inline-block; transition: transform .5s var(--ease); }
.hero-title .ch:hover { transform: translateY(-.06em) rotate(-4deg); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-dot {
  display: inline-block; width: .19em; height: .19em; margin: 0 0 .1em .05em; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, #fff, var(--c2) 35%, var(--c1) 70%, var(--c5));
  box-shadow: 0 0 .3em color-mix(in srgb, var(--c2) 55%, transparent);
  animation: dotHue 6s linear infinite;
}
@keyframes dotHue { to { filter: hue-rotate(360deg); } }
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-top: clamp(28px, 5vh, 52px); }
.hero-lead { font-size: clamp(19px, 1.8vw, 26px); line-height: 1.3; letter-spacing: -.02em; max-width: 28ch; }
.hero-lead .serif { font-size: 1.12em; font-style: italic; }
.rotator { position: relative; display: block; overflow: hidden; height: 1.25em; font-size: 1.6em; font-weight: 800; letter-spacing: -.035em; margin: .08em 0 .12em; }
.rotator > span { position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1.2; padding-right: .1em; -webkit-background-clip: text; background-clip: text; color: transparent; }
.rotator > span:not(:first-child) { transform: translateY(110%); }
.rotator .g1 { background-image: linear-gradient(90deg, var(--c3), var(--c2)); }
.rotator .g2 { background-image: linear-gradient(90deg, var(--xp), var(--c3)); }
.rotator .g3 { background-image: linear-gradient(90deg, var(--c1), var(--c5)); }
.rotator .g4 { background-image: linear-gradient(90deg, var(--c2), var(--c1)); }
.rotator .g5 { background-image: linear-gradient(90deg, var(--c4), var(--c5)); }

.hero-status { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--panel); backdrop-filter: blur(10px); font-size: 14px;
  transition: border-color .3s, transform .4s var(--ease);
}
.chip img { width: 28px; height: 28px; border-radius: 8px; }
.chip:hover { border-color: var(--xp); transform: translateY(-2px); }
.chip b { font-weight: 600; color: var(--xp); }
.chip-ghost { padding-left: 14px; color: var(--muted); }
.chip .i-arrow { font-size: 16px; }

.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 28px; color: var(--muted); }
.hero-foot b { color: var(--fg); font-weight: 500; }
.scroll-line { flex: 1; max-width: 240px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.scroll-line i { position: absolute; inset: 0; background: var(--grad); transform: translateX(-100%); animation: scrollLine 2.4s var(--ease) infinite; }
@keyframes scrollLine { 60%, 100% { transform: translateX(100%); } }

/* --- Marquee -------------------------------------------------------------- */
.marquee { position: relative; z-index: 2; overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.marquee-track { display: flex; gap: 40px; width: max-content; align-items: center; will-change: transform; }
.marquee span { font-size: clamp(28px, 4vw, 54px); font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.marquee span:nth-of-type(4n+3) { color: transparent; -webkit-text-stroke: 1px var(--fg); }
.marquee .mq-g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; }
.marquee .mq-o { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--c4); -webkit-text-stroke: 0; }
.marquee b { color: var(--c2); font-size: 22px; }

/* --- About ---------------------------------------------------------------- */
.statement { font-size: clamp(28px, 4.2vw, 60px); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; max-width: 24ch; }
.statement .sw { opacity: .14; }
html:not(.js) .statement .sw { opacity: 1; }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(64px, 10vh, 120px); align-items: start; }
.portrait { position: relative; border-radius: var(--radius); background: var(--bg-2); transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); }
.portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); filter: grayscale(1) contrast(1.05); transition: filter .8s var(--ease); }
.portrait:hover img { filter: grayscale(0); }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.portrait-ring {
  position: absolute; inset: -3px; border-radius: calc(var(--radius) + 3px); padding: 3px; pointer-events: none;
  background: conic-gradient(from var(--ang), var(--c1), var(--c2), var(--c3), var(--c4), var(--c5), var(--c1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ringSpin 6s linear infinite;
}
@keyframes ringSpin { to { --ang: 360deg; } }
.portrait figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: space-between; color: #fff; mix-blend-mode: difference; }
.about-copy > p { font-size: clamp(18px, 1.4vw, 20px); color: var(--muted); margin-bottom: 20px; max-width: 56ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); margin-top: 40px; }
.stat { padding: 28px 20px 24px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat::before { content: ""; position: absolute; top: -1px; left: 20px; width: 40px; height: 2px; background: var(--c); }
.stat:first-child::before { left: 0; }
.stat b { font-size: clamp(44px, 5vw, 72px); font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--c); }
.stat .mono { color: var(--muted); }

/* --- Experience ----------------------------------------------------------- */
.exp-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.exp-head { position: sticky; top: 120px; align-self: start; }
.tl-progress { margin-top: 40px; width: 2px; height: 160px; background: var(--line); border-radius: 2px; overflow: hidden; }
.tl-progress i { display: block; width: 100%; height: 100%; background: linear-gradient(var(--c3), var(--c1), var(--c5)); transform-origin: top; transform: scaleY(0); }
.tl-item { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); position: relative; }
.tl-item:last-child { border-bottom: 1px solid var(--line); }
.tl-item::before { content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 1px; background: var(--c); transition: width 1s var(--ease); }
.tl-item:hover::before { width: 100%; }
.tl-date { color: var(--c); padding-top: 8px; }
.tl-item h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 10px; }
.tl-item h3 em { font-style: normal; color: var(--muted); font-weight: 400; }
.tl-item p { color: var(--muted); margin-bottom: 14px; max-width: 58ch; }

/* --- XPENC ---------------------------------------------------------------- */
.xpenc-panel {
  position: relative; overflow: hidden; border-radius: 36px; padding: clamp(28px, 5vw, 72px);
  background: linear-gradient(160deg, color-mix(in srgb, var(--xp) 16%, var(--bg)) 0%, var(--bg) 60%);
  border: 1px solid color-mix(in srgb, var(--xp) 30%, transparent);
}
.xpenc-glow { position: absolute; width: 60%; aspect-ratio: 1; right: -10%; top: -20%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--xp) 40%, transparent), transparent); filter: blur(30px); pointer-events: none; }
.xpenc-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.xpenc-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; color: var(--muted); }
.xpenc-brand img { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 10px 30px -10px var(--xp); }
.xpenc-brand b { color: #08080a; background: var(--xp); padding: 3px 8px; border-radius: 99px; font-weight: 500; margin-right: 6px; }
.xpenc-title { margin-bottom: 28px; }
.xp-green { color: var(--xp); }
.xpenc-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.xpenc-feats li { font-size: 14px; padding: 6px 12px 6px 28px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--xp) 30%, transparent); background: color-mix(in srgb, var(--xp) 8%, transparent); position: relative; }
.xpenc-feats li::before { content: ""; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--xp); }
.xpenc-facts { display: flex; gap: clamp(24px, 4vw, 56px); margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.xpenc-facts li { display: flex; flex-direction: column; gap: 6px; }
.xpenc-facts b { font-size: clamp(30px, 3vw, 44px); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.xpenc-facts .mono { color: var(--muted); }
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.store { display: inline-flex; align-items: center; gap: 12px; height: 58px; padding: 0 22px 0 18px; border-radius: 16px; background: var(--fg); color: var(--bg); transition: box-shadow .4s; }
.store svg { font-size: 26px; }
.store span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; font-size: 17px; }
.store small { font-size: 11px; font-weight: 400; opacity: .7; }
.store:hover { box-shadow: 0 14px 40px -12px var(--xp); }

.phone-stage { position: relative; perspective: 1400px; display: grid; place-items: center; padding-block: 24px; }
.phone {
  width: min(290px, 66vw); aspect-ratio: 786/1600; border-radius: 44px; padding: 10px;
  background: linear-gradient(145deg, #3a3a3e, #0d0d0f 40%, #1c1c20);
  box-shadow: inset 0 0 0 1.5px #4a4a50, 0 60px 120px -30px rgba(0, 0, 0, .7), 0 0 90px -20px color-mix(in srgb, var(--xp) 55%, transparent);
  transform-style: preserve-3d; transform: rotateY(-18deg) rotateX(8deg) rotateZ(2deg); will-change: transform;
}
.phone-screen { height: 100%; border-radius: 35px; overflow: hidden; background: #000; position: relative; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .14) 0%, transparent 35%); pointer-events: none; }
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 99px; font-size: 13px; font-weight: 500;
  background: color-mix(in srgb, var(--bg) 82%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(12px); white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
}
.float-chip i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--xp); color: #08080a; font-style: normal; font-weight: 700; font-size: 12px; }
.fc-1 { top: 14%; left: -6%; }
.fc-2 { top: 48%; right: -8%; }
.fc-3 { bottom: 12%; left: 0; }

.ring-section { margin-top: clamp(80px, 12vh, 140px); }
.ring-label { display: flex; justify-content: center; margin-inline: auto; width: max-content; max-width: 100%; }
.ring-stage { height: clamp(260px, 30vw, 420px); perspective: 1600px; display: grid; place-items: center; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ring { position: relative; width: clamp(240px, 32vw, 460px); aspect-ratio: 16/9; transform-style: preserve-3d; }
.ring figure { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); background: var(--bg-2); }
.ring figure img { width: 100%; height: 100%; object-fit: cover; }

/* --- Work (horizontal) ---------------------------------------------------- */
.work { position: relative; }
.work-pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(32px, 6vh, 60px); padding-block: 110px 60px; overflow: hidden; }
.work-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 0 24px; }
.work-head .eyebrow { width: 100%; }
.work-hint { color: var(--muted); }
.work-hint span { color: var(--c2); }
.work-track { display: flex; gap: 20px; padding-inline: var(--gutter); width: max-content; }
.card {
  --accent: var(--c2);
  width: clamp(300px, 30vw, 440px); flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius); position: relative;
  background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(8px);
  transform-style: preserve-3d; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color .4s, transform .5s var(--ease), box-shadow .5s;
}
.card::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; background: var(--accent); border-radius: 2px; transform: scaleX(.15); transform-origin: left; transition: transform .6s var(--ease); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--accent) 55%, transparent); }
.card:hover::before { transform: scaleX(1); }
.card > a, .card > .card-inner { display: flex; flex-direction: column; gap: 14px; padding: 14px 14px 22px; height: 100%; }
.card-media { aspect-ratio: 16/10; border-radius: 14px; overflow: hidden; background: var(--bg-2); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.2s var(--ease); }
.card:hover .card-media img { transform: scale(1.07); }
.card-media-type { display: flex; flex-direction: column; justify-content: space-between; padding: 18px; background: linear-gradient(135deg, var(--c3), var(--c2)); color: #08080a; }
.type-art { font-size: clamp(72px, 9vw, 130px); font-weight: 900; letter-spacing: -.07em; line-height: .8; }
.type-note { align-self: flex-end; }
.card-meta { display: flex; justify-content: space-between; color: var(--muted); padding: 8px 6px 0; }
.card-meta span:first-child { color: var(--accent); }
.card h3 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 700; letter-spacing: -.04em; line-height: 1; padding: 0 6px; }
.card p { color: var(--muted); font-size: 15px; padding: 0 6px; flex: 1; }
.card .tags { padding: 0 6px; }
.card-end { display: flex; flex-direction: column; justify-content: space-between; padding: 28px; background: var(--grad); color: #08080a; border: 0; min-height: 420px; }
.card-end::before { display: none; }
.card-end b { font-size: clamp(36px, 3.4vw, 52px); letter-spacing: -.045em; line-height: 1; font-weight: 800; }
.card-end svg { font-size: 56px; align-self: flex-end; transition: transform .5s var(--ease); }
.card-end:hover svg { transform: translate(6px, -6px) rotate(8deg); }

/* --- More builds ---------------------------------------------------------- */
.builds-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); backdrop-filter: blur(10px); }
.filters button { padding: 8px 16px; border-radius: 99px; font-size: 14px; color: var(--muted); transition: color .3s, background .3s; }
.filters button:hover { color: var(--fg); }
.filters button.on { background: var(--fg); color: var(--bg); }
.builds-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: clamp(40px, 6vh, 64px); }
.build {
  --accent: var(--c2);
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px);
  transition: border-color .4s, box-shadow .5s, translate .5s var(--ease);
}
.build.is-hidden { display: none; }
.build:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); translate: 0 -6px; box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--accent) 60%, transparent); }
.build-img { aspect-ratio: 16/10; overflow: hidden; position: relative; background: var(--bg-2); }
.build-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.2s var(--ease); }
.build:hover .build-img img { transform: scale(1.08); }
.build-img::after { content: "↗"; position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #08080a; font-weight: 700; transform: scale(0) rotate(-45deg); transition: transform .5s var(--ease); }
.build:hover .build-img::after { transform: scale(1) rotate(0); }
.build-txt { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.build-txt h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.build-txt p { color: var(--muted); font-size: 14px; flex: 1; }
.build-txt .mono { color: var(--accent); font-size: 11px; }

/* --- Services bento ------------------------------------------------------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: clamp(48px, 7vh, 80px); }
.tile {
  --accent: var(--c2);
  position: relative; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 12px; min-height: 240px; isolation: isolate; transition: border-color .4s, translate .5s var(--ease);
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
}
.tile:hover::before { opacity: 1; }
.tile:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); translate: 0 -4px; }
.tile-xl { grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 2; }
.tile-n { color: var(--accent); }
.tile-ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-size: 22px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .6s var(--ease); }
.tile:hover .tile-ico { transform: rotate(-12deg) scale(1.1); }
.tile h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin-top: auto; }
.tile-xl h3 { font-size: clamp(30px, 3.4vw, 48px); margin-top: 0; }
.tile p { color: var(--muted); font-size: 15px; max-width: 46ch; }
.tile-art { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(240px, 100%); align-self: flex-end; }
.tile-art i { aspect-ratio: 1; border: 1px solid var(--line-2); border-radius: 10px; }
.tile-art i:nth-child(1), .tile-art i:nth-child(5), .tile-art i:nth-child(9) { background: var(--accent); }
.tile-art i:nth-child(3), .tile-art i:nth-child(7) { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.tile-xl .tile-art i { animation: blink 2.4s var(--ease) infinite; }
.tile-xl .tile-art i:nth-child(3n+2) { animation-delay: .3s; }
.tile-xl .tile-art i:nth-child(3n) { animation-delay: .6s; }
@keyframes blink { 50% { background: var(--accent); } }

/* --- Skills sphere -------------------------------------------------------- */
.skills-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.sphere-wrap { position: relative; display: grid; place-items: center; }
.sphere-wrap::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 25%, transparent), transparent); filter: blur(20px); }
.sphere { position: relative; width: min(560px, 100%); aspect-ratio: 1; touch-action: pan-y; cursor: grab; user-select: none; }
.sphere:active { cursor: grabbing; }
.sphere span { position: absolute; left: 50%; top: 50%; white-space: nowrap; font-weight: 600; letter-spacing: -.02em; font-size: clamp(13px, 1.25vw, 18px); will-change: transform, opacity; transform: translate(-50%, -50%); }
.sphere span:nth-child(5n+1) { color: var(--c2); }
.sphere span:nth-child(5n+3) { color: var(--c3); }
.sphere span:nth-child(5n+4) { color: var(--c1); }
.sphere span:nth-child(5n) { color: var(--c4); }
.sphere-hint { color: var(--muted); margin-top: 12px; }
.skill-groups { margin-top: 40px; border-top: 1px solid var(--line); }
.skill-groups > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease); }
.skill-groups > div:hover { padding-left: 10px; }
.skill-groups dt { color: var(--c); padding-top: 4px; }
.skill-groups dd { font-size: 17px; }

/* --- GitHub --------------------------------------------------------------- */
.gh-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.gh-handle { word-break: break-all; }
.gh-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.gh-stat, .gh-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); }
.gh-stat { display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; transition: border-color .4s; }
.gh-stat::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--c); opacity: .16; filter: blur(20px); }
.gh-stat:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.gh-stat b { font-size: clamp(40px, 4.4vw, 64px); font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--c); }
.gh-stat .mono { color: var(--muted); }
.heatmap-scroll { overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
.heatmap { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; min-width: 680px; }
.heatmap i, .heat-legend i { aspect-ratio: 1; border-radius: 3px; background: var(--card-hover); }
.heatmap i[data-l="1"], .heat-legend i[data-l="1"] { background: color-mix(in srgb, var(--live) 30%, transparent); }
.heatmap i[data-l="2"], .heat-legend i[data-l="2"] { background: color-mix(in srgb, var(--live) 55%, transparent); }
.heatmap i[data-l="3"], .heat-legend i[data-l="3"] { background: color-mix(in srgb, var(--live) 80%, transparent); }
.heatmap i[data-l="4"], .heat-legend i[data-l="4"] { background: var(--live); box-shadow: 0 0 8px color-mix(in srgb, var(--live) 60%, transparent); }
.heatmap i.pad { visibility: hidden; }
.heatmap:empty { min-height: 110px; background: repeating-linear-gradient(90deg, var(--card-hover) 0 10px, transparent 10px 13px); border-radius: 6px; }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 14px; color: var(--muted); }
.heat-legend i { width: 11px; }
.heat-legend span { margin: 0 6px; }
.gh-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.panel-title { color: var(--muted); font-weight: 400; margin-bottom: 18px; }
.langs li { display: grid; grid-template-columns: 110px 1fr 44px; gap: 14px; align-items: center; padding: 9px 0; font-size: 15px; }
.langs i { height: 8px; border-radius: 99px; background: var(--card-hover); position: relative; overflow: hidden; }
.langs i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--lc, var(--fg)); border-radius: inherit; transform-origin: left; transform: scaleX(var(--s, 1)); transition: transform 1.4s var(--ease); }
.langs b { font-family: var(--mono); font-size: 12px; font-weight: 400; text-align: right; color: var(--muted); }
.activity a { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease), color .3s; }
.activity li:last-child a { border-bottom: 0; }
.activity a:hover { padding-left: 8px; color: var(--c2); }
.activity b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity span, .activity time { color: var(--muted); }

/* --- Achievements --------------------------------------------------------- */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: clamp(40px, 6vh, 64px); }
.ach {
  --accent: var(--c2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 16px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), border-color .4s, box-shadow .5s;
}
.ach:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 30px 70px -30px color-mix(in srgb, var(--accent) 60%, transparent); }
.ach img { width: 100%; aspect-ratio: 16/11; object-fit: cover; border-radius: 12px; background: var(--bg-2); }
.ach-holo img { object-fit: contain; padding: 12px; background: #fff; }
.ach div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 8px 8px; flex-wrap: wrap; }
.ach b { font-weight: 600; font-size: 18px; letter-spacing: -.02em; }
.ach .mono { color: var(--accent); }
.badge-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; margin-top: 14px; }
.badge-strip figure { border: 1px solid var(--line); border-radius: 18px; padding: 18px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; transition: translate .5s var(--ease), rotate .5s var(--ease), border-color .4s; background: color-mix(in srgb, var(--bg) 78%, transparent); }
.badge-strip figure:hover { translate: 0 -8px; rotate: -3deg; border-color: var(--c5); }
.badge-strip img { width: 64px; height: 64px; object-fit: contain; }
.badge-strip figcaption { color: var(--muted); font-size: 10px; line-height: 1.3; }

/* --- Contact -------------------------------------------------------------- */
.contact-title { font-size: clamp(56px, 11vw, 190px); font-weight: 800; letter-spacing: -.06em; line-height: .9; }
.email-big {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; width: 100%;
  margin-top: clamp(40px, 7vh, 80px); padding: 28px 0; border-block: 1px solid var(--line-2); text-align: left;
}
.email-big span { font-size: clamp(26px, 4.6vw, 68px); font-weight: 600; letter-spacing: -.04em; line-height: 1.1; word-break: break-all; position: relative; }
.email-big span::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.email-big:hover span::after { transform: scaleX(1); transform-origin: left; }
.email-big i { font-style: normal; color: var(--c2); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(48px, 7vh, 80px); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; align-content: start; }
.form label { display: flex; flex-direction: column; gap: 8px; }
.form label.full { grid-column: 1 / -1; }
.form label .mono { color: var(--muted); transition: color .3s; }
.form label:focus-within .mono { color: var(--c2); }
.form input, .form textarea { font: inherit; font-size: 20px; color: var(--fg); background: transparent; border: 0; border-bottom: 1px solid var(--line-2); padding: 8px 0 12px; resize: vertical; border-radius: 0; transition: border-color .3s; }
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--c2); }
.form textarea::placeholder { color: var(--muted); opacity: .6; }
.form .btn { justify-self: start; }
.socials { border-top: 1px solid var(--line); }
.socials a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 20px; font-weight: 500; letter-spacing: -.02em; transition: padding .4s var(--ease), color .3s; }
.socials a:hover { padding-left: 12px; color: var(--c); }
.socials .mono { color: var(--muted); }

/* --- Footer --------------------------------------------------------------- */
.footer { overflow: hidden; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; color: var(--muted); }
.footer-inner b { color: var(--fg); font-weight: 500; }
.footer-inner a:hover { color: var(--c2); }
.footer-word {
  font-size: 31vw; font-weight: 900; letter-spacing: -.08em; line-height: .78; text-align: center; user-select: none; margin-bottom: -.08em;
  color: transparent; -webkit-text-stroke: 1px var(--line-2);
  background-image: var(--grad); background-repeat: no-repeat; background-position: 0 100%; background-size: 100% var(--fill, 0%);
  -webkit-background-clip: text; background-clip: text;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .badge-strip { grid-template-columns: repeat(4, 1fr); }
  .builds-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  body { font-size: 16px; }
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: block; }
  .nav { height: 56px; padding-left: 20px; }
  .hero-title .line-indent { padding-left: .45em; }
  .hero-status { align-items: flex-start; }
  .about-grid, .exp-grid, .xpenc-grid, .skills-grid, .contact-grid, .gh-cols { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; }
  .exp-head { position: static; }
  .tl-progress { display: none; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
  .xpenc-panel { border-radius: 26px; }
  .fc-1 { left: 0; } .fc-2 { right: 0; }
  .work-pin { min-height: 0; padding-block: 96px 40px; }
  .work-track { width: auto; padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 30px; }
  .work-track::-webkit-scrollbar { display: none; }
  .card { width: min(84vw, 380px); scroll-snap-align: center; }
  .gh-stats { grid-template-columns: repeat(2, 1fr); }
  .ach-grid { grid-template-columns: 1fr; }
  .skills-grid .sphere-wrap { order: 2; }
  .skill-groups > div { grid-template-columns: 1fr; gap: 4px; }
  .hover-preview { display: none; }
}
@media (max-width: 560px) {
  .bento, .builds-grid { grid-template-columns: 1fr; }
  .tile-xl, .tile-wide { grid-column: auto; grid-row: auto; }
  .tile { min-height: 0; }
  .form { grid-template-columns: 1fr; }
  .stat { padding-inline: 12px; }
  .stat::before { left: 12px; }
  .stat b { font-size: 38px; }
  .xpenc-facts { gap: 20px; }
  .hero-foot .scroll-line { display: none; }
  .langs li { grid-template-columns: 90px 1fr 40px; }
  .filters { width: 100%; justify-content: space-between; }
  .float-chip { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
