/* ============================================================
   Abhishek Mishra — Portfolio
   Zero dependencies. Dark-first, light theme supported.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #05060a;
  --bg-2: #0a0c14;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-str: rgba(255, 255, 255, 0.16);
  --txt: #eef1f8;
  --txt-2: #a4adc4;
  --txt-3: #6f778e;

  --a1: #22d3ee; /* cyan   */
  --a2: #8b5cf6; /* violet */
  --a3: #f472b6; /* pink   */
  --grad: linear-gradient(100deg, var(--a1), var(--a2) 55%, var(--a3));

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow: 0 24px 70px -28px rgba(0, 0, 0, 0.85);
  --glow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 30px 80px -40px rgba(139, 92, 246, 0.55);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 74px;
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eef0f7;
  --surface: rgba(15, 18, 32, 0.035);
  --surface-2: rgba(15, 18, 32, 0.06);
  --line: rgba(15, 18, 32, 0.1);
  --line-str: rgba(15, 18, 32, 0.18);
  --txt: #10131f;
  --txt-2: #4b5268;
  --txt-3: #767d92;
  --a1: #0891b2;
  --a2: #7c3aed;
  --a3: #db2777;
  --shadow: 0 24px 60px -30px rgba(20, 24, 45, 0.28);
  --glow: 0 0 0 1px rgba(15, 18, 32, 0.06), 0 30px 70px -40px rgba(124, 58, 237, 0.4);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--txt);
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.02rem);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

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

svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg[data-fill], .hero__social svg, .i-moon { fill: currentColor; stroke: none; }

.mono { font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; }

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

::selection { background: var(--a2); color: #fff; }

.skip-link {
  position: fixed;
  top: -60px; left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--a2); color: #fff;
  border-radius: 0 0 10px 10px;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--a2), var(--a1));
  border-radius: 99px;
  border: 2px solid var(--bg);
}

/* ============================================================
   ambient background
   ============================================================ */
#constellation {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  filter: blur(90px);
}
.aurora span {
  position: absolute;
  width: 46vw;
  height: 46vw;
  min-width: 380px;
  min-height: 380px;
  border-radius: 50%;
  opacity: 0.4;
  will-change: transform;
}
.aurora span:nth-child(1) { background: var(--a2); top: -12%; left: -8%; animation: drift1 26s ease-in-out infinite; }
.aurora span:nth-child(2) { background: var(--a1); top: 30%; right: -12%; animation: drift2 32s ease-in-out infinite; }
.aurora span:nth-child(3) { background: var(--a3); bottom: -18%; left: 28%; opacity: 0.28; animation: drift3 38s ease-in-out infinite; }
html[data-theme="light"] .aurora { filter: blur(110px); }
html[data-theme="light"] .aurora span { opacity: 0.22; }

@keyframes drift1 { 50% { transform: translate3d(14vw, 10vh, 0) scale(1.18); } }
@keyframes drift2 { 50% { transform: translate3d(-16vw, 14vh, 0) scale(0.85); } }
@keyframes drift3 { 50% { transform: translate3d(10vw, -12vh, 0) scale(1.12); } }

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 420px; height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.14), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  will-change: transform;
}
body.has-cursor .cursor-glow { opacity: 1; }

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 120;
  background: var(--line);
}
.scroll-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 14px var(--a2);
}

