/* =============================================================
   KIM.DEV PORTFOLIO — Shadcn-Inspired Design System
   Dark mode default + light mode toggle
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  /* shadcn palette — DARK (default) */
  --background: hsl(240 10% 3.9%);
  --foreground: hsl(0 0% 98%);
  --card: hsl(240 10% 3.9%);
  --card-foreground: hsl(0 0% 98%);
  --popover: hsl(240 10% 3.9%);
  --popover-foreground: hsl(0 0% 98%);
  --primary: hsl(0 0% 98%);
  --primary-foreground: hsl(240 5.9% 10%);
  --secondary: hsl(240 3.7% 15.9%);
  --secondary-foreground: hsl(0 0% 98%);
  --muted: hsl(240 3.7% 15.9%);
  --muted-foreground: hsl(240 5% 64.9%);
  --accent: hsl(240 3.7% 15.9%);
  --accent-foreground: hsl(0 0% 98%);
  --border: hsl(240 3.7% 15.9%);
  --input: hsl(240 3.7% 15.9%);
  --ring: hsl(0 0% 83.1%);

  /* Brand accent — blue-violet */
  --brand: hsl(217 91% 60%);
  --brand-dim: hsl(217 91% 60% / 0.15);
  --brand-glow: hsl(217 91% 60% / 0.35);

  /* Typography */
  --radius: 0.5rem;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Surfaces */
  --surface-1: hsl(240 6% 7%);
  --surface-2: hsl(240 5% 11%);
  --surface-3: hsl(240 4% 16%);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light mode overrides */
[data-theme="light"] {
  --background: hsl(0 0% 100%);
  --foreground: hsl(240 10% 3.9%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(240 10% 3.9%);
  --primary: hsl(240 5.9% 10%);
  --primary-foreground: hsl(0 0% 98%);
  --secondary: hsl(240 4.8% 95.9%);
  --secondary-foreground: hsl(240 5.9% 10%);
  --muted: hsl(240 4.8% 95.9%);
  --muted-foreground: hsl(240 3.8% 46.1%);
  --accent: hsl(240 4.8% 95.9%);
  --accent-foreground: hsl(240 5.9% 10%);
  --border: hsl(240 5.9% 90%);
  --input: hsl(240 5.9% 90%);
  --ring: hsl(240 5.9% 10%);
  --surface-1: hsl(0 0% 98%);
  --surface-2: hsl(240 4.8% 95.9%);
  --surface-3: hsl(240 5.9% 90%);
  --brand-dim: hsl(217 91% 60% / 0.1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

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

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

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

ul {
  list-style: none;
}

/* ─── Utilities ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand) 0%, hsl(190 80% 65%) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-primary {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

.btn-primary:hover {
  background: var(--muted-foreground);
  border-color: var(--muted-foreground);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px hsl(0 0% 0% / 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--secondary);
  border-color: var(--muted-foreground);
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 0.8em;
}

/* Tags / Badges */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.tag--sm {
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
}

/* ─── Header ─────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s;
}

.header.scrolled {
  background: hsl(from var(--background) h s l / 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 var(--border);
}

[data-theme="light"] .header.scrolled {
  background: hsl(0 0% 100% / 0.85);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-bracket {
  color: var(--brand);
  font-family: var(--font-mono);
}

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

.nav-link {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--foreground);
  background: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  color: var(--foreground);
  background: var(--muted);
}

.theme-icon {
  position: absolute;
  transition: transform 0.3s var(--ease), opacity 0.3s;
  font-size: 0.875rem;
}

/* Dark mode: show moon, hide sun */
[data-theme="dark"] .theme-icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-icon--sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-icon--moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

[data-theme="light"] .theme-icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: background 0.2s;
}

.mobile-menu-btn:hover {
  background: var(--muted);
}

.hamburger-line {
  display: block;
  height: 1.5px;
  background: var(--foreground);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.mobile-menu-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.mobile-menu-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-6px);
}

.mobile-menu-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s;
  z-index: 490;
  padding: 1rem 1.5rem 1.5rem;
}

.mobile-drawer.open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s, background 0.2s;
}

.mobile-nav-link:hover {
  color: var(--foreground);
  background: var(--muted);
}

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 100px 1.5rem 80px;
}

