/* =========================================================
   Portfolio template "Monochrome Motion" — VidyaMath
   White + near-black, heavy motion
   ========================================================= */

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --surface: #151515;
  --surface-2: #1c1c1c;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f5f5f3;
  --muted: #8a8a8a;
  --dot: 255, 255, 255;
  --glass: rgba(21, 21, 21, 0.6);
  --grain-opacity: 0.05;

  --display: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --container: 1360px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f5f3;
  --bg-2: #ecece9;
  --surface: #ffffff;
  --surface-2: #f0f0ee;
  --line: rgba(10, 10, 10, 0.09);
  --line-strong: rgba(10, 10, 10, 0.2);
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --dot: 10, 10, 10;
  --glass: rgba(255, 255, 255, 0.65);
  --grain-opacity: 0.06;
  color-scheme: light;
}

/* Circular reveal when switching theme */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

::selection { background: var(--text); color: var(--bg); }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Text utilities ---------- */
.w { display: inline-block; white-space: nowrap; }
.c { display: inline-block; }

.split-chars { perspective: 800px; }
.split-chars .w {
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
  vertical-align: top;
}

/* Rolling text on hover */
.roll {
  display: inline-block;
  height: 1.3em;
  line-height: 1.3;
  overflow: hidden;
  vertical-align: middle;
}

.roll > span {
  display: block;
  text-shadow: 0 1.3em 0 currentColor;
  transition: transform 0.6s var(--ease);
}

a:hover .roll > span,
button:hover .roll > span { transform: translateY(-1.3em); }

/* ---------- Preloader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  color: var(--bg);
  animation: loaderFailsafe 0.6s 7s forwards;
}

@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; } }

.loader-cols {
  position: absolute;
  inset: 0;
  display: flex;
}

.loader-cols span {
  flex: 1;
  height: 100%;
  margin-right: -1px;
  background: var(--text);
  transform-origin: top;
}

.loader-content {
  position: absolute;
  inset: 0;
  padding: var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.loader-brand {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.loader-words {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  overflow: hidden;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.1;
}

.loader-words span { grid-area: 1 / 1; text-align: center; }

.loader-count {
  align-self: flex-end;
  font-size: clamp(6rem, 22vw, 20rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.07em;
}

/* ---------- Progress, cursor, grain, indicator ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 2px;
  pointer-events: none;
  mix-blend-mode: difference;
}

.progress span {
  display: block;
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), opacity 0.3s;
}

.cursor-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

body.has-cursor .cursor { opacity: 1; }
body.cursor-hover .cursor { width: 64px; height: 64px; margin: -32px 0 0 -32px; }

body.cursor-label-on .cursor {
  width: 100px;
  height: 100px;
  margin: -50px 0 0 -50px;
  background: var(--text);
  mix-blend-mode: normal;
}

body.cursor-label-on .cursor-text { opacity: 1; transform: scale(1); }

@media (hover: hover) and (pointer: fine) {
  body.has-cursor,
  body.has-cursor a,
  body.has-cursor button { cursor: none; }
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 998;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.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 8s steps(10) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 5%); }
  40% { transform: translate(5%, -3%); }
  60% { transform: translate(-3%, -6%); }
  80% { transform: translate(4%, 4%); }
}

.section-indicator {
  position: fixed;
  left: var(--gutter);
  bottom: 24px;
  z-index: 80;
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.si-num { opacity: 0.55; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: -1;
  width: 140%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, 0) scale(0);
  transition: transform 0.7s var(--ease);
}

.btn:hover::before { transform: translate(-50%, -60%) scale(1); }

.btn-arrow {
  font-style: normal;
  transition: transform 0.5s var(--ease);
}

.btn:hover .btn-arrow { transform: translateX(4px) rotate(-45deg); }

.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid::before { background: var(--muted); }

.btn-line { border: 1px solid var(--line-strong); color: var(--text); }
.btn-line::before { background: var(--text); }
.btn-line:hover { color: var(--bg); border-color: var(--text); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  color: inherit;
  font-size: 1.05rem;
  transition: background 0.35s var(--ease), color 0.35s, border-color 0.35s;
}

.icon-btn svg { width: 17px; height: 17px; }
.icon-linkedin svg { fill: currentColor; }
.icon-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.icon-btn-lg { width: 54px; height: 54px; }
.icon-btn-lg svg { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 22px calc(var(--gutter) + 12px);
  color: var(--text);
  transition: transform 0.7s var(--ease), color 0.4s, padding 0.7s var(--ease);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid transparent;
  border-radius: 100px;
  transition: max-width 0.9s var(--ease), padding 0.9s var(--ease), background 0.5s, border-color 0.5s, box-shadow 0.5s;
}

.header.hidden { transform: translateY(-120%); }

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  font-size: 1.05rem;
  transition: transform 0.8s var(--ease), background 0.4s, color 0.4s;
}

.logo:hover .logo-mark { transform: rotate(360deg); }

.nav {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 100px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.5s, border-color 0.5s;
}

/* Sliding pill that follows hover / active section */
.nav-indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  border-radius: 100px;
  background: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s var(--ease), width 0.6s var(--ease), opacity 0.3s;
}