/* ============================================================
   preloader
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
body.loaded #preloader { opacity: 0; visibility: hidden; }

.preloader__inner { text-align: center; }
.preloader__mark {
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulse 1.6s var(--ease) infinite;
}
.preloader__bar {
  width: 190px;
  height: 2px;
  margin: 18px auto 12px;
  background: var(--line);
  overflow: hidden;
  border-radius: 99px;
}
.preloader__bar i {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--grad);
  animation: load 1.1s var(--ease) infinite;
}
.preloader__txt {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--txt-3);
}
@keyframes pulse { 50% { opacity: 0.45; transform: scale(0.97); } }
@keyframes load { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }

/* ============================================================
   nav
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 110;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 clamp(18px, 4vw, 44px);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s, height 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  height: 62px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}

.nav__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 24px -8px var(--a2);
}
.nav__brandtxt { font-weight: 600; letter-spacing: -0.02em; }
.nav__brandtxt em { font-style: normal; color: var(--txt-3); }

.nav__links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  backdrop-filter: blur(10px);
}
.nav__links a {
  position: relative;
  z-index: 1;
  padding: 7px 15px;
  border-radius: 99px;
  font-size: 0.86rem;
  color: var(--txt-2);
  transition: color 0.3s var(--ease);
}
.nav__links a:hover { color: var(--txt); }
.nav__links a.is-active { color: var(--txt); font-weight: 600; }
.nav__ink {
  position: absolute;
  z-index: 0;
  top: 5px;
  height: calc(100% - 10px);
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  opacity: 0;
  transition: transform 0.45s var(--ease), width 0.45s var(--ease), opacity 0.3s;
  will-change: transform, width;
}

.nav__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt-2);
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.icon-btn:hover { color: var(--txt); border-color: var(--line-str); transform: translateY(-2px); }
.icon-btn svg { width: 18px; height: 18px; }
.i-moon { display: none; }
html[data-theme="light"] .i-sun { display: none; }
html[data-theme="light"] .i-moon { display: block; }

/* burger */
.burger {
  display: none;
  width: 40px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  position: relative;
}
.burger span {
  position: absolute;
  left: 11px;
  width: 16px; height: 1.6px;
  background: var(--txt);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 62px; left: 12px; right: 12px;
  z-index: 109;
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
  animation: menuIn 0.35s var(--ease);
}
/* the [hidden] attribute must win over `display: grid` above */
.mobile-menu[hidden] { display: none; }

.mobile-menu a {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 1.05rem;
  transition: background 0.25s;
}
.mobile-menu a:hover { background: var(--surface-2); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-12px); } }

/* ============================================================
   buttons
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s, color 0.3s;
  will-change: transform;
}
.btn svg { width: 17px; height: 17px; }
.btn--lg { padding: 16px 28px; font-size: 0.95rem; }

.btn--primary {
  background: var(--grad);
  background-size: 200% 100%;
  color: #fff;
  box-shadow: 0 14px 38px -16px var(--a2);
  animation: gradShift 7s ease infinite;
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 22px 50px -18px var(--a2); }
@keyframes gradShift { 50% { background-position: 100% 0; } }

.btn--ghost {
  border-color: var(--line-str);
  background: var(--surface);
  color: var(--txt);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--a1); color: var(--a1); }

/* ============================================================
   layout primitives
   ============================================================ */
.wrap {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 32px);
}

.section { position: relative; padding: clamp(72px, 11vh, 130px) 0; }
.section--contact { padding-bottom: clamp(60px, 8vh, 90px); }

