/* ============================================
   BERK SOFTWARE — Design System v2.0
   "Minimal Luxury" — Premium Dark Theme
   ============================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Background */
  --bg-primary: #06070a;
  --bg-secondary: #0c0f16;
  --bg-surface: rgba(255,255,255,0.025);
  --bg-surface-hover: rgba(255,255,255,0.05);
  --bg-card: linear-gradient(145deg, rgba(14,18,28,0.85) 0%, rgba(8,11,18,0.95) 100%);
  --bg-nav: rgba(6,7,10,0.82);

  /* Borders */
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(79,156,247,0.35);
  --border-subtle: rgba(255,255,255,0.03);

  /* Text */
  --text-primary: #f0f6fc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #8b949e;
  --text-link: #4f9cf7;

  /* Accent colours */
  --accent: #4f9cf7;
  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-teal: #14b8a6;
  --accent-red: #ef4444;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #4f9cf7, #a855f7);
  --gradient-text: linear-gradient(135deg, #4f9cf7 0%, #a855f7 50%, #ec4899 100%);
  --gradient-glow: linear-gradient(135deg, rgba(79,156,247,0.15), rgba(168,85,247,0.15));
  --gradient-border: linear-gradient(135deg, rgba(79,156,247,0.4), rgba(168,85,247,0.4));

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(79,156,247,0.12);
  --shadow-card-hover: 0 20px 50px -12px rgba(79,156,247,0.2), 0 0 0 1px rgba(79,156,247,0.1);

  /* Typography */
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur: 300ms;
  --dur-slow: 500ms;

  /* Layout */
  --max-w: 1200px;
  --nav-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }

/* ---------- Selection & Scrollbar ---------- */
::selection { background: rgba(79,156,247,0.25); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gradient-primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #6bb3ff, #c084fc); }

/* ---------- Focus ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
p { color: var(--text-secondary); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Gradient Text ---------- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nav--scrolled {
  background: rgba(6,7,10,0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.nav__brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(79,156,247,0.2);
  transition: border-color var(--dur) var(--ease);
}
.nav__brand:hover img { border-color: rgba(79,156,247,0.5); }
.nav__brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav__links a {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav__links a:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}
.nav__links a[aria-current="page"] {
  color: var(--accent);
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav__toggle:hover { color: var(--text-primary); background: var(--bg-surface); }
.nav__toggle svg { width: 22px; height: 22px; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(6,7,10,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 99;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.mobile-drawer--open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer a {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.mobile-drawer a:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
  overflow: hidden;
}

/* Animated gradient orbs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.hero::before {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(79,156,247,0.18), transparent 70%);
  top: -250px;
  right: -150px;
  animation: hero-orb-1 25s ease-in-out infinite;
}
.hero::after {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(168,85,247,0.15), transparent 70%);
  bottom: -200px;
  left: -100px;
  animation: hero-orb-2 20s ease-in-out infinite;
}
.hero__ambient {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,0.1), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(100px);
  pointer-events: none;
  animation: hero-orb-3 18s ease-in-out infinite;
}

@keyframes hero-orb-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -60px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.95); }
}
@keyframes hero-orb-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 40px) scale(1.05); }
  66% { transform: translate(30px, -30px) scale(0.9); }
}
@keyframes hero-orb-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.3); }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero__logo-wrap {
  display: inline-block;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79,156,247,0.3), rgba(168,85,247,0.3));
  margin-bottom: 2rem;
  animation: fade-up 0.8s var(--ease) both;
}
.hero__logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid var(--bg-primary);
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  animation: fade-up 0.8s var(--ease) 0.1s both;
}
.hero__kicker::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero__title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  animation: fade-up 0.8s var(--ease) 0.2s both;
}
.hero__subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-weight: 400;
  animation: fade-up 0.8s var(--ease) 0.3s both;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  animation: fade-up 0.8s var(--ease) 0.4s both;
}
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fade-up 0.8s var(--ease) 0.6s both;
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(240,246,252,0.15);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(240,246,252,0.25);
}
.btn--primary:active { transform: translateY(0); }

.btn--secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
}

.btn--accent {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(79,156,247,0.25);
}
.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79,156,247,0.35);
}

.btn--sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.85rem;
}
.btn--color {
  color: #fff;
  border: none;
}
.btn--outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn--outline:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
  background: var(--bg-surface);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 4rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.section__header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  white-space: nowrap;
}
.section__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}
.section__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

/* Divider between sections */
.divider {
  height: 1px;
  max-width: var(--max-w);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ============================================
   STATS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}
.stat-card:hover::before { opacity: 1; }
.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
}
.stat-card__number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}
.stat-card__label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-card { padding: 1.25rem 1rem; }
  .stat-card__number { font-size: 1.5rem; }
}

