/* ============================================
   Portfolio — General (shared on every page)
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Inter:wght@300;400;500;600&display=swap");

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

:root {
  /* Colors */
  --bg: #0a0a0f;
  --bg-elev: #12121a;
  --bg-card: #16161f;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.07);

  --text: #eaeaf0;
  --text-muted: #8a8a9a;
  --text-dim: #5a5a6a;

  --accent: #00d4aa;
  --accent-dim: #00a88a;
  --accent-glow: rgba(0, 212, 170, 0.35);
  --accent-2: #ff6b9d;
  --accent-3: #5b9bff;

  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(255, 255, 255, 0.16);

  /* Typography */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Spacing */
  --space: 8px;
  --radius: 16px;
  --radius-sm: 10px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);

  --nav-h: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ---------- Aurora background ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  width: 75vw;
  height: 75vw;
  border-radius: 50%;
  opacity: 0.22;
  will-change: transform;
  animation: aurora-float 20s var(--ease-in-out) infinite alternate;
}
.aurora::before {
  background: radial-gradient(closest-side, var(--accent), transparent);
  top: -28%;
  left: -17%;
}
.aurora::after {
  background: radial-gradient(closest-side, var(--accent-2), transparent);
  bottom: -33%;
  right: -17%;
  animation-delay: -10s;
}

@keyframes aurora-float {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(8vw, 6vh) scale(1.15);
  }
  100% {
    transform: translate(-5vw, 4vh) scale(0.9);
  }
}

/* ---------- Grid noise overlay ---------- */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    black 0%,
    transparent 70%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    black 0%,
    transparent 70%
  );
  opacity: 0.4;
}

/* ---------- Custom cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  transform: translate(-50%, -50%);
  transition:
    width 0.2s,
    height 0.2s;
}
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition:
    width 0.3s var(--spring),
    height 0.3s var(--spring),
    border-color 0.3s;
}
.cursor-ring.hover {
  width: 56px;
  height: 56px;
  border-color: var(--accent);
}

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.6s var(--ease-out),
    visibility 0.6s;
}
.loader.done {
  opacity: 0;
  visibility: hidden;
}
.loader-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  overflow: hidden;
}
.loader-text span {
  display: inline-block;
  animation: loader-rise 0.6s var(--ease-out) forwards;
  opacity: 0;
  transform: translateY(20px);
}
@keyframes loader-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.loader-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Layout ---------- */
.page-wrapper {
  position: relative;
  z-index: 2;
}

section {
  padding: 120px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 60px;
}

/* ---------- Page header (inner pages) ---------- */
.page-header {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 40px;
}
.page-header .container {
  text-align: left;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition:
    background 0.4s var(--ease-out),
    border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--bg);
  font-weight: 700;
  transition: transform 0.4s var(--spring);
}
.logo:hover .logo-mark {
  transform: rotate(90deg) scale(1.1);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color 0.3s;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Higher specificity than ".nav-links a" so these actually apply */
.nav-links a.nav-cta {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 100px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s;
}
.nav-links a.nav-cta::after {
  display: none;
}
.nav-links a.nav-cta:hover {
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.3s var(--ease-out),
    opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary > * {
  position: relative;
  z-index: 1;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 212, 170, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ---------- Stagger text ---------- */
.split-line {
  overflow: hidden;
  display: block;
}
.split-word {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.7s var(--ease-out);
}
.split-word.in {
  transform: translateY(0);
}

/* ---------- Hero (index) ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  padding-bottom: 60px;
  position: relative;
}
.hero .container {
  position: relative;
  z-index: 3;
  width: 100%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  opacity: 0;
  animation: fade-down 0.8s var(--ease-out) 0.8s forwards;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 0.95;
  margin-bottom: 28px;
}
.hero h1 .split-line {
  line-height: 0.95;
}
.hero h1 .accent-text {
  background: linear-gradient(135deg, var(--accent) 10%, var(--accent-3) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
  position: relative;
}
.hero h1 .accent-text .split-word {
  background: linear-gradient(135deg, var(--accent) 10%, var(--accent-3) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent);
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 1.2s forwards;
}
/* fade-up is also used by .form-success in contact.css */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 1.4s forwards;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 80px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 1.6s forwards;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}
.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-bright);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 2s forwards;
}
.scroll-indicator .wheel {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  40% {
    transform: translateY(12px);
    opacity: 0;
  }
  60% {
    transform: translateY(0);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  white-space: nowrap;
  background: var(--bg-elev);
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marquee-scroll 25s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 48px;
}
.marquee-track span::after {
  content: "✦";
  color: var(--accent);
  font-size: 1rem;
}
@keyframes marquee-scroll {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Project cards ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  /* Only the cards react to the pointer, not the gaps between them */
  pointer-events: none;
}

/*
  All card motion goes through three variables (--ty, --ry, --s), so the
  transform has the exact same shape in every state. That lets the browser
  interpolate it smoothly instead of jumping between different transform lists.
  ".project-card.reveal" is listed so this also wins over ".reveal.in".
*/
.project-card,
.project-card.reveal {
  --ty: 0px;
  --ry: 0deg;
  --s: 1;
  transform: perspective(1000px) translate3d(0, var(--ty), 0) rotateY(var(--ry))
    scale(var(--s));
}
.project-card.reveal:not(.in) {
  --ty: 40px; /* scroll-reveal start position */
}

.project-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
  border: 1px solid var(--border);
  background: var(--bg-card);
  /* Removes jagged edges while a card is rotated in 3D */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /*
    The 0.12s delay is only used on the way back to rest. It lets the pointer
    cross the gap between two cards without everything snapping back and forth.
  */
  transition:
    transform 0.7s var(--ease-soft) 0.12s,
    opacity 0.8s var(--ease-out),
    border-color 0.4s ease 0.12s,
    box-shadow 0.5s ease 0.12s;

  /*
    Optional mirror reflection (Chrome / Edge / Safari). It is expensive to
    render and was the main cause of the stutter, so it is off by default.
    -webkit-box-reflect: below 6px
      linear-gradient(transparent 75%, rgba(0, 0, 0, 0.18));
  */
}