.sec-head { margin-bottom: clamp(34px, 5vw, 56px); }
.sec-num {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: var(--a1);
  margin-bottom: 10px;
}
.sec-title {
  font-size: clamp(2rem, 1.3rem + 3.6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.sec-sub { margin-top: 12px; color: var(--txt-2); max-width: 56ch; }

.grad {
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 8s ease infinite;
}

.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.badge--live {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.badge--live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  70%, 100% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}

.chip {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 0.82rem;
  color: var(--txt-2);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.25s var(--ease), color 0.25s, border-color 0.25s;
}
.chip:hover { transform: translateY(-2px); color: var(--txt); border-color: var(--line-str); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags li {
  padding: 4px 11px;
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--txt-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: color 0.25s, border-color 0.25s;
}
.tags li:hover { color: var(--a1); border-color: var(--a1); }

/* ============================================================
   hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) clamp(18px, 4vw, 32px) 90px;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, #000 20%, transparent 78%);
  opacity: 0.6;
}

.hero__inner, .hero__card { position: relative; z-index: 3; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px 6px 12px;
  margin-bottom: 22px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.78rem;
  color: var(--txt-2);
  backdrop-filter: blur(8px);
}
.hero__eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px #34d399;
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(2.9rem, 1.4rem + 8.4vw, 6.6rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.055em;
  margin-bottom: 18px;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .char {
  display: inline-block;
  transform: translateY(110%) rotate(6deg);
  animation: charIn 0.9s var(--ease) forwards;
}
.hero__title .char--space { width: 0.3em; }
@keyframes charIn { to { transform: none; } }

.hero__role {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 1.8em;
  margin-bottom: 18px;
  font-size: clamp(0.9rem, 0.82rem + 0.5vw, 1.1rem);
  color: var(--a1);
  font-weight: 400;
}
.hero__role .mono:first-child { color: var(--txt-3); }
.caret {
  display: inline-block;
  width: 9px; height: 1.1em;
  background: var(--a1);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__lede { max-width: 54ch; color: var(--txt-2); margin-bottom: 30px; }
.hero__lede strong { color: var(--txt); font-weight: 600; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }

.hero__social { display: flex; gap: 10px; }
.hero__social a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--txt-2);
  transition: transform 0.3s var(--ease), color 0.25s, border-color 0.25s, box-shadow 0.3s;
}
.hero__social a:hover {
  transform: translateY(-4px);
  color: var(--txt);
  border-color: var(--a2);
  box-shadow: 0 12px 30px -14px var(--a2);
}
.hero__social svg { width: 19px; height: 19px; }
.hero__social a[aria-label="Email"] svg,
.hero__social a[aria-label="Phone"] svg { fill: none; stroke: currentColor; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.hero__scroll i {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--a1), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 50% { opacity: 0.25; transform: scaleY(0.55); transform-origin: top; } }

/* ---------- code card ---------- */
.hero__card { position: relative; }

.tilt { transform-style: preserve-3d; will-change: transform; transition: transform 0.5s var(--ease); }

.code-card {
  --code-fz: clamp(0.68rem, 0.6rem + 0.35vw, 0.82rem);
  --code-lh: 1.85;
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-str);
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--glow), var(--shadow);
  overflow: hidden;
}
/* sweeping highlight along the top edge */
.code-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  z-index: 4;
  width: 45%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--a1), var(--a3), transparent);
  animation: edgeSweep 4.5s var(--ease) infinite;
}
@keyframes edgeSweep {
  0%   { transform: translateX(-100%); opacity: 0; }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: translateX(322%); opacity: 0; }
}

.code-card__bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.code-card__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-str); }
.code-card__bar i:nth-child(1) { background: #ff5f57; }
.code-card__bar i:nth-child(2) { background: #febc2e; }
.code-card__bar i:nth-child(3) { background: #28c840; }
.code-card__file { margin-left: auto; font-size: 0.7rem; color: var(--txt-3); }

.code-card__replay {
  display: grid;
  place-items: center;
  width: 25px; height: 25px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--txt-3);
  transition: color 0.25s, border-color 0.25s, transform 0.5s var(--ease);
}
.code-card__replay:hover { color: var(--a1); border-color: var(--a1); transform: rotate(-180deg); }
.code-card__replay svg { width: 13px; height: 13px; }

/* scanning beam */
.code-card__scan {
  position: absolute;
  left: 0; right: 0; top: 0;
  z-index: 2;
  height: 110px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--a1) 9%, transparent), transparent);
  animation: scanBeam 5.5s linear infinite;
}
@keyframes scanBeam {
  0%   { transform: translateY(-110px); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(620px); opacity: 0; }
}

.code-card__wrap { position: relative; z-index: 1; display: flex; }