/* ============================================
   CARDS — Glass
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
  z-index: 0;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}
.card:hover::before { opacity: 1; }
.card__body { padding: 1.5rem; position: relative; z-index: 1; }

/* ============================================
   SKILL CARDS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}
.skill-card:hover::before { opacity: 1; }
.skill-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
.skill-card__icon svg {
  width: 26px;
  height: 26px;
}
.skill-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.skill-card__desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

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

/* ============================================
   PROJECT CARDS
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--dur) var(--ease);
  position: relative;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
  z-index: 0;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}
.project-card:hover::before { opacity: 1; }

/* Featured (first/big) project */
.project-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.project-card--featured .project-card__banner { height: auto; min-height: 320px; }
.project-card--featured .project-card__body { display: flex; flex-direction: column; justify-content: center; }

.project-card__banner {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}
.project-card__banner img {
  max-height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
  transition: transform var(--dur-slow) var(--ease);
}
.project-card:hover .project-card__banner img {
  transform: scale(1.06);
}
.project-card__body {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.project-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.project-card__desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.project-card__actions {
  display: flex;
  gap: 0.75rem;
}
.project-card__actions .btn {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-lg);
}

@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card--featured { grid-template-columns: 1fr; }
  .project-card--featured .project-card__banner { min-height: 220px; }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* ============================================
   TAGS
   ============================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  border: 1px solid;
  white-space: nowrap;
}
.tag--blue { color: var(--accent); background: rgba(79,156,247,0.08); border-color: rgba(79,156,247,0.2); }
.tag--purple { color: var(--accent-purple); background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.2); }
.tag--emerald { color: var(--accent-emerald); background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); }
.tag--amber { color: var(--accent-amber); background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2); }
.tag--pink { color: var(--accent-pink); background: rgba(236,72,153,0.08); border-color: rgba(236,72,153,0.2); }
.tag--cyan { color: var(--accent-cyan); background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.2); }
.tag--indigo { color: var(--accent-indigo); background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.2); }
.tag--teal { color: var(--accent-teal); background: rgba(20,184,166,0.08); border-color: rgba(20,184,166,0.2); }
.tag--red { color: var(--accent-red); background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); }

/* ============================================
   CONTACT FORM
   ============================================ */
.contact {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.contact__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.contact__card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(79,156,247,0.08), transparent 70%);
  pointer-events: none;
}
.contact__card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168,85,247,0.06), transparent 70%);
  pointer-events: none;
}
.contact__header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.contact__header h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.contact__header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.form { position: relative; z-index: 1; }
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form__group {
  margin-bottom: 1.25rem;
}
.form__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  margin-left: 0.25rem;
}
.form__input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  outline: none;
}
.form__input::placeholder { color: var(--text-tertiary); }
.form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,156,247,0.1);
}
textarea.form__input { resize: none; min-height: 120px; }

.form__submit {
  width: 100%;
  padding: 1rem;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  box-shadow: 0 4px 20px rgba(79,156,247,0.2);
}
.form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79,156,247,0.3);
}
.form__submit:active { transform: translateY(0); }

.form__message {
  text-align: center;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  margin-top: 1rem;
}
.form__message--success { color: var(--accent-emerald); background: rgba(16,185,129,0.08); }
.form__message--error { color: var(--accent-red); background: rgba(239,68,68,0.08); }

@media (max-width: 640px) {
  .form__row { grid-template-columns: 1fr; }
  .contact__card { padding: 1.5rem; }
}

/* ============================================
   BLOG CARDS
   ============================================ */
.blog-grid { display: grid; gap: 1rem; }
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 2rem;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
}
.blog-card:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(79,156,247,0.2);
  transform: translateY(-2px);
}
.blog-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.blog-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color var(--dur-fast);
}
.blog-card:hover .blog-card__title { color: var(--accent); }
.blog-card__date {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.03);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  flex-shrink: 0;
}
.blog-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: gap var(--dur) var(--ease);
}
.blog-card:hover .blog-card__link { gap: 0.75rem; }
.blog-card__link svg { width: 16px; height: 16px; color: var(--accent); }

