/* ============================================================
   MANAN JP — DARK PREMIUM DESIGN SYSTEM
   Teal + Gold on near-black. AI Lab aesthetic.
   ============================================================ */
:root {
  /* -- surface -- */
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;

  /* -- text -- */
  --text: #e5e5e5;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;

  /* -- accent -- */
  --teal: #4ecdc4;
  --teal-dim: rgba(78, 205, 196, 0.15);
  --teal-glow: rgba(78, 205, 196, 0.08);
  --gold: #c9a96e;
  --gold-dim: rgba(201, 169, 110, 0.15);

  /* -- border -- */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(78, 205, 196, 0.3);

  /* -- type -- */
  --f-display: 'Space Grotesk', -apple-system, sans-serif;
  --f-body: 'Inter', -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', monospace;

  /* -- motion -- */
  --ease: cubic-bezier(0.22, 0.68, 0.29, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

@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;
    scroll-behavior: auto !important;
  }
}

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

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

img {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a:focus-visible,
button:focus-visible,
.filter-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- SKIP LINK ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: var(--bg);
  padding: 0.8rem 1.2rem;
  z-index: 999;
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 500;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- SECTION LABELS ---------- */
.section-label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.section-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.4rem;
  color: var(--text);
}

.section-title em {
  font-style: normal;
  color: var(--teal);
  font-weight: 400;
}

section {
  padding: 7rem 0;
  position: relative;
}

section.tight {
  padding: 5rem 0;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- GSAP ANIMATION HELPERS ---------- */
[data-parallax] {
  will-change: transform;
}

.parallax-layer {
  will-change: transform;
}

/* Magnetic button wrapper */
.magnetic {
  position: relative;
  will-change: transform;
}

.btn-primary.magnetic,
.btn-ghost.magnetic {
  display: inline-flex;
  align-items: center;
  /* Let GSAP animate transform; CSS transitions only handle visual props */
  transition-property: background, color, border-color, box-shadow;
}

/* Grain overlay for cinematic texture */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.2rem;
  transition: opacity 0.6s var(--ease-soft), visibility 0.6s;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pre-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.pre-monogram {
  font-family: var(--f-display);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text);
  opacity: 0;
  animation: preFade 0.8s var(--ease) 0.1s forwards;
}

.pre-line {
  width: 40px;
  height: 1px;
  background: var(--teal);
  opacity: 0;
  animation: preLine 0.6s var(--ease) 0.4s forwards;
}

@keyframes preFade {
  to {
    opacity: 1;
  }
}

@keyframes preLine {
  from {
    opacity: 0;
    width: 0;
  }

  to {
    opacity: 1;
    width: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pre-monogram,
  .pre-line {
    animation: none;
    opacity: 1;
  }
}

/* ============================================================
   CURSOR
   ============================================================ */
#cursor-dot,
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1500;
  transform: translate(-50%, -50%);
}

#cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

#cursor-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(78, 205, 196, 0.4);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s;
}

#cursor-ring.cursor-hover {
  width: 56px;
  height: 56px;
  border-color: rgba(78, 205, 196, 0.6);
  background: rgba(78, 205, 196, 0.04);
}

@media (hover: none),
(pointer: coarse) {
  #cursor-dot,
  #cursor-ring {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cursor-dot,
  #cursor-ring {
    display: none;
  }
}