.code-card__gutter {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 20px 0 24px;
  text-align: right;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 32%, transparent);
  user-select: none;
}
.code-card__gutter span {
  padding: 0 11px 0 14px;
  font-size: var(--code-fz);
  line-height: var(--code-lh);
  color: var(--txt-3);
  opacity: 0.42;
  transition: color 0.25s, opacity 0.25s, background 0.25s;
}
.code-card__gutter span.is-active {
  color: var(--a1);
  opacity: 1;
  background: color-mix(in srgb, var(--a1) 10%, transparent);
}

.code-card__body {
  flex: 1 1 auto;
  padding: 20px 20px 24px;
  font-size: var(--code-fz);
  line-height: var(--code-lh);
  color: var(--txt-2);
  overflow-x: auto;
}

/* typing caret injected by JS */
.type-caret {
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  vertical-align: -0.19em;
  border-radius: 1px;
  background: var(--a1);
  box-shadow: 0 0 12px var(--a1);
}
.code-card.is-done .type-caret { animation: blink 1s steps(2) infinite; }

/* compile status bar */
.code-card__status {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.68rem;
  color: var(--txt-3);
}
.code-card__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #febc2e;
  box-shadow: 0 0 10px #febc2e;
  animation: pulse 0.9s ease-in-out infinite;
}
.code-card.is-done .code-card__dot {
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: none;
}
.code-card__ms { margin-left: auto; color: var(--a1); }

/* floating tech chips */
.float-chip {
  position: absolute;
  z-index: 6;
  padding: 6px 13px;
  border-radius: 99px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  white-space: nowrap;
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  border: 1px solid var(--line-str);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  animation: floaty 6.5s ease-in-out infinite;
}
.float-chip--1 { top: -15px; right: 30px; color: var(--a1); }
.float-chip--2 { bottom: 62px; left: -32px; color: var(--a3); animation-delay: -2.2s; }
.float-chip--3 { top: 46%; right: -28px; color: var(--a2); animation-delay: -4.4s; }
@keyframes floaty {
  50% { transform: translateY(-13px) rotate(-1.5deg); }
}
.c-k { color: var(--a3); }
.c-t { color: var(--a1); }
.c-s { color: #86efac; }
.c-n { color: #fbbf24; }
.c-c { color: var(--txt-3); font-style: italic; }
.c-nn { color: var(--a2); }

/* ============================================================
   marquee
   ============================================================ */
.marquee {
  position: relative;
  z-index: 3;
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: scrollX 34s linear infinite;
}
.marquee__track span {
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--txt-3);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee:hover .marquee__track span { color: var(--txt-2); }
.marquee__track b { color: var(--a2); font-size: 0.8rem; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ============================================================
   about
   ============================================================ */
.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 54px);
  align-items: start;
}
.about__text .lead {
  font-size: clamp(1.08rem, 1rem + 0.6vw, 1.35rem);
  font-weight: 400;
  color: var(--txt);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.about__text p { color: var(--txt-2); margin-bottom: 16px; }
.about__text strong { color: var(--txt); font-weight: 600; }
.about__chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.stat {
  padding: 20px 18px;
  border-radius: var(--r);
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.stat:hover { transform: translateY(-5px); border-color: var(--line-str); box-shadow: var(--glow); }
.stat b {
  display: block;
  font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.045em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-size: 0.78rem; color: var(--txt-3); }

.edu { padding: 24px; }
.edu h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--a1);
  margin-bottom: 16px;
}
.edu li { padding: 12px 0; border-top: 1px solid var(--line); }
.edu li:first-of-type { border-top: 0; padding-top: 0; }
.edu li b { display: block; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em; }
.edu li em { font-style: normal; font-size: 0.8rem; color: var(--txt-3); }

/* ============================================================
   skills
   ============================================================ */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.skill-card {
  position: relative;
  padding: 26px 24px 28px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.35s, box-shadow 0.4s;
}
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.35s;
}
.skill-card:hover { border-color: var(--line-str); box-shadow: var(--glow); }
.skill-card:hover::before { opacity: 1; }
.skill-card__icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  font-size: 1.4rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.skill-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.skill-card p { font-size: 0.87rem; color: var(--txt-2); margin-bottom: 16px; }
.skill-card .tags { margin-bottom: 20px; }