.nav a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.45s var(--ease);
}

.nav a sup {
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1;
  margin-top: 1px;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.nav a:hover { color: var(--text); }
.nav a.lit { color: var(--bg); }

.logo-text {
  max-width: 140px;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.7s var(--ease), opacity 0.5s;
}

.header-cta {
  display: none;
  padding: 11px 20px;
  font-size: 0.85rem;
}

/* ---------- Desktop header: morphs into a floating glass bar on scroll ---------- */
@media (min-width: 1181px) {
  .header.scrolled { padding-top: 14px; }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .logo { justify-self: start; }
  .header-actions { justify-self: end; }
  .header-cta { display: inline-flex; }

  .header-time {
    max-width: 140px;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.7s var(--ease), opacity 0.5s, margin 0.7s var(--ease);
  }

  .header.scrolled .header-inner {
    max-width: 1180px;
    padding: 7px 7px 7px 8px;
    background: var(--glass);
    border-color: var(--line);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.5);
  }

  .header.scrolled .nav {
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .header.scrolled .logo-text,
  .header.scrolled .header-time { max-width: 0; opacity: 0; margin: 0; }

  .header.scrolled .header-actions .icon-btn { background: transparent; }
  .header.scrolled .header-actions .icon-btn:hover { background: var(--text); }
}

@media (min-width: 1181px) and (max-width: 1399px) {
  .header-time { display: none; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .icon-btn {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-actions .icon-btn:hover { background: var(--text); }

.header-time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.header-time i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: 0.25; } }

.theme-toggle { position: relative; overflow: hidden; }

.theme-toggle svg {
  position: absolute;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.6s var(--ease), opacity 0.4s;
}

.icon-moon { transform: translateY(150%) rotate(-90deg); opacity: 0; }
:root[data-theme="light"] .icon-sun { transform: translateY(-150%) rotate(90deg); opacity: 0; }
:root[data-theme="light"] .icon-moon { transform: none; opacity: 1; }

.menu-btn {
  display: none;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 8px 0 18px;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.4s, color 0.4s;
}

.menu-btn-lines {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
}

.menu-btn-lines i {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}

.menu-btn-lines i:first-child { top: 12px; }
.menu-btn-lines i:last-child { top: 17px; }

/* Header while menu is open (menu is inverted) */
.menu-open .header { color: var(--bg); }
.menu-open .logo-mark { background: var(--bg); color: var(--text); }
.menu-open .header-actions .icon-btn { background: transparent; }
.menu-open .header-actions .icon-btn:hover { background: var(--bg); color: var(--text); }
.menu-open .menu-btn { background: var(--bg); color: var(--text); }
.menu-open .menu-btn-lines { background: var(--text); }
.menu-open .menu-btn-lines i { background: var(--bg); }
.menu-open .menu-btn-lines i:first-child { top: 14.5px; transform: rotate(45deg); }
.menu-open .menu-btn-lines i:last-child { top: 14.5px; transform: rotate(-45deg); }

/* ---------- Mobile menu: staircase ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s 1s;
}

.menu-open .menu {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.menu-stairs {
  position: absolute;
  inset: 0;
  display: flex;
}

.menu-stairs span {
  flex: 1;
  margin-right: -1px;
  background: var(--text);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.7s var(--ease-io);
  transition-delay: calc((4 - var(--i)) * 0.05s + 0.25s);
}

.menu-stairs span:nth-child(1) { --i: 0; }
.menu-stairs span:nth-child(2) { --i: 1; }
.menu-stairs span:nth-child(3) { --i: 2; }
.menu-stairs span:nth-child(4) { --i: 3; }
.menu-stairs span:nth-child(5) { --i: 4; }

.menu-open .menu-stairs span {
  transform: scaleY(1);
  transition-delay: calc(var(--i) * 0.06s);
}

.menu-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 110px var(--gutter) 30px;
  color: var(--bg);
}

.menu-label,
.menu-foot {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s, transform 0.6s var(--ease);
}

.menu-open .menu-label,
.menu-open .menu-foot {
  opacity: 1;
  transform: none;
  transition-delay: 0.7s;
}

.menu-label {
  margin-bottom: 18px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.menu-open .menu-label { opacity: 0.6; }

.menu-links a {
  display: block;
  overflow: hidden;
  border-top: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
  font-size: clamp(2.4rem, 11vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.menu-links a:nth-child(1) { --i: 0; }
.menu-links a:nth-child(2) { --i: 1; }
.menu-links a:nth-child(3) { --i: 2; }
.menu-links a:nth-child(4) { --i: 3; }
.menu-links a:nth-child(5) { --i: 4; }
.menu-links a:nth-child(6) { --i: 5; }

.ml-inner {
  display: inline-block;
  padding: 4px 0;
  transform: translateY(110%) rotate(4deg);
  transform-origin: left bottom;
  transition: transform 0.5s var(--ease-io), padding 0.5s var(--ease);
}

.menu-open .ml-inner {
  transform: none;
  transition: transform 0.9s var(--ease), padding 0.5s var(--ease);
  transition-delay: calc(0.4s + var(--i) * 0.06s), 0s;
}

.menu-links a:hover .ml-inner {
  padding-left: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.ml-inner sup {
  margin-right: 12px;
  font-family: var(--display);
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: top;
  opacity: 0.5;
}

.menu-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ---------- Hero ---------- */
.hero {
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  padding: 12px;
}

.hero-card {
  position: relative;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  will-change: transform;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
}

.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 100px clamp(18px, 3.4vw, 48px) clamp(20px, 3vw, 40px);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-meta p { display: flex; align-items: center; gap: 10px; }

.meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  animation: blink 1.6s ease-in-out infinite;
}

.hero-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: clamp(2.6rem, 14.6vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  perspective: 900px;
}

@media (min-width: 1025px) {
  .hero-name { font-size: clamp(3rem, 10.4vw, 11.4rem); }
}

/* One word at a time: all words share one grid cell */
.hn-stage {
  display: grid;
  place-items: center;
}

.hn-word {
  grid-area: 1 / 1;
  white-space: nowrap;
}

.hn-word:not(:first-child) { visibility: hidden; }

.hn-serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15em;
  text-transform: none;
  letter-spacing: -0.02em;
}

