/* =========================================================
   Nishant Routray — Portfolio
   Design system: dark glassmorphism + animated gradient mesh
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #05060a;
  --bg-soft: #0a0c14;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e8eaf2;
  --text-dim: #a3abbd;
  --text-faint: #6b7488;

  --a1: #6366f1;
  --a2: #22d3ee;
  --a3: #a855f7;
  --a4: #f472b6;
  --a5: #34d399;

  --grad: linear-gradient(120deg, var(--a2), var(--a1) 45%, var(--a3) 78%, var(--a4));
  --grad-soft: linear-gradient(120deg, rgba(34, 211, 238, .18), rgba(168, 85, 247, .18));

  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;

  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --glow: 0 0 0 1px rgba(255, 255, 255, .06), 0 18px 50px -18px rgba(99, 102, 241, .5);

  --ff-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-display: 'Space Grotesk', var(--ff-sans);
  --ff-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --nav-h: 74px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
ul { list-style: none; }

::selection { background: rgba(99, 102, 241, .45); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #06070c; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--a1), var(--a3));
  border-radius: 99px;
  border: 2px solid #06070c;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(var(--a2), var(--a4)); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.section {
  position: relative;
  padding: 110px 0;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--a2);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a2);
  box-shadow: 0 0 10px var(--a2);
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
}

.section-sub {
  color: var(--text-dim);
  margin-top: 14px;
  font-size: 1.02rem;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Animated background ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1000px 700px at 78% -8%, rgba(99, 102, 241, .20), transparent 62%),
    radial-gradient(900px 620px at 8% 12%, rgba(34, 211, 238, .14), transparent 60%),
    var(--bg);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .40;
  will-change: transform;
}

.blob.b1 {
  width: 46vw; height: 46vw; min-width: 380px; min-height: 380px;
  background: radial-gradient(circle at 30% 30%, #6366f1, transparent 70%);
  top: -14%; left: -8%;
  animation: drift1 26s ease-in-out infinite;
}
.blob.b2 {
  width: 40vw; height: 40vw; min-width: 330px; min-height: 330px;
  background: radial-gradient(circle at 60% 40%, #22d3ee, transparent 70%);
  top: 30%; right: -12%;
  animation: drift2 32s ease-in-out infinite;
}
.blob.b3 {
  width: 38vw; height: 38vw; min-width: 300px; min-height: 300px;
  background: radial-gradient(circle at 50% 50%, #a855f7, transparent 70%);
  bottom: -14%; left: 24%;
  animation: drift3 29s ease-in-out infinite;
}
.blob.b4 {
  width: 26vw; height: 26vw; min-width: 220px; min-height: 220px;
  background: radial-gradient(circle at 50% 50%, #f472b6, transparent 70%);
  top: 62%; left: 4%;
  opacity: .28;
  animation: drift2 36s ease-in-out infinite reverse;
}

@keyframes drift1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(9vw, 7vh, 0) scale(1.16); }
}
@keyframes drift2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50%      { transform: translate3d(-10vw, -6vh, 0) scale(.9); }
}
@keyframes drift3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(.95); }
  50%      { transform: translate3d(6vw, -9vh, 0) scale(1.2); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 30%, #000 20%, transparent 78%);
}

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

/* ---------- Cursor glow ---------- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 460px; height: 460px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle, rgba(99, 102, 241, .14), rgba(34, 211, 238, .06) 40%, transparent 68%);
  opacity: 0;
  transition: opacity .4s ease;
  mix-blend-mode: screen;
}
.cursor-glow.on { opacity: 1; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  z-index: 999;
  box-shadow: 0 0 14px rgba(99, 102, 241, .8);
  transition: width .1s linear;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader.hide { opacity: 0; visibility: hidden; }

.loader-mark {
  font-family: var(--ff-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: .06em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulseMark 1.5s ease-in-out infinite;
}
.loader-bar {
  width: 190px;
  height: 3px;
  margin-top: 18px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.loader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: var(--grad);
  animation: loadSlide 1.1s ease-in-out infinite;
}
@keyframes pulseMark { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes loadSlide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  display: flex;
  align-items: center;
  transition: background .35s ease, backdrop-filter .35s ease, border-color .35s ease, height .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 8, 14, .72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
  height: 64px;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--grad);
  color: #06070c;
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 8px 24px -8px rgba(99, 102, 241, .9);
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.08); }
.brand-dot { color: var(--a2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-links a {
  position: relative;
  display: block;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color .25s ease, background .25s ease;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-links a.active {
  color: #fff;
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 600;
  background: var(--grad);
  color: #06070c;
  box-shadow: 0 10px 30px -12px rgba(99, 102, 241, .9);
  transition: transform .3s var(--ease), box-shadow .3s ease, filter .3s ease;
}
.nav-cta:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 16px 36px -12px rgba(99, 102, 241, 1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .32s var(--ease), opacity .2s ease, width .32s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; width: 13px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 890;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 28px;
  background: rgba(5, 6, 10, .93);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity .35s ease, transform .35s var(--ease), visibility .35s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a {
  font-family: var(--ff-display);
  font-size: 1.9rem;
  font-weight: 700;
  padding: 10px 0;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  transition: color .25s ease, padding-left .25s var(--ease);
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text); padding-left: 12px; }
.mobile-menu a span { font-family: var(--ff-mono); font-size: .8rem; color: var(--a2); margin-right: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 99px;
  font-size: .93rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s ease, background .3s ease, border-color .3s ease, color .3s ease;
  will-change: transform;
}
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: var(--grad);
  color: #06070c;
  box-shadow: 0 16px 40px -16px rgba(99, 102, 241, .95);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 24px 52px -16px rgba(99, 102, 241, 1); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--a2);
  box-shadow: 0 16px 40px -20px rgba(34, 211, 238, .8);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 90px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  font-size: .82rem;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.status-dot {
  position: relative;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--a5);
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--a5);
  animation: ping 1.9s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.hero-hi {
  font-family: var(--ff-mono);
  font-size: 1rem;
  color: var(--a2);
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave 2.4s ease-in-out infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
}

.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(2.9rem, 7.4vw, 5.4rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.035em;
  margin-bottom: 14px;
}
.hero-name .grad-text {
  background: var(--grad);
  background-size: 250% 250%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 7s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-role {
  font-family: var(--ff-mono);
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  color: var(--text);
  margin-bottom: 20px;
  min-height: 1.8em;
}
.hero-role .prefix { color: var(--text-faint); }
.type-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--a2);
  margin-left: 3px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.hero-bio {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 30px;
}
.hero-bio strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.socials { display: flex; gap: 12px; }
.socials a {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  backdrop-filter: blur(12px);
  transition: transform .35s var(--ease), color .3s ease, border-color .3s ease, box-shadow .3s ease, background .3s ease;
}
.socials a svg { width: 19px; height: 19px; }
.socials a:hover {
  transform: translateY(-5px);
  color: #fff;
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.socials a[data-net="github"]:hover   { box-shadow: 0 14px 30px -12px rgba(255, 255, 255, .5); }
.socials a[data-net="linkedin"]:hover { box-shadow: 0 14px 30px -12px #0a66c2; color: #4aa3ff; }
.socials a[data-net="leetcode"]:hover { box-shadow: 0 14px 30px -12px #ffa116; color: #ffa116; }
.socials a[data-net="instagram"]:hover{ box-shadow: 0 14px 30px -12px #e1306c; color: #f472b6; }
.socials a[data-net="mail"]:hover     { box-shadow: 0 14px 30px -12px var(--a2); color: var(--a2); }

/* Hero visual */
.hero-visual { position: relative; display: grid; place-items: center; }