.meter {
  height: 4px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--grad);
  transition: width 1.4s var(--ease);
}

/* ============================================================
   timeline
   ============================================================ */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 7px;
  width: 1px;
  background: linear-gradient(var(--a1), var(--a2), transparent);
}
.tl { position: relative; margin-bottom: 18px; }
.tl__dot {
  position: absolute;
  top: 26px; left: -34px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--a1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 14%, transparent);
}
.tl:first-child .tl__dot { border-color: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16); animation: ping2 2.4s ease-out infinite; }
@keyframes ping2 { 70%, 100% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); } }

.tl__card {
  padding: 24px 26px;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.tl__card:hover { transform: translateX(6px); border-color: var(--line-str); box-shadow: var(--glow); }
.tl__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.tl__card h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.03em; }
.tl__when {
  font-size: 0.72rem;
  padding: 4px 11px;
  border-radius: 99px;
  color: var(--a1);
  background: color-mix(in srgb, var(--a1) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--a1) 26%, transparent);
  white-space: nowrap;
}
.tl__org { font-size: 0.9rem; color: var(--txt-2); margin: 4px 0 14px; }
.tl__card > ul:not(.tags) { display: grid; gap: 8px; margin-bottom: 16px; }
.tl__card > ul:not(.tags) li {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--txt-2);
}
.tl__card > ul:not(.tags) li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.66em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--grad);
}
.tl__card strong { color: var(--txt); font-weight: 600; }

/* ============================================================
   projects
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter {
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--txt-2);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: color 0.25s, border-color 0.25s, background 0.3s, transform 0.25s var(--ease);
}
.filter:hover { color: var(--txt); transform: translateY(-2px); }
.filter.is-active {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 10px 26px -12px var(--a2);
}
html[data-theme="light"] .filter.is-active { color: #fff; }

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.pcard {
  position: relative;
  padding: 26px 26px 28px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.35s, box-shadow 0.4s, opacity 0.35s;
}
.pcard:hover { border-color: var(--line-str); box-shadow: var(--glow); }
.pcard__glow {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--a2) 26%, transparent), transparent 68%);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
  pointer-events: none;
}
.pcard:hover .pcard__glow { opacity: 1; }

.pcard.is-hidden {
  display: none;
}
.pcard.is-in { animation: cardIn 0.5s var(--ease) backwards; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } }

.pcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.pcard__ico {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.35rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: transform 0.4s var(--ease);
}
.pcard:hover .pcard__ico { transform: rotate(-8deg) scale(1.08); }
.pcard__kind {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.pcard h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.pcard > p { font-size: 0.88rem; color: var(--txt-2); margin-bottom: 16px; }
.pcard__points { display: grid; gap: 7px; margin-bottom: 18px; }
.pcard__points li {
  position: relative;
  padding-left: 20px;
  font-size: 0.84rem;
  color: var(--txt-2);
}
.pcard__points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--a1);
  font-size: 0.8rem;
}
.pcard--cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--a2) 12%, transparent), var(--surface));
}
.pcard--cta h3 { margin-bottom: 0; }
.pcard--cta p { margin-bottom: 6px; }

/* ============================================================
   wins
   ============================================================ */
.wins {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px;
}
.win {
  position: relative;
  padding: 30px 26px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.35s, box-shadow 0.4s;
}
.win::after {
  content: "";
  position: absolute;
  top: -40%; right: -20%;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--a3) 22%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.45s;
}
.win:hover { transform: translateY(-6px); border-color: var(--line-str); box-shadow: var(--glow); }
.win:hover::after { opacity: 1; }
.win__medal { font-size: 2.2rem; margin-bottom: 14px; }
.win h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 9px; }
.win p { font-size: 0.88rem; color: var(--txt-2); }
.win strong { color: var(--txt); font-weight: 600; }