.hn-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(18px, 2.4vw, 32px);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hn-count { font-variant-numeric: tabular-nums; }
.hn-count b { color: var(--text); font-weight: 600; }

.hn-bar {
  width: 120px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.hn-bar i {
  display: block;
  height: 100%;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
}

.hero-name .w { overflow: hidden; padding: 0.04em 0.02em 0.06em; }
.hero-name .c { transform-origin: 50% 100%; }

.hero-bottom {
  display: grid;
  grid-template-columns: 1.2fr auto auto;
  align-items: end;
  gap: clamp(20px, 4vw, 60px);
}

.hero-lead {
  max-width: 470px;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.45;
  color: var(--muted);
}

.rotator {
  display: inline-grid;
  overflow: hidden;
  vertical-align: bottom;
  padding-right: 0.1em;
  color: var(--text);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2em;
  line-height: 1.15;
}

.rotator span { grid-area: 1 / 1; justify-self: start; white-space: nowrap; }
.rotator span:not(:first-child) { opacity: 0; }

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

.scroll-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
}

.scroll-badge svg {
  position: absolute;
  inset: 0;
  animation: spin 14s linear infinite;
}

.scroll-badge text {
  fill: var(--text);
  font-size: 9.6px;
  font-weight: 500;
  letter-spacing: 2.4px;
}