/* Ambient orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orbFloat 12s ease-in-out infinite;
}

.orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, hsl(217 91% 60% / 0.18) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, hsl(280 70% 60% / 0.12) 0%, transparent 70%);
  bottom: -100px;
  right: -50px;
  animation-delay: 4s;
}

.orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, hsl(190 80% 65% / 0.1) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  animation-delay: 8s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

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

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

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}

.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  width: 100%;
  max-width: 1200px;
  position: relative;
  z-index: 1;
}

/* Hero content (left) */
.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s var(--ease) 0.1s both;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px hsl(142 76% 56% / 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px hsl(142 76% 56% / 0.2);
  }

  50% {
    box-shadow: 0 0 0 6px hsl(142 76% 56% / 0.05);
  }
}

.hero-heading {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.6s var(--ease) 0.2s both;
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.6s var(--ease) 0.3s both;
}

.hero-desc strong {
  color: var(--foreground);
  font-weight: 600;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s var(--ease) 0.4s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s var(--ease) 0.5s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: fadeUp 0.6s var(--ease) 0.6s both;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--foreground);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
  flex-shrink: 0;
}

/* Hero visual (right) */
.hero-visual {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.7s var(--ease) 0.3s both;
}

.photo-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
}

.photo-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: ringRotate 20s linear infinite;
}

.photo-ring::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--brand);
}

.photo-ring--2 {
  inset: -20px;
  border-style: dashed;
  opacity: 0.4;
  animation-direction: reverse;
  animation-duration: 30s;
}

.photo-ring--2::before {
  display: none;
}

@keyframes ringRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.profile-photo {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 0 0 6px var(--surface-2), 0 20px 60px hsl(0 0% 0% / 0.5);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Floating code card */
.code-card {
  position: absolute;
  bottom: -20px;
  right: -80px;
  width: 230px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  box-shadow: 0 8px 32px hsl(0 0% 0% / 0.4);
  animation: floatCard 8s ease-in-out infinite;
  z-index: 2;
}

@keyframes floatCard {

  0%,
  100% {
    transform: translateY(0px) rotate(-1deg);
  }

  50% {
    transform: translateY(-10px) rotate(-1deg);
  }
}

.code-card-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot--red {
  background: #ff5f57;
}

.dot--yellow {
  background: #febc2e;
}

.dot--green {
  background: #28c840;
}

.code-card-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted-foreground);
  margin-left: auto;
}

.code-body {
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.7;
  color: var(--foreground);
  white-space: pre;
  overflow: hidden;
}

/* Code syntax colors */
.c-keyword {
  color: #c792ea;
}

.c-var {
  color: #82aaff;
}

.c-prop {
  color: #f78c6c;
}

.c-str {
  color: #c3e88d;
}

.c-comment {
  color: var(--muted-foreground);
  font-style: italic;
}

.c-bool {
  color: #ff9cac;
}

/* Light mode code colors */
[data-theme="light"] .c-keyword {
  color: #7c3aed;
}

[data-theme="light"] .c-var {
  color: #1d4ed8;
}

[data-theme="light"] .c-prop {
  color: #c2410c;
}

[data-theme="light"] .c-str {
  color: #15803d;
}

[data-theme="light"] .c-bool {
  color: #be185d;
}

/* Floating badges */
.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 16px hsl(0 0% 0% / 0.3);
  white-space: nowrap;
  z-index: 2;
}

.float-badge--tl {
  top: 20px;
  left: -60px;
  animation: floatCard 6s ease-in-out 1s infinite;
  color: #61dafb;
}

.float-badge--br {
  bottom: 60px;
  left: -80px;
  animation: floatCard 7s ease-in-out 2s infinite;
  color: #68a063;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
}

.scroll-wheel {
  width: 22px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 11px;
  position: relative;
}

.scroll-wheel::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background: var(--brand);
  border-radius: 2px;
  animation: scrollAnim 1.5s ease-in-out infinite;
}

@keyframes scrollAnim {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateX(-50%) translateY(14px);
    opacity: 0;
  }
}

/* ─── Section Shared ────────────────────────────────────────── */
.section {
  padding: 6rem 0;
}

.section--alt {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.section-sub {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
  font-size: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── About Section ─────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-text p {
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1.75;
}

.about-text strong {
  color: var(--foreground);
  font-weight: 600;
}

.about-text .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.about-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.info-card {
  padding: 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px hsl(0 0% 0% / 0.15);
}

.info-card-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.info-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.info-card p {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* ─── Skills Section ────────────────────────────────────────── */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.5rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  width: 120px;
  transition: all 0.25s var(--ease);
  cursor: default;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-dim), 0 12px 24px hsl(0 0% 0% / 0.15);
}

.skill-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--brand);
  transition: transform 0.2s;
}