/* ============================================================
   contact
   ============================================================ */
.contact {
  position: relative;
  overflow: hidden;
  padding: clamp(38px, 6vw, 68px) clamp(24px, 5vw, 60px);
  border-radius: var(--r-xl);
  text-align: center;
}
.contact__glow {
  position: absolute;
  top: -55%; left: 50%;
  transform: translateX(-50%);
  width: 760px; height: 760px;
  max-width: 150%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--a2) 26%, transparent), transparent 62%);
  pointer-events: none;
}
.contact .sec-num { margin-bottom: 14px; }
.contact__title {
  font-size: clamp(1.9rem, 1.2rem + 3.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-bottom: 16px;
}
.contact__sub {
  max-width: 50ch;
  margin: 0 auto 30px;
  color: var(--txt-2);
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 26px;
}
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
  font-size: 0.86rem;
}
.contact__links a {
  color: var(--txt-2);
  transition: color 0.25s;
  border-bottom: 1px solid transparent;
}
.contact__links a:hover { color: var(--a1); border-bottom-color: var(--a1); }

/* ============================================================
   footer + to-top
   ============================================================ */
.footer {
  position: relative;
  z-index: 3;
  padding: 28px 0 34px;
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--txt-3);
}
.footer__note { font-size: 0.74rem; }

.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 100;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  color: var(--txt-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s, color 0.25s, border-color 0.25s;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--a1); border-color: var(--a1); }
.to-top svg { width: 18px; height: 18px; }

/* ============================================================
   reveal animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   responsive
   ============================================================ */
/* desktop: the mobile panel must never render, even if left open on resize */
@media (min-width: 1001px) {
  .mobile-menu { display: none !important; }
}

@media (max-width: 1000px) {
  .nav__links { display: none; }
  .burger { display: block; }
  .nav__cta { display: none; }
  .hero { grid-template-columns: 1fr; align-content: center; padding-bottom: 110px; }
  .hero__card { max-width: 560px; }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --nav-h: 64px; }
  .nav__brandtxt { display: none; }
  .float-chip--2, .float-chip--3 { display: none; }
  .float-chip--1 { right: 14px; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 30px); }
  .hero__scroll { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr; }
  .timeline { padding-left: 26px; }
  .tl__dot { left: -26px; width: 13px; height: 13px; }
  .tl__card { padding: 20px; }
  .contact__actions .btn { width: 100%; }
  .btn { padding: 12px 20px; font-size: 0.86rem; }
  #constellation { opacity: 0.35; }
}

@media (hover: none) {
  .cursor-glow { display: none; }
}

/* ============================================================
   accessibility: reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__title .char { transform: none; }
  #constellation, .aurora, .cursor-glow,
  .code-card__scan, .code-card::before, .type-caret { display: none; }
  .float-chip { animation: none; }
}

/* ============================================================
   print
   ============================================================ */