.avatar-wrap {
  position: relative;
  width: min(360px, 82vw);
  aspect-ratio: 1;
  border-radius: 32px;
  padding: 3px;
  background: conic-gradient(from 0deg, var(--a2), var(--a1), var(--a3), var(--a4), var(--a2));
  animation: spinBorder 9s linear infinite;
  box-shadow: 0 40px 90px -40px rgba(99, 102, 241, .9);
}
@keyframes spinBorder { to { transform: rotate(360deg); } }

.avatar-wrap .avatar-inner {
  width: 100%; height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--bg-soft);
  animation: spinBorderRev 9s linear infinite;
}
@keyframes spinBorderRev { to { transform: rotate(-360deg); } }

.avatar-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
  transition: transform .8s var(--ease);
}
.avatar-wrap:hover .avatar-inner img { transform: scale(1.06); }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: rgba(12, 14, 22, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 3;
}
.float-card small { display: block; font-weight: 500; color: var(--text-faint); font-size: .72rem; }
.float-card .fc-icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
}
.float-card .fc-icon svg { width: 15px; height: 15px; color: var(--a2); }
.float-card img { width: 24px; height: 24px; object-fit: contain; }

.fc-1 { top: 6%;  left: -8%;  animation: float1 6s ease-in-out infinite; }
.fc-2 { bottom: 16%; right: -10%; animation: float2 7.5s ease-in-out infinite; }
.fc-3 { bottom: -3%; left: 4%; animation: float1 8.5s ease-in-out infinite reverse; }