.skill-card:hover .skill-icon {
  transform: scale(1.15);
}

.skill-icon--text {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-sans);
}

.skill-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.skill-card:hover .skill-name {
  color: var(--foreground);
}

/* ─── Projects Section ─────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  transition: all 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: hsl(240 4% 30%);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px hsl(0 0% 0% / 0.3);
}

/* Project media */
.project-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-3);
}

.project-thumb,
.project-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}

.project-thumb {
  opacity: 1;
  transform: scale(1);
}

.project-video {
  opacity: 0;
}

.project-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsl(0 0% 0% / 0.55) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.overlay-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: hsl(0 0% 0% / 0.5);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.project-card:hover .project-thumb {
  opacity: 0;
  transform: scale(1.04);
}

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

.project-card:hover .project-media-overlay {
  opacity: 1;
}

/* Project body */
.project-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.project-status--live {
  background: hsl(142 76% 36% / 0.15);
  color: hsl(142 76% 56%);
  border: 1px solid hsl(142 76% 36% / 0.3);
}

.project-status--live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: hsl(142 76% 56%);
}

.project-status--wip {
  background: hsl(38 92% 50% / 0.12);
  color: hsl(38 92% 65%);
  border: 1px solid hsl(38 92% 50% / 0.25);
}

.project-status--wip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: hsl(38 92% 65%);
}

.project-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.65;
  margin: 0;
}

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

.project-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

.project-link:hover {
  color: var(--foreground);
}

.project-link--primary {
  color: var(--brand);
  margin-left: auto;
}

.project-link--primary:hover {
  color: hsl(217 91% 75%);
}

/* ─── Contact Section ───────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  transition: border-color 0.2s, transform 0.2s;
}

.contact-channel:hover {
  border-color: var(--brand);
  transform: translateX(4px);
}

.contact-channel-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-dim);
  color: var(--brand);
  border-radius: var(--radius);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-channel-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.contact-channel-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
  transition: color 0.2s;
}

.contact-channel-value:hover {
  color: var(--brand);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  background: var(--background);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted-foreground);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsl(from var(--ring) h s l / 0.15);
}

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

#formStatus {
  min-height: 2rem;
  font-size: 0.875rem;
}

.success-message,
.error-message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
}

.success-message {
  background: hsl(142 76% 36% / 0.1);
  color: hsl(142 76% 56%);
  border: 1px solid hsl(142 76% 36% / 0.25);
}

.error-message {
  background: hsl(0 84% 60% / 0.1);
  color: hsl(0 84% 70%);
  border: 1px solid hsl(0 84% 60% / 0.25);
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.95rem;
  transition: all 0.2s;
}

.social-btn:hover {
  color: var(--foreground);
  background: var(--muted);
  border-color: var(--muted-foreground);
  transform: translateY(-2px);
}

/* ─── Scroll reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

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

/* ─── Keyframes ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Media Queries ────────────────────────────────────────── */

/* ≤ 1024px */
@media (max-width: 1024px) {
  .hero-layout {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
    padding-top: 2rem;
  }

  .hero-content {
    max-width: 680px;
  }

  .hero-badge {
    margin: 0 auto 1.5rem;
  }

  .hero-tags,
  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .photo-wrapper {
    width: 280px;
    height: 280px;
  }

  .profile-photo {
    width: 280px;
    height: 280px;
  }

  .code-card {
    display: none;
  }

  .float-badge {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-text .btn {
    margin: 0 auto;
  }

  .about-card-grid {
    max-width: 480px;
    margin: 0 auto;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ≤ 768px */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .btn-sm.btn:not(.mobile-menu-btn) {
    display: none;
  }

  .hero {
    padding: 90px 1.5rem 60px;
  }

  .hero-heading {
    font-size: 2.25rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .stat-num {
    font-size: 1.25rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .scroll-indicator {
    display: none;
  }

  .about-card-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }
}

/* ≤ 480px */
@media (max-width: 480px) {
  .hero-heading {
    font-size: 1.875rem;
  }

  .hero-desc {
    font-size: 0.9375rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 4rem 0;
  }

  .about-card-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    gap: 0.75rem;
  }

  .skill-card {
    width: 100px;
  }
}