/* Hovered card: lifts and grows slightly */
.projects-grid .project-card:hover {
  --ty: -10px;
  --s: 1.03;
  z-index: 5;
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(139, 92, 246, 0.2);
  transition-delay: 0s;
}

/* Dark veil used to dim the other cards (cheaper than a CSS filter) */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(6, 6, 14, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease 0.12s;
}

/* Glass sheen that sweeps across the card on hover (transform only, so it stays smooth) */
.project-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 60%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 100%
  );
  transform: translateX(-140%) skewX(-18deg);
}
.project-card:hover::after {
  transform: translateX(270%) skewX(-18deg);
  transition: transform 1s var(--ease-soft);
}

/* Gallery-style neighbour reaction (mouse / trackpad devices only) */
@media (hover: hover) and (pointer: fine) {
  /* Cards before the hovered one tilt one way and dim */
  .projects-grid:hover > .project-card:not(:hover) {
    --ry: 18deg;
    --s: 0.95;
    transition-delay: 0s;
  }
  /* Cards after the hovered one tilt the other way (must stay after the rule above) */
  .projects-grid > .project-card:hover ~ .project-card {
    --ry: -18deg;
  }
  .projects-grid:hover > .project-card:not(:hover)::before {
    opacity: 1;
    transition-delay: 0s;
  }
}

/* Full-bleed media (default placeholder, or a real <img>) */
.project-thumb {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, var(--accent-glow), transparent 55%),
    radial-gradient(
      circle at 80% 85%,
      rgba(124, 124, 255, 0.25),
      transparent 55%
    ),
    linear-gradient(135deg, #1a1a2e, #16213e);
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-soft);
}
.project-thumb .emoji {
  font-size: 5rem;
  display: grid;
  place-items: center;
  height: 100%;
  transition: transform 0.6s var(--ease-out);
}
.project-card:hover .project-thumb .emoji,
.project-card:hover .project-thumb img {
  transform: scale(1.08);
}

/* Title: small glass chip, always visible */
.project-title-chip {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.3s;
}
.project-card:hover .project-title-chip {
  opacity: 0;
}

/* Glass overlay: hidden until hover */
.project-body {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 22px;
  border-radius: calc(var(--radius) - 4px);
  /* mirror-glass highlight over a dark tint: stays readable over light images */
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.02) 45%
    ),
    rgba(10, 10, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px) saturate(140%) brightness(0.7);
  -webkit-backdrop-filter: blur(22px) saturate(140%) brightness(0.7);
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.5s var(--ease-out);
}
.project-card:hover .project-body {
  opacity: 1;
  transform: translateY(0);
}

.project-body h3 {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
}

.project-body p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  margin-bottom: 20px;
}

/* Tags: translucent glassy purple (same hues as the Live Demo button) */
.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.project-tags span {
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 100px;
  color: #ede9fe;
  background: linear-gradient(
    135deg,
    rgba(196, 181, 253, 0.25),
    rgba(139, 92, 246, 0.2)
  );
  border: 1px solid rgba(196, 181, 253, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Project links */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 6px;
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s,
    border-color 0.3s,
    color 0.3s,
    background 0.3s;
}
.project-links a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: currentColor;
}

/* Live Demo: light purple gradient */
.project-links .link-live {
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  color: #fff;
  font-weight: 600;
  border: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.project-links .link-live:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
}

/* GitHub: transparent rectangle */
.project-links .link-repo {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.project-links .link-repo:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

/* Touch devices have no hover, so keep the glass panel visible */
@media (hover: none) {
  .project-body {
    opacity: 1;
    transform: none;
  }
  .project-title-chip {
    display: none;
  }
}

/* ---------- Tilt card (3D hover effect) ---------- */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ---------- Big number stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition:
    transform 0.4s var(--spring),
    border-color 0.3s;
}
.stat-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}
.stat-card .num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  position: relative;
  z-index: 2;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.3s;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 32px;
    gap: 20px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.4s var(--ease-out),
      opacity 0.4s;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav-toggle {
    display: flex;
  }

  .hero-stats {
    gap: 28px;
    flex-wrap: wrap;
  }
  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}