@keyframes float1 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes float2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(16px); } }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.scroll-cue .mouse {
  width: 24px; height: 38px;
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  position: relative;
}
.scroll-cue .mouse::after {
  content: '';
  position: absolute;
  top: 7px; left: 50%;
  width: 3px; height: 7px;
  border-radius: 99px;
  background: var(--a2);
  transform: translateX(-50%);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0% { opacity: 0; transform: translate(-50%, 0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 13px); }
}

/* ---------- Marquee ---------- */
.marquee-band {
  position: relative;
  padding: 26px 0;
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, .022);
  overflow: hidden;
}
.marquee {
  display: flex;
  width: max-content;
  animation: scrollX 34s linear infinite;
}
.marquee-band:hover .marquee { animation-play-state: paused; }
.marquee-track { display: flex; align-items: center; gap: 54px; padding-right: 54px; }
.marquee-item {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--ff-mono);
  font-size: .88rem;
  color: var(--text-faint);
  transition: color .3s ease, filter .3s ease;
}
.marquee-item img {
  width: 30px; height: 30px;
  object-fit: contain;
  filter: grayscale(1) opacity(.55);
  transition: filter .35s ease, transform .35s var(--ease);
}
.marquee-item:hover { color: var(--text); }
.marquee-item:hover img { filter: grayscale(0) opacity(1); transform: translateY(-3px) scale(1.14); }
@keyframes scrollX { to { transform: translateX(-50%); } }

.marquee-band::before,
.marquee-band::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 130px;
  z-index: 2;
  pointer-events: none;
}
.marquee-band::before { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.marquee-band::after  { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }

/* ---------- Glass card base ---------- */
.glass {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .08), transparent 42%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.glass:hover::before { opacity: 1; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 52px;
  align-items: center;
}

.about-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.about-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; transition: transform .9s var(--ease); }
.about-photo:hover img { transform: scale(1.05); }
.about-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 6, 10, .82));
}
.about-photo .photo-tag {
  position: absolute;
  left: 20px; bottom: 20px;
  z-index: 2;
  font-family: var(--ff-mono);
  font-size: .8rem;
  color: var(--text-dim);
}
.about-photo .photo-tag b { display: block; font-family: var(--ff-display); color: #fff; font-size: 1.05rem; }

.about-copy p { color: var(--text-dim); margin-bottom: 16px; }
.about-copy strong { color: var(--text); font-weight: 600; }
.about-copy .hl {
  background: linear-gradient(180deg, transparent 62%, rgba(99, 102, 241, .38) 0);
  color: var(--text);
  font-weight: 600;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 30px 0;
}
.stat {
  padding: 20px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  transition: transform .35s var(--ease), border-color .3s ease, background .3s ease;
}
.stat:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-2); }
.stat .num {
  font-family: var(--ff-display);
  font-size: 1.85rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.stat .lbl { font-size: .76rem; color: var(--text-faint); letter-spacing: .04em; text-transform: uppercase; margin-top: 4px; }

.info-list { display: grid; gap: 10px; margin-bottom: 28px; }
.info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .92rem;
  color: var(--text-dim);
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .022);
  transition: border-color .3s ease, transform .3s var(--ease);
}
.info-list li:hover { border-color: var(--border-strong); transform: translateX(5px); }
.info-list li b { color: var(--text); font-weight: 600; min-width: 96px; display: inline-block; }
.info-list li svg { width: 17px; height: 17px; color: var(--a2); flex: none; margin-top: 3px; }