@media (max-width: 640px) {
  .blog-card { padding: 1.25rem; }
  .blog-card__header { flex-direction: column; gap: 0.5rem; }
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.pagination__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}
.pagination__btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
  background: var(--bg-surface);
}
.pagination__btn:disabled { opacity: 0.3; cursor: default; }
.pagination__btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pagination__btn--active:hover { background: var(--accent); color: #fff; }
.pagination__btn svg { width: 18px; height: 18px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 1.5rem 2rem;
  margin-top: 2rem;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.footer__brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.footer__brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.footer__desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
.footer__heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}
.footer__link {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  transition: color var(--dur-fast);
}
.footer__link:hover { color: var(--accent); }
.footer__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--dur) var(--ease);
}
.footer__social a:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(79,156,247,0.08);
  transform: translateY(-2px);
}
.footer__social a svg { width: 18px; height: 18px; }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.footer__copy { font-size: 0.8rem; color: var(--text-tertiary); }
.footer__policies {
  display: flex;
  gap: 1.25rem;
  font-size: 0.8rem;
}
.footer__policies a { color: var(--text-tertiary); transition: color var(--dur-fast); }
.footer__policies a:hover { color: var(--text-secondary); }

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* ============================================
   WHATSAPP FLOAT
   ============================================ */
.whatsapp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(37,211,102,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: all var(--dur) var(--ease);
  text-decoration: none;
}
.whatsapp:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: rgba(37,211,102,0.5);
  box-shadow: 0 12px 32px rgba(37,211,102,0.2);
}
.whatsapp svg { width: 24px; height: 24px; fill: #25d366; transition: fill var(--dur); }
.whatsapp:hover svg { fill: #fff; }
.whatsapp__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,0.4);
  animation: wa-pulse 2.5s ease-out infinite;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 89;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all var(--dur) var(--ease);
}
.back-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-top:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.back-top svg { width: 18px; height: 18px; }

/* ============================================
   BLOG MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay--open { display: flex; }
.modal-overlay__bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}
.modal__title { font-size: 1.5rem; }
.modal__date { font-size: 0.8rem; color: var(--accent); font-weight: 500; margin-top: 0.25rem; }
.modal__close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast);
  flex-shrink: 0;
}
.modal__close:hover { color: var(--text-primary); background: var(--bg-surface-hover); }
.modal__close svg { width: 18px; height: 18px; }
.modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

/* Prose typography for blog content */
.prose { max-width: 72ch; color: var(--text-secondary); line-height: 1.8; font-size: 1rem; }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 1rem; }
.prose h3 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
.prose p { margin-bottom: 1rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: #6bb3ff; }
.prose strong { color: var(--text-primary); }
.prose ul, .prose ol { margin: 1rem 0; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose code {
  background: rgba(255,255,255,0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}
.prose pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.prose pre code { background: none; padding: 0; font-size: 0.85rem; }

/* ============================================
   FILTER BAR (projects page)
   ============================================ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--dur) var(--ease);
}
.filter-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}
.filter-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.filter-btn--active:hover {
  background: #6bb3ff;
  border-color: #6bb3ff;
  color: #fff;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal--active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 400ms; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}
.empty-state__icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state__text { color: var(--text-secondary); font-weight: 500; }

/* ============================================
   SKIP LINK (Accessibility)
   ============================================ */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 999;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--dur-fast);
}
.skip-link:focus { top: 0; }

/* ============================================
   PROGRESS BAR (blog pages)
   ============================================ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 101;
  transition: width 50ms linear;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .section { padding: 2rem 1rem; }
  .section__header { gap: 1rem; margin-bottom: 2rem; }
  .hero { padding: calc(var(--nav-h) + 1rem) 1rem 3rem; min-height: 90vh; }
  .hero__title { margin-bottom: 1rem; }
  .hero__subtitle { margin-bottom: 2rem; }
  .hero__actions { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .hero__scroll { display: none; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .nav, .whatsapp, .back-top, .hero::before, .hero::after, .hero__ambient { display: none; }
  body { background: #fff; color: #000; }
  * { box-shadow: none !important; }
}