@media print {
  #constellation, .aurora, .grain, .cursor-glow, .nav, .mobile-menu,
  .to-top, .scroll-progress, #preloader, .marquee, .hero__scroll,
  .float-chip, .code-card__scan, .code-card__replay { display: none !important; }
  body { background: #fff; color: #000; }
  .glass, .code-card { box-shadow: none; border-color: #ccc; }
  .grad { color: #000 !important; -webkit-text-fill-color: #000; }
}


/* ============================================================
   GitHub profile + live repository browser
   ============================================================ */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Explicit state: the mobile menu is never visible unless JS opens it. */
.mobile-menu { display: none; }
.mobile-menu.is-open { display: grid; }
@media (min-width: 1001px) {
  .mobile-menu.is-open { display: none !important; }
}

.github-showcase { margin-top: clamp(70px, 9vw, 110px); }
.github-profile {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(26px, 4vw, 46px);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.github-profile__halo {
  position: absolute;
  left: -140px; top: -190px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--a2) 24%, transparent), transparent 68%);
  pointer-events: none;
}
.github-profile__identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
}
.github-avatar {
  position: relative;
  flex: 0 0 auto;
  width: clamp(112px, 15vw, 172px);
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 28px;
  background: var(--grad);
  box-shadow: 0 22px 55px -24px var(--a2);
  transform: rotate(-2deg);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.github-avatar:hover { transform: rotate(0) scale(1.025); box-shadow: 0 28px 70px -25px var(--a2); }
.github-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 24px;
  background: var(--bg-2);
  filter: saturate(0.92) contrast(1.04);
}
.github-avatar__status {
  position: absolute;
  right: -5px; bottom: 12px;
  width: 19px; height: 19px;
  border: 4px solid var(--bg-2);
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 18px #34d399;
}
.github-profile__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--a1);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
}
.github-profile__kicker i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulse 1.8s ease-in-out infinite;
}
.github-profile h3 {
  font-size: clamp(1.65rem, 1.1rem + 2vw, 2.55rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.github-handle {
  display: inline-block;
  margin: 6px 0 10px;
  color: var(--txt-3);
  font-size: 0.78rem;
  transition: color 0.25s;
}
.github-handle:hover { color: var(--a1); }
.github-profile__identity p { max-width: 47ch; color: var(--txt-2); font-size: 0.88rem; }

.github-profile__stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: center;
  gap: 10px;
}
.github-profile__stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.github-profile__stats b {
  display: block;
  font-size: clamp(1.35rem, 1rem + 1.3vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--txt);
}
.github-profile__stats span { font-size: 0.7rem; color: var(--txt-3); }

.github-languages {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.github-languages__bar {
  display: flex;
  gap: 3px;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}
.github-languages__bar i {
  min-width: 4px;
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left;
  animation: langGrow 0.9s var(--ease) forwards;
}
@keyframes langGrow { to { transform: scaleX(1); } }
.github-languages__legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 13px; }
.github-languages__legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.66rem;
  color: var(--txt-3);
}
.github-languages__legend i { width: 7px; height: 7px; border-radius: 50%; }
.github-languages__loading { display: flex; gap: 6px; height: 8px; }
.github-languages__loading i {
  flex: 1;
  border-radius: 99px;
  background: var(--surface-2);
  animation: skeleton 1.4s ease-in-out infinite alternate;
}
.github-languages__loading i:nth-child(2) { animation-delay: .15s; }
.github-languages__loading i:nth-child(3) { animation-delay: .3s; }
.github-languages__loading i:nth-child(4) { animation-delay: .45s; }

.repo-browser { margin-top: clamp(42px, 6vw, 70px); }
.repo-browser__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.repo-browser__head .sec-num { margin-bottom: 7px; }
.repo-browser__head h3 {
  font-size: clamp(1.7rem, 1.2rem + 2.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.repo-browser__all { color: var(--txt-3); font-size: 0.72rem; transition: color 0.25s; }
.repo-browser__all:hover { color: var(--a1); }

.repo-tools {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r);
  margin-bottom: 13px;
}
.repo-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.repo-search:focus-within { border-color: var(--a1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a1) 12%, transparent); }
.repo-search svg { flex: 0 0 auto; width: 17px; color: var(--txt-3); }
.repo-search input {
  width: 100%; min-width: 0;
  padding: 10px 0;
  color: var(--txt);
  background: transparent;
  border: 0;
  outline: 0;
  font: 0.8rem "JetBrains Mono", monospace;
}
.repo-search input::placeholder { color: var(--txt-3); }
.repo-select select {
  height: 100%;
  min-height: 42px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--txt-2);
  background: var(--bg-2);
  font: 0.72rem "JetBrains Mono", monospace;
  outline: 0;
  cursor: pointer;
}
.repo-select select:focus { border-color: var(--a1); }
.repo-result { margin: 0 0 12px 3px; color: var(--txt-3); font-size: 0.68rem; }