/* ---------- Skills ---------- */
.skill-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}
.skill-tab {
  padding: 9px 20px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all .3s var(--ease);
}
.skill-tab:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-2px); }
.skill-tab.active {
  color: #06070c;
  background: var(--grad);
  border-color: transparent;
  box-shadow: 0 12px 28px -14px rgba(99, 102, 241, .95);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}
.skill-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  text-align: center;
  transition: transform .4s var(--ease), border-color .3s ease, box-shadow .3s ease, background .3s ease;
  animation: chipIn .45s var(--ease) backwards;
}
@keyframes chipIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.skill-chip:hover {
  transform: translateY(-7px);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--glow);
}
.skill-chip img {
  width: 44px; height: 44px;
  object-fit: contain;
  filter: grayscale(.5) opacity(.85);
  transition: filter .35s ease, transform .4s var(--ease);
}
.skill-chip:hover img { filter: none; transform: scale(1.12) rotate(-6deg); }
.skill-chip span { font-size: .84rem; font-weight: 500; color: var(--text-dim); }
.skill-chip:hover span { color: var(--text); }
.skill-chip .fallback {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad-soft);
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--a2);
}

/* ---------- What I do ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 20px;
}
.feature-card {
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  transition: transform .45s var(--ease), border-color .3s ease, box-shadow .3s ease;
}
.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}
.feature-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 15px;
  margin-bottom: 20px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  transition: transform .45s var(--ease);
}
.feature-card:hover .feature-icon { transform: rotate(-8deg) scale(1.08); }
.feature-icon svg { width: 24px; height: 24px; color: var(--a2); }
.feature-card h3 { font-family: var(--ff-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.feature-card p { color: var(--text-dim); font-size: .93rem; }
.feature-card .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.feature-card .tags span {
  font-family: var(--ff-mono);
  font-size: .7rem;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-faint);
}

/* ---------- Timeline ---------- */
.tl-switch {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin: 0 auto 46px;
  backdrop-filter: blur(12px);
}
.tl-switch button {
  padding: 9px 24px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: var(--text-dim);
  font-size: .87rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .3s var(--ease);
}
.tl-switch button.active { background: var(--grad); color: #06070c; font-weight: 600; }
.switch-wrap { display: flex; justify-content: center; }

.timeline { position: relative; padding-left: 42px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 13px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--a2), var(--a1) 40%, var(--a3) 75%, transparent);
  border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 26px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -35px; top: 30px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--a2);
  box-shadow: 0 0 0 5px rgba(34, 211, 238, .14);
  transition: box-shadow .35s ease, background .35s ease, transform .35s var(--ease);
}
.tl-item:hover::before { background: var(--a2); box-shadow: 0 0 0 8px rgba(34, 211, 238, .2); transform: scale(1.15); }

.tl-card {
  padding: 26px;
  border-radius: var(--radius);
  transition: transform .4s var(--ease), border-color .3s ease, box-shadow .3s ease;
}
.tl-card:hover { transform: translateX(7px); border-color: var(--border-strong); box-shadow: var(--glow); }