/* ============================================================
   NAV
   ============================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.5rem;
  background: transparent;
  transition: background 0.4s var(--ease-soft), padding 0.4s var(--ease-soft),
    border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-family: var(--f-display);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--text);
}

.nav-logo span {
  color: var(--teal);
  font-weight: 400;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ecdc4;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.4);
  }

  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 6px rgba(78, 205, 196, 0);
  }
}

.status-text {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--f-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  position: relative;
  padding: 0.2rem 0;
  transition: color 0.25s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--teal);
  transition: right 0.3s var(--ease);
}

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

.nav-links a:hover::after {
  right: 0;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-icon-link {
  color: var(--text-muted);
  transition: color 0.25s;
  display: flex;
  align-items: center;
}

.nav-icon-link:hover {
  color: var(--teal);
}

.nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  width: 0%;
  z-index: 901;
}

@media (max-width: 760px) {
  #nav {
    padding: 1.2rem 1.3rem;
  }

  #nav.scrolled {
    padding: 1rem 1.3rem;
  }

  .nav-links,
  .nav-status {
    display: none;
  }
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.15), transparent 70%);
  top: 10%;
  right: 10%;
  animation: orbFloat1 12s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.1), transparent 70%);
  bottom: 15%;
  left: 5%;
  animation: orbFloat2 15s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(-30px, 20px);
  }

  66% {
    transform: translate(20px, -15px);
  }
}

@keyframes orbFloat2 {
  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(25px, -20px);
  }

  66% {
    transform: translate(-15px, 25px);
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.8rem;
}

.hero-name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.6rem;
  color: var(--text);
}

.name-line {
  display: block;
}

.name-line.italic {
  font-style: italic;
  color: var(--teal);
  font-weight: 400;
}

.hero-tagline {
  font-family: var(--f-body);
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 0 2.4rem;
  line-height: 1.7;
}

.hero-tagline em {
  font-style: normal;
  color: var(--teal);
  font-weight: 400;
}

.typewriter-cursor {
  color: var(--teal);
  animation: blink 1s step-end infinite;
  font-weight: 300;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.6rem;
}

.btn-primary,
.btn-ghost {
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.8rem;
  border-radius: 4px;
  transition: all 0.3s var(--ease-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--teal);
  color: var(--bg);
}

.btn-primary:hover {
  background: #6eddd5;
  box-shadow: 0 8px 30px -8px rgba(78, 205, 196, 0.4);
}

.btn-ghost {
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: opacity 0.4s;
  z-index: 3;
}

.hero-scroll span {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(var(--teal), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.about-body {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 1.2rem;
  max-width: 56ch;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat-n {
  font-family: var(--f-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-l {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.skills-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.skill-group {
  margin-bottom: 1.6rem;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.7rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-tags span {
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  transition: all 0.25s;
}

.skill-tags span:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-dim);
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.timeline {
  margin-top: 2.5rem;
  border-left: 1px solid var(--border);
  padding-left: 2.5rem;
  position: relative;
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.56rem;
  top: 0.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--teal);
  transition: background 0.3s;
}

.timeline-item:hover .timeline-dot {
  background: var(--teal);
}

.timeline-date {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.role-title {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0;
  color: var(--text);
}

.company-name {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--teal);
}

.role-desc {
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 60ch;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.role-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.role-skills span {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.btn-cert {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--f-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.btn-cert:hover {
  opacity: 0.65;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 2.5rem;
}

.filter-btn {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  transition: all 0.25s;
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.filter-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--bg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

@media (max-width: 980px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(800px) rotateX(0) rotateY(0);
  transition: transform 0.2s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(78, 205, 196, 0.06),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
  pointer-events: none;
}

.project-card:hover::after {
  opacity: 1;
}

.project-card.hidden {
  display: none;
}

.project-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.6);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--teal-dim);
  border: 1px solid var(--border-accent);
  color: var(--teal);
  flex-shrink: 0;
}

.card-tag {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-title {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 0.6rem;
  color: var(--text);
}

.card-desc {
  font-family: var(--f-body);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.4rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.card-lang {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.card-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-live {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--teal);
  border-bottom: 1px solid rgba(78, 205, 196, 0.3);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}

.btn-live:hover {
  opacity: 0.65;
}

.btn-gh {
  color: var(--text-muted);
  transition: color 0.2s;
}

.btn-gh:hover {
  color: var(--text);
}

/* ============================================================
   GITHUB STATS
   ============================================================ */
.stats-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 2rem;
}

@media (max-width: 840px) {
  .stats-band {
    grid-template-columns: 1fr;
  }
}

.stats-item {
  min-width: 0; /* prevent grid blowout */
}

.stats-item h3 {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 1rem;
}

.gh-stat-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.stats-contrib {
  margin-top: 1.5rem;
}

.gh-contrib-img {
  width: 100%;
  height: auto;
}

/* ============================================================
   BLOG
   ============================================================ */
.blog-intro {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 52ch;
  margin: 0 0 2.5rem;
  line-height: 1.7;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

@media (max-width: 760px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.3s, transform 0.3s var(--ease-soft);
  position: relative;
}

.blog-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.blog-card-inner {
  display: flex;
  flex-direction: column;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.blog-date,
.blog-read {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.blog-date {
  color: var(--gold);
}

.blog-platform {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.blog-title {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.7rem;
  color: var(--text);
  line-height: 1.35;
}

.blog-excerpt {
  font-family: var(--f-body);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1.2rem;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-tags span {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
}

.blog-arrow {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.2rem;
  color: var(--text-muted);
  transition: color 0.25s;
}

.blog-card:hover .blog-arrow {
  color: var(--teal);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.contact-sub {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 52ch;
  margin: 0 0 2rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--f-body);
  font-size: 0.82rem;
  font-weight: 400;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  transition: all 0.3s var(--ease-soft);
}

.contact-pill:hover {
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
  background: var(--teal-dim);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group--hidden {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-label {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input {
  font-family: var(--f-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--teal);
  border: none;
  border-radius: 6px;
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s var(--ease-soft);
  align-self: flex-start;
}

.btn-submit:hover {
  background: #6eddd5;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(78, 205, 196, 0.35);
}

.btn-submit-text {
  pointer-events: none;
}

.btn-submit-arrow {
  transition: transform 0.3s var(--ease);
}

.btn-submit:hover .btn-submit-arrow {
  transform: translateX(3px);
}

.btn-submit-check {
  display: none;
}

.btn-submit.sent .btn-submit-text {
  display: none;
}

.btn-submit.sent .btn-submit-arrow {
  display: none;
}

.btn-submit.sent .btn-submit-check {
  display: block;
}

.form-status {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--teal);
  min-height: 1.2em;
}

.form-status.error {
  color: #e2716c;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg);
  color: var(--text-muted);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-mono {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 1.2rem;
}

.footer-link {
  color: var(--text-muted);
  transition: color 0.25s;
}

.footer-link:hover {
  color: var(--teal);
}

@media (max-width: 640px) {
  section {
    padding: 5rem 0;
  }

  .container {
    padding: 0 1.3rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