.scroll-badge i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-style: normal;
  animation: bob 2s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Velocity marquee ---------- */
.vmarquee {
  padding: clamp(60px, 9vw, 120px) 0;
  overflow: hidden;
}

.vm-row {
  overflow: hidden;
  white-space: nowrap;
}

.vm-row:first-child { transform: rotate(-2deg); }

.vm-row:last-child {
  position: relative;
  z-index: 1;
  margin-top: -10px;
  padding: 0.25em 0;
  background: var(--text);
  color: var(--bg);
  transform: rotate(1.5deg) scale(1.02);
}

.vm-track {
  display: inline-flex;
  align-items: center;
  will-change: transform;
}

.vm-track span {
  padding: 0 0.3em;
  font-size: clamp(2.8rem, 8vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
  text-transform: uppercase;
}

.vm-track .outline {
  color: transparent;
  -webkit-text-stroke: 1.4px currentColor;
}

.vm-row:first-child .outline { -webkit-text-stroke-color: var(--text); }
.vm-row:last-child .outline { -webkit-text-stroke-color: var(--bg); }

.vm-track b {
  display: inline-block;
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  font-weight: 400;
  animation: spin 6s linear infinite;
}

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 13vw, 170px) 0; }

.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.sec-num { color: var(--text); letter-spacing: 0.04em; }

.sec-head::after {
  content: "";
  width: 90px;
  height: 1px;
  background: var(--line-strong);
}

.title {
  margin-bottom: clamp(50px, 7vw, 100px);
  font-size: clamp(2.8rem, 7.6vw, 7.2rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.title em { letter-spacing: -0.02em; }

/* ---------- About ---------- */
.about-statement {
  max-width: 1180px;
  font-size: clamp(1.9rem, 4.4vw, 4.1rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 7vw, 120px);
  align-items: end;
  margin-top: clamp(60px, 9vw, 130px);
}

.about-img-inner {
  aspect-ratio: 4 / 5;
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Theme-aware parts (the character keeps fixed tones) */
.av-aura-stop { stop-color: rgb(var(--dot)); }
.av-spark { fill: var(--text); transform-box: fill-box; transform-origin: center; animation: twinkle 3s ease-in-out infinite; }
.av-spark.s2 { animation-delay: -0.8s; }
.av-spark.s3 { animation-delay: -1.6s; }
.av-spark.s4 { animation-delay: -2.2s; }

.av-body { transform-box: fill-box; transform-origin: 50% 100%; animation: avBreathe 4.5s ease-in-out infinite; }
.av-eyes { transform-box: fill-box; transform-origin: center; animation: avBlink 5s infinite; }
.av-aura { animation: avPulse 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  50% { transform: scale(0.4) rotate(45deg); opacity: 0.35; }
}

@keyframes avBreathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.015); }
}

@keyframes avBlink {
  0%, 45%, 49%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(0.08); }
}

@keyframes avPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 1; }
}