.tl-top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.tl-logo {
  width: 52px; height: 52px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: #fff;
  padding: 7px;
  overflow: hidden;
}
.tl-logo img { width: 100%; height: 100%; object-fit: contain; }
.tl-role { font-family: var(--ff-display); font-size: 1.16rem; font-weight: 600; line-height: 1.3; }
.tl-org { color: var(--a2); font-size: .92rem; font-weight: 500; }
.tl-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-family: var(--ff-mono);
  font-size: .76rem;
  color: var(--text-faint);
  margin-top: 6px;
}
.tl-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tl-meta svg { width: 13px; height: 13px; }
.tl-badge {
  margin-left: auto;
  font-family: var(--ff-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 99px;
  color: var(--a5);
  border: 1px solid rgba(52, 211, 153, .35);
  background: rgba(52, 211, 153, .09);
  white-space: nowrap;
}
.tl-points { display: grid; gap: 9px; margin-top: 14px; }
.tl-points li {
  position: relative;
  padding-left: 18px;
  font-size: .92rem;
  color: var(--text-dim);
}
.tl-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad);
}
.tl-points li b { color: var(--text); font-weight: 600; }
.tl-stack { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tl-stack span {
  font-family: var(--ff-mono);
  font-size: .7rem;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  color: var(--text-faint);
}
.tl-gpa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--ff-mono);
  font-size: .78rem;
  color: var(--a3);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid rgba(168, 85, 247, .3);
  background: rgba(168, 85, 247, .08);
}

