/* ══════════════════════════════════════════════
   PORTFOLIO — Đỗ Hoàng Công Minh
   Modern / Clean / Creative
   ══════════════════════════════════════════════ */

/* ── DESIGN TOKENS ───────────────────────────── */
:root {
  /* Colors — Dark Mode (default) */
  --bg: #0a0a0f;
  --bg-2: #0f0f1a;
  --bg-3: #141428;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-glow: rgba(99,102,241,0.4);
  --text: #f0f0ff;
  --text-muted: #9090b0;
  --text-dim: #5a5a7a;

  /* Brand */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-glow: rgba(99,102,241,0.25);
  --accent: #06b6d4;
  --accent-glow: rgba(6,182,212,0.2);
  --success: #10b981;
  --warning: #f59e0b;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --grad-accent: linear-gradient(135deg, #06b6d4, #3b82f6);
  --grad-text: linear-gradient(135deg, #a5b4fc, #67e8f9);
  --grad-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --section-gap: 120px;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.3s;
}

[data-theme="light"] {
  --bg: #f8f8fc;
  --bg-2: #ffffff;
  --bg-3: #f0f0f8;
  --surface: rgba(0,0,0,0.03);
  --surface-hover: rgba(0,0,0,0.06);
  --border: rgba(0,0,0,0.08);
  --border-glow: rgba(99,102,241,0.3);
  --text: #0f0f1a;
  --text-muted: #6b6b8a;
  --text-dim: #aaaacc;
  --primary-glow: rgba(99,102,241,0.12);
  --accent-glow: rgba(6,182,212,0.12);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

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

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

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

/* ── SCROLLBAR ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; }

/* ── CANVAS BG ───────────────────────────────── */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ── CURSOR ──────────────────────────────────── */
.cursor, .cursor-follower {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.15s var(--ease), opacity 0.3s;
}
.cursor {
  width: 10px; height: 10px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.cursor-follower {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.5);
  transform: translate(-50%,-50%);
  transition: transform 0.35s var(--ease), width 0.3s, height 0.3s, opacity 0.3s;
}
.cursor.hovered { transform: translate(-50%,-50%) scale(2); }
.cursor-follower.hovered { width: 20px; height: 20px; opacity: 0.5; }
@media (pointer: coarse) { .cursor, .cursor-follower { display: none; } }

/* ── LAYOUT HELPERS ──────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── NAVBAR ──────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.4s, box-shadow 0.4s, border-color 0.4s;
}
.navbar.scrolled {
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}
[data-theme="light"] .navbar.scrolled {
  background: rgba(248,248,252,0.85);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.05em;
}
.logo-bracket { color: var(--primary); }
.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface);
}
.nav-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: background var(--dur), border-color var(--dur), transform var(--dur);
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover { background: var(--surface-hover); transform: rotate(20deg); }
.theme-icon { position: absolute; transition: opacity 0.3s, transform 0.3s; }
.theme-icon.sun { opacity: 0; transform: translateY(-10px) rotate(90deg); }
.theme-icon.moon { opacity: 1; transform: translateY(0) rotate(0deg); }
[data-theme="light"] .theme-icon.sun { opacity: 1; transform: translateY(0) rotate(0deg); }
[data-theme="light"] .theme-icon.moon { opacity: 0; transform: translateY(10px) rotate(-90deg); }

.lang-toggle {
  height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
}
.lang-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 10px;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  z-index: 99;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.mobile-link {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--dur);
}
.mobile-link:hover { color: var(--text); background: var(--surface); }

/* ── HERO ────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 24px 80px;
  max-width: 1140px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  gap: 60px;
}

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.hero-content { flex: 1; max-width: 600px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border-glow);
  border-radius: 99px;
  background: var(--primary-glow);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 28px;
  letter-spacing: 0.03em;
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.name-highlight {
  display: inline-block;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}
.name-highlight::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--grad-hero);
  border-radius: 99px;
  opacity: 0.5;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 20px;
  min-height: 2rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.typing-cursor {
  animation: blink 1s infinite;
  color: var(--primary);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 24px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,102,241,0.4);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--primary); color: var(--primary); }
.full-width { width: 100%; justify-content: center; }

.hero-socials { display: flex; align-items: center; gap: 12px; }
.social-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  transition: all var(--dur) var(--ease);
}
.social-icon svg { width: 20px; height: 20px; }
.social-icon:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual { display: flex; align-items: center; justify-content: center; }

.code-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  width: 360px;
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.5s var(--ease);
}
.code-card:hover { transform: perspective(1000px) rotateY(0deg) translateY(-4px); }
[data-theme="light"] .code-card {
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,0.1);
}
.code-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .code-card-header { background: #f5f5fa; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-filename { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); margin-left: 8px; }
.code-content {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  white-space: pre;
  background: transparent;
}
.c-purple { color: #c084fc; }
.c-yellow { color: #fbbf24; }
.c-blue { color: #60a5fa; }
.c-green { color: #4ade80; }
.c-orange { color: #fb923c; }
.c-white { color: #e2e8f0; }

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  font-size: 0.75rem;
  color: var(--text-muted);
  animation: bounce 2s infinite;
}
.scroll-mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 99px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 3px; height: 8px;
  background: var(--text-muted);
  border-radius: 99px;
  animation: scrollWheel 2s infinite;
}
@keyframes scrollWheel { 0%{transform:translateY(0);opacity:1} 100%{transform:translateY(10px);opacity:0} }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-6px)} }

/* ── SECTIONS ────────────────────────────────── */
.section {
  padding: var(--section-gap) 0;
  position: relative;
  z-index: 1;
}
.section-alt { background: var(--bg-2); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 500;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ── ABOUT ───────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}
@media (min-width: 768px) { .about-grid { grid-template-columns: 1.2fr 1fr; } }

.about-text p {
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 20px;
  font-size: 1.05rem;
}
.about-text strong { color: var(--text); font-weight: 600; }

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Avatar Card */
.about-card-wrap { display: flex; justify-content: center; }
.about-avatar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 300px;
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.about-avatar-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--grad-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.about-avatar-card:hover { border-color: var(--border-glow); box-shadow: 0 0 32px var(--primary-glow); }

.avatar-ring {
  width: 108px; height: 108px;
  border-radius: 50%;
  padding: 3px;
  background: var(--grad-primary);
  animation: spinBorder 6s linear infinite;
}
@keyframes spinBorder {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.avatar-initials { background: var(--bg-2); border-radius: 50%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.avatar-info h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.avatar-info p { color: var(--text-muted); font-size: 0.9rem; }
.avatar-location {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.8rem; color: var(--text-dim); margin-top: 6px;
}

.availability-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 99px;
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 500;
}
.availability-badge .badge-dot { background: var(--success); }

/* ── SKILLS ──────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  animation-delay: var(--delay, 0s);
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur);
}
.skill-category:hover {
  border-color: var(--border-glow);
  box-shadow: 0 8px 32px var(--primary-glow);
  transform: translateY(-4px);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.skill-cat-header h3 { font-size: 1.1rem; font-weight: 700; }
.skill-cat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.skill-cat-icon.frontend { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.skill-cat-icon.backend { background: rgba(6,182,212,0.15); color: var(--accent); }
.skill-cat-icon.devops { background: rgba(245,158,11,0.15); color: var(--warning); }

.skill-tags { display: flex; flex-direction: column; gap: 10px; }
.skill-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: default;
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .skill-tag { background: #fff; }
.skill-tag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--dur);
}
.skill-tag:hover { border-color: var(--primary); color: var(--primary-light); }
.skill-tag:hover::before { opacity: 0.05; }
.skill-tag img { position: relative; z-index: 1; }
.skill-tag span { position: relative; z-index: 1; }

/* ── EXPERIENCE / TIMELINE ───────────────────── */
.timeline { max-width: 760px; margin: 0 auto; }
.timeline-item { display: flex; gap: 28px; }
.timeline-marker { display: flex; flex-direction: column; align-items: center; }
.timeline-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  transition: all var(--dur);
  position: relative;
}
.timeline-dot.active {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow), 0 0 16px var(--primary-glow);
}
.timeline-dot.active::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0.4;
  animation: ping 1.5s ease-in-out infinite;
}
@keyframes ping { 0%{transform:scale(1);opacity:0.4} 100%{transform:scale(1.8);opacity:0} }
.timeline-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(to bottom, var(--primary), transparent);
  min-height: 40px;
  margin-top: 4px;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  flex: 1;
  margin-bottom: 40px;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.timeline-card:hover { border-color: var(--border-glow); box-shadow: 0 8px 32px var(--primary-glow); }

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.job-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.company-name {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.9rem; color: var(--text-muted); font-weight: 500;
}
.job-period { text-align: right; }
.period-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16,185,129,0.15);
  color: var(--success);
  margin-bottom: 4px;
}
.period-date { font-size: 0.82rem; color: var(--text-dim); display: block; }