.about-img-tag {
  display: block;
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-copy {
  max-width: 560px;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 50px 0;
  padding: 34px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-size: clamp(2.8rem, 5.4vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
}

.stat p { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tile {
  position: relative;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.4s;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--dot), 0.09), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.tile:hover { border-color: var(--line-strong); }
.tile:hover::before { opacity: 1; }

.tile-head { display: flex; align-items: baseline; gap: 12px; }
.tile-num { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.tile h3 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.tile p {
  max-width: 320px;
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

.tile-code {
  grid-column: span 2;
  grid-row: span 2;
  justify-content: flex-start;
}

.code-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 26px;
  border-radius: 16px;
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e6e6e6;
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.code-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.code-bar span { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; color: #777; }

.code {
  flex: 1;
  min-height: 230px;
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  line-height: 1.75;
  white-space: pre-wrap;
}

.code .k { color: #8a8a8a; }
.code .s { color: #ffffff; }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #e6e6e6;
  animation: caret 1s steps(1) infinite;
}

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

.orbit {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 150px;
  height: 150px;
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  animation: spin 7s linear infinite;
}

.orbit-ring i {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--text);
}

.r1 { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
.r2 { width: 104px; height: 104px; margin: -52px 0 0 -52px; animation-duration: 5s; animation-direction: reverse; }
.r3 { width: 60px; height: 60px; margin: -30px 0 0 -30px; animation-duration: 3s; }
.r2 i { width: 8px; height: 8px; margin-left: -4px; top: -4px; }

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 0 rgba(var(--dot), 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 18px rgba(var(--dot), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--dot), 0); }
}

.ring {
  position: absolute;
  top: 26px;
  right: 26px;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
}

.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--text); stroke-linecap: round; stroke-dasharray: 283; stroke-dashoffset: 0; }
.ring-num { font-size: 2rem; font-weight: 700; letter-spacing: -0.05em; }

.device {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 130px;
  height: 84px;
  border: 2px solid var(--text);
  border-radius: 10px;
  animation: morph 6s var(--ease-io) infinite;
}

.device span {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 24px;
  height: 3px;
  margin-left: -12px;
  border-radius: 3px;
  background: var(--muted);
}

@keyframes morph {
  0%, 100% { width: 130px; height: 84px; border-radius: 10px; }
  33% { width: 78px; height: 104px; border-radius: 12px; }
  66% { width: 50px; height: 96px; border-radius: 14px; }
}

.design-art {
  position: absolute;
  top: 22px;
  left: 22px;
  right: 22px;
  height: 140px;
}

.shape { position: absolute; border: 1.5px solid var(--line-strong); }
.s1 { width: 70px; height: 70px; border-radius: 50%; top: 10px; left: 10%; animation: float 5s ease-in-out infinite; }
.s2 { width: 56px; height: 56px; border-radius: 12px; top: 40px; left: 45%; background: var(--text); border-color: var(--text); animation: float 6s ease-in-out infinite reverse; }
.s3 { width: 90px; height: 14px; border-radius: 10px; top: 110px; left: 20%; background: var(--line-strong); border: 0; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

.fake-cursor {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: flex-start;
  animation: cursorPath 7s var(--ease-io) infinite;
}

.fake-cursor svg { width: 20px; height: 20px; fill: var(--text); }

.fake-cursor b {
  margin: 14px 0 0 -4px;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 600;
}

@keyframes cursorPath {
  0%, 100% { transform: translate(20px, 90px); }
  30% { transform: translate(60%, 20px); }
  55% { transform: translate(75%, 80px); }
  80% { transform: translate(30%, 40px); }
}

.tile-stack {
  grid-column: span 4;
  min-height: 0;
  justify-content: space-between;
  gap: 30px;
}

.stack-marquee {
  overflow: hidden;
  margin: 0 -28px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.stack-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.stack-track span {
  margin-right: 12px;
  padding: 14px 26px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s;
}

.stack-track span:hover { background: var(--text); color: var(--bg); }
.stack-marquee:hover .stack-track { animation-play-state: paused; }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Work: stacking cards ---------- */
.stack { position: relative; }

.stack-card {
  position: sticky;
  top: calc(13vh + var(--i) * 16px);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(20px, 3vw, 40px);
  min-height: min(72vh, 640px);
  margin-bottom: 6vh;
  padding: clamp(20px, 2.6vw, 36px);
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transform-origin: 50% 0;
  will-change: transform;
}

.stack-card:last-child { margin-bottom: 0; }

.stack-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--bg);
  opacity: var(--dim, 0);
  pointer-events: none;
}

.sc-info {
  display: flex;
  flex-direction: column;
  padding: 6px 4px;
}

.sc-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.stack-card h3 {
  margin: auto 0 16px;
  padding-top: 40px;
  font-size: clamp(2.3rem, 4.6vw, 4.4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.sc-info > p { max-width: 380px; color: var(--muted); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 28px;
}

.tags li {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  font-size: 0.8rem;
  font-weight: 500;
}

.sc-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--text);
  font-weight: 500;
}

.sc-link i { font-style: normal; transition: transform 0.5s var(--ease); }
.stack-card:hover .sc-link i { transform: rotate(45deg); }

.sc-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 15%, rgba(var(--dot), 0.14), transparent 60%),
    var(--bg-2);
}