.pane { display: none; }
.pane.active { display: block; animation: paneIn .5s var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.project-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius-lg);
  transition: transform .45s var(--ease), border-color .3s ease, box-shadow .3s ease;
  transform-style: preserve-3d;
}
.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 30px 70px -30px rgba(99, 102, 241, .75);
}
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.pc-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .93);
  padding: 9px;
  transition: transform .45s var(--ease);
}
.project-card:hover .pc-icon { transform: rotate(-8deg) scale(1.08); }
.pc-icon img { width: 100%; height: 100%; object-fit: contain; }
.pc-link {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all .35s var(--ease);
}
.pc-link svg { width: 17px; height: 17px; }
.pc-link:hover { color: #06070c; background: var(--grad); border-color: transparent; transform: rotate(45deg); }
.project-card h3 { font-family: var(--ff-display); font-size: 1.24rem; font-weight: 600; margin-bottom: 9px; }
.project-card p { color: var(--text-dim); font-size: .93rem; flex: 1; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.pc-tags span {
  font-family: var(--ff-mono);
  font-size: .7rem;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--a2);
  background: rgba(34, 211, 238, .06);
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.gal-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--bg-soft);
}
.gal-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), filter .5s ease;
  filter: saturate(.85) brightness(.9);
}
.gal-item:hover img { transform: scale(1.09); filter: saturate(1.1) brightness(1); }
.gal-item .gal-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(5, 6, 10, .1), rgba(5, 6, 10, .78));
  opacity: 0;
  transition: opacity .4s ease;
}
.gal-item:hover .gal-overlay { opacity: 1; }
.gal-overlay .eye {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
  transform: scale(.75);
  transition: transform .45s var(--ease);
}
.gal-item:hover .eye { transform: scale(1); }
.gal-overlay .eye svg { width: 21px; height: 21px; color: #fff; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(3, 4, 8, .93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 84vh;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95);
  transform: scale(.94);
  transition: transform .4s var(--ease);
}
.lightbox.open img { transform: scale(1); }
.lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  transition: all .3s var(--ease);
}
.lb-btn:hover { background: var(--grad); color: #06070c; border-color: transparent; transform: scale(1.08); }
.lb-btn svg { width: 19px; height: 19px; }
.lb-close { top: 26px; right: 26px; }
.lb-prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 26px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.08); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 24px;
}
.contact-panel { padding: 34px; border-radius: var(--radius-lg); }
.contact-panel h3 { font-family: var(--ff-display); font-size: 1.42rem; font-weight: 600; margin-bottom: 8px; }
.contact-panel > p { color: var(--text-dim); font-size: .94rem; margin-bottom: 24px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .022);
  margin-bottom: 12px;
  transition: transform .35s var(--ease), border-color .3s ease, background .3s ease;
}
.contact-item:hover { transform: translateX(6px); border-color: var(--border-strong); background: var(--surface-2); }
.ci-icon {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
}
.ci-icon svg { width: 18px; height: 18px; color: var(--a2); }
.ci-text small { display: block; font-size: .74rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .09em; }
.ci-text span { font-size: .95rem; font-weight: 500; word-break: break-word; }
.copy-btn {
  margin-left: auto;
  flex: none;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: .74rem;
  font-family: var(--ff-mono);
  cursor: pointer;
  transition: all .3s ease;
}
.copy-btn:hover { color: var(--a2); border-color: var(--a2); }
.copy-btn.done { color: var(--a5); border-color: var(--a5); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; margin-bottom: 14px; }
.field input,
.field textarea {
  width: 100%;
  padding: 15px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .028);
  font-size: .93rem;
  outline: none;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
  resize: vertical;
}
.field textarea { min-height: 132px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field input:focus,
.field textarea:focus {
  border-color: var(--a1);
  background: rgba(255, 255, 255, .045);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .16);
}
.field.invalid input,
.field.invalid textarea { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .13); }
.field .err { display: none; font-size: .76rem; color: #f87171; margin-top: 6px; }
.field.invalid .err { display: block; }

.form-note {
  font-size: .82rem;
  color: var(--text-faint);
  margin-top: 14px;
  text-align: center;
}
.form-status {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: .87rem;
  display: none;
  border: 1px solid rgba(52, 211, 153, .3);
  background: rgba(52, 211, 153, .09);
  color: var(--a5);
}
.form-status.show { display: block; animation: paneIn .4s var(--ease); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 46px 0 34px;
  background: rgba(255, 255, 255, .015);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.footer p { font-size: .86rem; color: var(--text-faint); }
.footer .socials a { width: 40px; height: 40px; border-radius: 12px; }
.footer .socials a svg { width: 17px; height: 17px; }
.footer .heart { color: var(--a4); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(12, 14, 22, .84);
  backdrop-filter: blur(14px);
  color: var(--text);
  cursor: pointer;
  z-index: 800;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all .4s var(--ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--grad); color: #06070c; border-color: transparent; transform: translateY(-4px); }
.to-top svg { width: 19px; height: 19px; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-38px); }
[data-reveal="right"] { transform: translateX(38px); }
[data-reveal="scale"] { transform: scale(.94); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 54px; text-align: center; }
  .hero-visual { order: -1; }
  .hero-bio { margin-inline: auto; }
  .hero-actions, .socials, .hero-hi { justify-content: center; }
  .status-pill { margin-inline: auto; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-width: 400px; margin-inline: auto; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .section { padding: 84px 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .fc-1 { left: -2%; }
  .fc-2 { right: -2%; }
}

@media (max-width: 620px) {
  .container { padding-inline: 18px; }
  .section { padding: 70px 0; }
  .section-head { margin-bottom: 44px; }
  .stats-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .pc-icon { width: 46px; height: 46px; }
  .contact-panel { padding: 24px; }
  .timeline { padding-left: 30px; }
  .timeline::before { left: 7px; }
  .tl-item::before { left: -29px; }
  .tl-card { padding: 20px; }
  .tl-badge { margin-left: 0; }
  .float-card { font-size: .72rem; padding: 9px 12px; }
  .fc-3 { display: none; }
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
  .lb-close { top: 14px; right: 14px; }
  .footer-inner { justify-content: center; text-align: center; }
  .mobile-menu a { font-size: 1.55rem; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