.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.repo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 222px;
  padding: 22px;
  overflow: hidden;
  transition: transform 0.38s var(--ease), border-color 0.3s, box-shadow 0.38s;
  animation: repoIn 0.55s var(--ease) backwards;
}
.repo-card::before {
  content: "";
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s, left 0.3s, right 0.3s;
}
.repo-card:hover { transform: translateY(-5px); border-color: var(--line-str); box-shadow: var(--glow); }
.repo-card:hover::before { opacity: 1; left: 0; right: 0; }
@keyframes repoIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.repo-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.repo-card__folder {
  display: grid;
  place-items: center;
  width: 39px; height: 39px;
  border: 1px solid color-mix(in srgb, var(--a1) 25%, transparent);
  border-radius: 12px;
  color: var(--a1);
  background: color-mix(in srgb, var(--a1) 8%, transparent);
}
.repo-card__folder svg { width: 19px; }
.repo-card__arrow { color: var(--txt-3); transition: color .25s, transform .3s var(--ease); }
.repo-card:hover .repo-card__arrow { color: var(--a1); transform: translate(2px, -2px); }
.repo-card__arrow svg { width: 17px; }
.repo-card h4 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
}
.repo-card p {
  display: -webkit-box;
  margin-bottom: 17px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: var(--txt-2);
  font-size: 0.78rem;
  line-height: 1.6;
}
.repo-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  color: var(--txt-3);
  font: 0.65rem "JetBrains Mono", monospace;
}
.repo-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.repo-card__meta i { width: 7px; height: 7px; border-radius: 50%; }
.repo-card__meta svg { width: 12px; }
.repo-skeleton { height: 222px; animation: skeleton 1.1s ease-in-out infinite alternate; }
@keyframes skeleton { from { opacity: .35; } to { opacity: .85; } }
.repo-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--txt-3);
}
.repo-more { display: flex; margin: 24px auto 0; }
.repo-more[hidden] { display: none; }
.repo-noscript { margin-top: 14px; color: var(--txt-2); text-align: center; }
.repo-noscript a { color: var(--a1); }

/* source buttons appended to curated work by JS */
.pcard__source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: var(--a1);
  font: 0.7rem "JetBrains Mono", monospace;
  transition: gap 0.25s, color 0.25s;
}
.pcard__source:hover { gap: 11px; color: var(--a3); }
.pcard__source svg { width: 14px; }

@media (max-width: 900px) {
  .github-profile { grid-template-columns: 1fr; }
  .repo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .github-profile__identity { align-items: flex-start; flex-direction: column; }
  .github-avatar { width: 132px; }
  .github-profile__stats { grid-template-columns: repeat(2, 1fr); }
  .repo-browser__head { align-items: flex-start; flex-direction: column; }
  .repo-tools { grid-template-columns: 1fr; }
  .repo-select select { width: 100%; }
  .repo-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   hero portrait — floating pill above the code card
   ============================================================ */
.hero__portrait {
  position: absolute;
  z-index: 7;
  top: -34px;
  left: -32px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 8px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  border: 1px solid var(--line-str);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  animation: floaty 7.5s ease-in-out infinite;
  animation-delay: -1.5s;
}
.hero__portrait img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  background: var(--bg-2);
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--bg-2), var(--bg-2)),
    var(--grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.hero__portrait figcaption {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--txt-2);
}
@media (max-width: 1000px) {
  .hero__portrait { top: -22px; left: 10px; }
}
@media (max-width: 620px) {
  .hero__portrait { padding: 6px 16px 6px 6px; }
  .hero__portrait img { width: 46px; height: 46px; }
  .hero__portrait figcaption { font-size: 0.62rem; }
}