.job-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tech-pill {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--primary-glow);
  border: 1px solid var(--border-glow);
  color: var(--primary-light);
}
.job-duties { padding-left: 16px; color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; }
.job-duties li { margin-bottom: 6px; }

/* ── PROJECTS ────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
  animation-delay: var(--delay, 0s);
}
.project-card:hover { border-color: var(--border-glow); transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 32px var(--primary-glow); }
.project-card.featured {
  border-color: var(--border-glow);
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(6,182,212,0.04) 100%);
}
.project-card.coming-soon { opacity: 0.65; }
.project-card.coming-soon:hover { opacity: 0.85; box-shadow: none; border-color: var(--border); }

.project-card-inner { padding: 28px; height: 100%; display: flex; flex-direction: column; }

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.project-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-glow);
  border: 1px solid var(--border-glow);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-light);
}
.project-icon.muted { background: var(--surface); border-color: var(--border); color: var(--text-dim); }
.project-links { display: flex; gap: 8px; }
.project-link-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--dur);
}
.project-link-btn:hover { background: var(--primary-glow); border-color: var(--primary); color: var(--primary-light); }

.featured-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(6,182,212,0.2));
  border: 1px solid var(--border-glow);
  color: var(--primary-light);
  margin-bottom: 12px;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.project-title.muted { color: var(--text-dim); }
.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}
.project-desc.muted { color: var(--text-dim); }

.project-tech-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tech-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.tech-badge.python { background: rgba(59,130,246,0.12); color: #60a5fa; }
.tech-badge.fastapi { background: rgba(16,185,129,0.12); color: #34d399; }
.tech-badge.vue { background: rgba(52,211,153,0.12); color: #4ade80; }
.tech-badge.docker { background: rgba(6,182,212,0.12); color: #22d3ee; }

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-light);
  transition: gap var(--dur), color var(--dur);
  margin-top: auto;
}
.project-cta:hover { gap: 10px; color: var(--primary); }
.project-cta.muted { color: var(--text-muted); }
.project-cta.muted:hover { color: var(--text); }

/* ── CONTACT ─────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: start;
}
@media (min-width: 768px) { .contact-layout { grid-template-columns: 1fr 1fr; } }

.contact-text > p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 32px;
}
.contact-cards { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--dur) var(--ease);
}
.contact-card:hover { border-color: var(--border-glow); background: var(--surface-hover); transform: translateX(4px); }
.contact-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-card-icon.email { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.contact-card-icon.facebook { background: rgba(59,130,246,0.15); color: #60a5fa; }
.contact-card-icon.github { background: rgba(255,255,255,0.08); color: var(--text); }
.contact-card-label { display: block; font-size: 0.78rem; color: var(--text-dim); font-weight: 500; }
.contact-card-value { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text); }

/* Contact Form */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-form h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--dur), box-shadow var(--dur);
  outline: none;
  resize: vertical;
}
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea { background: #fff; }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-note { font-size: 0.78rem; color: var(--text-dim); margin-top: 12px; text-align: center; }

/* ── FOOTER ──────────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}
.footer-copy { font-size: 0.85rem; color: var(--text-muted); }
.footer-socials { display: flex; gap: 8px; }
.footer-socials a {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  transition: all var(--dur);
}
.footer-socials a:hover { background: var(--primary-glow); border-color: var(--primary); color: var(--primary-light); }

/* ── TOAST ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 22px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s var(--ease);
  pointer-events: none;
  max-width: 300px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(16,185,129,0.4); color: var(--success); }
.toast.error { border-color: rgba(239,68,68,0.4); color: #f87171; }

/* ── REVEAL ANIMATIONS ───────────────────────── */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

.reveal-up.visible, .reveal-left.visible, .reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-gap: 80px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 100px 24px 60px; }
  .hero-visual { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 24px; }
  .contact-form-wrap { padding: 24px; }
  .scroll-indicator { display: none; }
  .code-card { width: 100%; max-width: 340px; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; }
  .timeline-card-header { flex-direction: column; }
  .job-period { text-align: left; }
}