.sc-media > * { transition: transform 1s var(--ease); }
.stack-card:hover .sc-media > * { transform: scale(1.05) rotate(-1.5deg); }

/* Mock UIs (always dark "screens") */
.mock {
  width: 82%;
  border-radius: 14px;
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.mock-bar { display: flex; gap: 6px; padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }

.mock-body { display: flex; height: 240px; }

.mock-side {
  width: 20%;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.mock-side i { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.mock-side i:first-child { width: 70%; background: rgba(255, 255, 255, 0.7); }

.mock-main { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.mock-kpis { display: flex; gap: 8px; }
.mock-kpis i { flex: 1; height: 38px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.07); }

.mock-chart { flex: 1; display: flex; align-items: flex-end; gap: 7px; }

.mock-chart span {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.85));
  transform-origin: bottom;
  animation: grow 2.6s ease-in-out infinite alternate;
}

.mock-chart span:nth-child(2n) { animation-delay: -0.8s; }
.mock-chart span:nth-child(3n) { animation-delay: -1.6s; }

@keyframes grow {
  from { transform: scaleY(0.5); }
  to { transform: scaleY(1); }
}

.landing { position: relative; height: 250px; padding: 36px 28px; }
.l-title { width: 62%; height: 18px; margin-bottom: 12px; border-radius: 5px; background: rgba(255, 255, 255, 0.85); }
.l-title.short { width: 40%; background: rgba(255, 255, 255, 0.3); }
.l-btn { width: 96px; height: 30px; margin-top: 24px; border-radius: 100px; background: #fff; }

.cube { position: absolute; right: 36px; bottom: 36px; width: 100px; height: 100px; }

.cube span {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  animation: cube 6s var(--ease-io) infinite;
}

.cube span:nth-child(2) { animation-delay: -2s; opacity: 0.5; }
.cube span:nth-child(3) { animation-delay: -4s; opacity: 0.25; }

@keyframes cube {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(90deg) scale(0.65); }
  100% { transform: rotate(180deg) scale(1); }
}

.phones { display: flex; gap: 22px; }

.phone {
  width: 130px;
  height: 250px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 24px;
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
  animation: float 6s ease-in-out infinite;
}

.phone-up { margin-top: -40px; animation-delay: -3s; }
.phone-img { height: 52%; border-radius: 16px; background: linear-gradient(160deg, #e0e0e0, #2e2e2e); }
.phone i { height: 10px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.phone i:last-child { width: 55%; }

.player {
  width: 78%;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 28px;
  border-radius: 20px;
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}

.vinyl {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 0 12%, #0e0e0e 13% 15%, transparent 16%),
    repeating-radial-gradient(circle, #151515 0 3px, #222 3px 5px);
  animation: spin 5s linear infinite;
}

.wave { flex: 1; height: 90px; display: flex; align-items: center; gap: 5px; }

.wave span {
  flex: 1;
  height: 30%;
  border-radius: 4px;
  background: #fff;
  animation: wave 1.1s ease-in-out infinite;
}

.wave span:nth-child(2n) { animation-delay: -0.3s; }
.wave span:nth-child(3n) { animation-delay: -0.6s; }
.wave span:nth-child(4n) { animation-delay: -0.9s; }

@keyframes wave { 50% { height: 100%; } }

/* ---------- Experience ---------- */
.exp-list { position: relative; }

.exp-line {
  display: block;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left;
}

.exp-row {
  position: relative;
  overflow: hidden;
}

.exp-row::before {
  content: "";
  position: absolute;
  inset: 1px 0 0;
  background: var(--text);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease);
}

.exp-row:hover::before { transform: scaleY(1); transform-origin: top; }

.exp-main {
  position: relative;
  display: grid;
  grid-template-columns: 190px 1fr auto 44px;
  align-items: center;
  gap: 24px;
  padding: 34px 14px;
  transition: color 0.4s, padding 0.6s var(--ease);
}

.exp-year {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.4s;
}

.exp-main h3 {
  font-size: clamp(1.6rem, 3.6vw, 3.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.exp-company { font-size: 1rem; font-weight: 500; }

.exp-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid currentColor;
  transition: transform 0.6s var(--ease);
}

.exp-desc {
  position: relative;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease), padding 0.6s var(--ease);
}

.exp-desc p {
  min-height: 0;
  overflow: hidden;
  padding-left: calc(190px + 38px);
  max-width: 900px;
  color: var(--muted);
  transition: color 0.4s;
}

@media (hover: hover) {
  .exp-row:hover .exp-main { color: var(--bg); padding-left: 30px; }
  .exp-row:hover .exp-year { color: var(--bg); }
  .exp-row:hover .exp-arrow { transform: rotate(45deg); }
  .exp-row:hover .exp-desc { grid-template-rows: 1fr; padding-bottom: 30px; }
  .exp-row:hover .exp-desc p { color: var(--bg); padding-left: calc(190px + 54px); }
}

@media (hover: none) {
  .exp-desc { grid-template-rows: 1fr; padding-bottom: 26px; }
  .exp-row::before { display: none; }
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.edu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 440px;
  padding: 32px 30px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.4s;
}

.edu-card:hover { border-color: var(--line-strong); }

.edu-big {
  position: absolute;
  top: -24px;
  right: -8px;
  font-size: 10rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  transition: color 0.6s var(--ease), transform 0.8s var(--ease);
}

.edu-card:hover .edu-big { color: var(--text); transform: translate(-8px, 8px); }

.edu-year {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.edu-card h3 {
  margin-top: 110px;
  margin-bottom: 6px;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.edu-school { margin-bottom: 12px; font-weight: 500; }
.edu-card > p:not(.edu-school):not(.edu-score),
.edu-list { font-size: 0.95rem; color: var(--muted); }

.edu-list li { position: relative; padding-left: 18px; }
.edu-list li::before { content: "✳"; position: absolute; left: 0; font-size: 0.75rem; top: 0.25em; color: var(--text); }

.edu-score {
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--muted);
}

.edu-score strong {
  margin-right: 6px;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text);
}

/* ---------- Testimonials ---------- */
.testi {
  position: relative;
  max-width: 1120px;
}

.testi-mark {
  display: block;
  height: 0.55em;
  font-family: var(--serif);
  font-size: clamp(8rem, 16vw, 14rem);
  line-height: 0.9;
  color: var(--muted);
}

.testi-slides { display: grid; }

.testi-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
}

.testi-slide.is-active { opacity: 1; visibility: visible; }

.testi-slide p {
  font-size: clamp(1.7rem, 4vw, 3.6rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.testi-slide .w { overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.testi-slide .wi { display: inline-block; }

.testi-slide footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 36px;
}

.testi-slide footer::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--text);
}

.testi-slide footer strong { font-weight: 600; }
.testi-slide footer span { color: var(--muted); }

.testi-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 56px;
}

.testi-progress {
  flex: 1;
  max-width: 320px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}

.testi-progress span {
  display: block;
  height: 100%;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
}

.testi-count { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.testi-count b { color: var(--text); font-weight: 600; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  padding: clamp(100px, 13vw, 170px) 0 clamp(90px, 11vw, 150px);
  overflow: hidden;
}

.contact-big {
  font-size: clamp(3.4rem, 13.5vw, 14rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.065em;
}

.fill-text {
  display: block;
  padding-bottom: 0.14em;
  margin-bottom: -0.08em;
  color: transparent;
  background:
    linear-gradient(var(--text), var(--text)) no-repeat 0 0 / 0% 100%,
    linear-gradient(var(--line-strong), var(--line-strong));
  -webkit-background-clip: text;
  background-clip: text;
}

.fill-text em { font-weight: 400; letter-spacing: -0.03em; padding-right: 0.08em; }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(30px, 6vw, 80px);
  margin-top: clamp(50px, 6vw, 80px);
}

.contact-circle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.contact-circle::before,
.contact-circle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--text);
  animation: ripple 3s var(--ease) infinite;
}

.contact-circle::after { animation-delay: 1.5s; }

@keyframes ripple {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(1.6); opacity: 0; }
}

.contact-circle i { font-style: normal; font-size: 1.5rem; transition: transform 0.5s var(--ease); }
.contact-circle:hover i { transform: rotate(45deg); }

.contact-info { display: flex; flex-direction: column; gap: 26px; }

.copy-email {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}

.copy-email .roll {
  font-size: clamp(1.4rem, 3.4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.copy-email small {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 14px;
  font-weight: 500;
}

.linkedin-link:hover .icon-btn { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Floating back-to-top ---------- */
.to-top {
  position: fixed;
  right: clamp(16px, 2.2vw, 32px);
  bottom: clamp(16px, 2.2vw, 32px);
  z-index: 150;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: var(--text);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  translate: 0 24px;
  scale: 0.7;
  transition: opacity 0.5s, visibility 0.5s, translate 0.7s var(--ease), scale 0.7s var(--ease), background 0.4s, color 0.4s;
}

.to-top.show { opacity: 1; visibility: visible; translate: 0 0; scale: 1; }
.to-top:hover { background: var(--text); color: var(--bg); }
.menu-open .to-top { opacity: 0; visibility: hidden; }

.to-top-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.to-top-ring circle { fill: none; stroke-width: 1.5; }
.ttr-bg { stroke: var(--line-strong); }
.ttr-fg { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 176; stroke-dashoffset: 176; }

.to-top-arrow {
  position: relative;
  width: 20px;
  height: 20px;
  overflow: hidden;
}

.to-top-arrow svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.to-top:hover .to-top-arrow svg { animation: arrowLoop 0.9s var(--ease) infinite; }

@keyframes arrowLoop {
  0% { transform: translateY(0); }
  45% { transform: translateY(-120%); }
  46% { transform: translateY(120%); }
  100% { transform: translateY(0); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 300;
  padding: 14px 26px;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  transform: translate(-50%, 180%);
  transition: transform 0.6s var(--ease);
}

.toast.show { transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav, .header-time { display: none; }
  .menu-btn { display: inline-flex; }
}

@media (max-width: 1024px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-code { grid-row: span 1; }
  .tile-stack { grid-column: span 2; }
  .about-grid { grid-template-columns: 1fr; }
  .about-img { max-width: 460px; }
  .edu-grid { grid-template-columns: 1fr 1fr; }
  .stack-card { grid-template-columns: 1fr; top: calc(10vh + var(--i) * 12px); }
  .stack-card h3 { padding-top: 24px; }
  .sc-media { min-height: 280px; }
  .hero-bottom { grid-template-columns: 1fr auto; }
  .scroll-badge { display: none; }
  .section-indicator { display: none; }
}

@media (max-width: 760px) {
  .header { padding: 18px 22px; }
  .logo-text { display: none; }
  .hero { padding: 8px; }
  .hero-card { border-radius: 22px; }
  .hero-inner { padding-top: 90px; }
  .hero-meta { flex-direction: column; gap: 6px; }
  .hero-meta p:nth-child(2) { display: none; }
  .hero-bottom { grid-template-columns: 1fr; gap: 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { justify-content: center; }
  .bento { grid-template-columns: 1fr; }
  .tile-code, .tile-stack { grid-column: span 1; }
  .tile { min-height: 260px; }
  .code { min-height: 200px; }
  .edu-grid { grid-template-columns: 1fr; }
  .edu-card { min-height: 380px; }
  .stats { gap: 10px; }
  .stat p { font-size: 0.75rem; }
  .exp-main { grid-template-columns: 1fr auto; gap: 8px 16px; padding: 26px 4px; }
  .exp-year { grid-column: 1 / -1; }
  .exp-company { grid-column: 1; }
  .exp-arrow { grid-row: 2 / 4; grid-column: 2; width: 38px; height: 38px; }
  .exp-desc p { padding-left: 4px; }
  .phones { transform: scale(0.8); }
  .phone { width: 110px; height: 220px; }
  .mock-body { height: 190px; }
  .vinyl { width: 80px; height: 80px; }
  .player { gap: 16px; padding: 20px; }
  .contact-circle { width: 150px; height: 150px; font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
