/* ================================================================
   Sourabh Saini Portfolio — Main CSS
   Ported from Next.js globals.css + all component styles
   ================================================================ */

/* ── CSS Custom Properties (Dark Theme Default) ──────────────── */
:root {
  --background: 0 0% 4%;
  --foreground: 0 0% 100%;
  --card: 0 0% 8%;
  --card-foreground: 0 0% 100%;
  --popover: 0 0% 8%;
  --popover-foreground: 0 0% 100%;
  --primary: 187 94% 43%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 11%;
  --secondary-foreground: 0 0% 100%;
  --muted: 0 0% 15%;
  --muted-foreground: 240 5% 65%;
  --accent: 263 70% 66%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 0 0% 20%;
  --input: 0 0% 15%;
  --ring: 187 94% 43%;
  --radius: 0.625rem;

  --cyan:      #06b6d4;
  --cyan-dark: #0891b2;
  --cyan-light:#22d3ee;
  --purple:    #8b5cf6;
  --blue:      #3b82f6;

  --dark:           #0a0a0a;
  --dark-secondary: #111111;
  --dark-tertiary:  #1a1a1a;
  --dark-card:      #141414;

  --font-inter: 'Inter', system-ui, sans-serif;
}

/* ── Light Theme Overrides ────────────────────────────────────── */
[data-theme="light"] {
  --background: 210 40% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222 47% 11%;

  --dark:           #f8fafc;
  --dark-secondary: #f1f5f9;
  --dark-tertiary:  #e2e8f0;
  --dark-card:      #ffffff;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: hsl(var(--border));
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-inter);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* Skip link */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 9999; padding: 0.5rem 1rem; background: var(--cyan); color: #fff; border-radius: 0.5rem; font-weight: 600; width: auto; height: auto; clip: auto; }

/* ── Layout Utilities ─────────────────────────────────────────── */
.container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px)  { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

/* ── Design Utilities ─────────────────────────────────────────── */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
}

.bg-gradient-dark {
  background: linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}
[data-theme="light"] .bg-gradient-dark {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.glass {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .glass {
  background: rgba(248, 250, 252, 0.88);
  border-color: rgba(15, 23, 42, 0.08);
}

.glass-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(6, 182, 212, 0.2);
}
[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.glow-cyan      { box-shadow: 0 0 30px rgba(6, 182, 212, 0.3); }
.glow-cyan-strong { box-shadow: 0 0 60px rgba(6, 182, 212, 0.5); }
.border-glow    { border-color: rgba(6, 182, 212, 0.5); }

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15);
}

.hover-glow {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
  border-color: rgba(6, 182, 212, 0.5);
}

/* ── Keyframe Animations ──────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-15px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.3); }
  50%       { box-shadow: 0 0 40px rgba(6, 182, 212, 0.6); }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes bounce-x {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(5px); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes border-shimmer {
  0%   { border-color: rgba(6, 182, 212, 0.2); }
  50%  { border-color: rgba(6, 182, 212, 0.5); }
  100% { border-color: rgba(6, 182, 212, 0.2); }
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-up {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Animation classes */
.animate-float        { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow   { animation: pulse-glow 3s ease-in-out infinite; }
.animate-gradient     { background-size: 200% 200%; animation: gradient-shift 8s ease infinite; }
.animate-shimmer      { background: linear-gradient(90deg,transparent,rgba(6,182,212,.1),transparent); background-size:200% 100%; animation: shimmer 3s infinite; }
.animate-rotate-slow  { animation: rotate-slow 60s linear infinite; }
.animate-bounce-x     { animation: bounce-x 1.5s ease-in-out infinite; }
.animate-fade-in-up   { animation: fade-in-up 0.6s ease-out; }
.animate-scale-in     { animation: scale-in 0.5s ease-out; }
.animate-page-in      { animation: page-in 0.25s ease; }
.animate-toast-up     { animation: toast-up 0.25s ease; }
.animate-border-shimmer { animation: border-shimmer 4s ease-in-out infinite; }

/* Animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* ── Scroll Reveal ────────────────────────────────────────────── */
.reveal       { opacity: 0; transform: translateY(30px);   transition: all 0.6s cubic-bezier(0.16,1,0.3,1); }
.reveal-left  { opacity: 0; transform: translateX(-50px);  transition: all 0.6s cubic-bezier(0.16,1,0.3,1); }
.reveal-right { opacity: 0; transform: translateX(50px);   transition: all 0.6s cubic-bezier(0.16,1,0.3,1); }
.reveal-scale { opacity: 0; transform: scale(0.9);         transition: all 0.5s cubic-bezier(0.16,1,0.3,1); }

.reveal.visible       { opacity: 1; transform: translateY(0); }
.reveal-left.visible  { opacity: 1; transform: translateX(0); }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Exclude animation elements from blanket transition */
.animate-float, .animate-pulse-glow, .animate-gradient,
.animate-shimmer, .animate-rotate-slow, .animate-bounce-x,
.animate-fade-in-up, .animate-scale-in, .animate-page-in,
.animate-border-shimmer, .reveal, .reveal-left, .reveal-right, .reveal-scale,
.hover-lift, .hover-glow {
  transition: none;
}

/* Global smooth color transitions */
* { transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }
[data-theme="light"] ::-webkit-scrollbar-track { background: #e2e8f0; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #94a3b8; }

::selection { background: rgba(6,182,212,.3); color: #fff; }
[data-theme="light"] ::selection { background: rgba(6,182,212,.2); color: #0f172a; }

/* Scrollbar dark util */
.scrollbar-dark { scrollbar-width: thin; scrollbar-color: rgba(6,182,212,.4) transparent; }
.scrollbar-dark::-webkit-scrollbar { width: 4px; }
.scrollbar-dark::-webkit-scrollbar-track { background: transparent; }
.scrollbar-dark::-webkit-scrollbar-thumb { background: rgba(6,182,212,.4); border-radius: 99px; }
.scrollbar-dark::-webkit-scrollbar-thumb:hover { background: rgba(6,182,212,.75); }

/* ── Navigation ───────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
}

.nav-inner {
  transition: all 0.3s ease;
}

.nav-inner.scrolled,
body.is-blog-page .nav-inner {
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
[data-theme="light"] .nav-inner.scrolled,
[data-theme="light"] body.is-blog-page .nav-inner {
  background: rgba(248,250,252,0.95);
  border-bottom-color: rgba(15,23,42,0.08);
}

.nav-container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
  transition: height 0.3s ease;
}

.nav-inner.scrolled .nav-container,
body.is-blog-page .nav-container {
  height: 4rem;
}

@media (min-width: 640px)  { .nav-container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .nav-container { padding-inline: 2rem; } }

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  transition: color 0.3s;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) { .nav-desktop { display: flex; } }

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

.nav-links li a,
.nav-links li button {
  position: relative;
  font-size: 0.875rem;
  color: #d1d5db;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.3s;
}

.nav-links li a:hover,
.nav-links li button:hover { color: var(--cyan); }

body.is-blog-page .nav-links li a.current-menu-item,
body.is-blog-page .nav-links .current-menu-item > a { color: var(--cyan); }

.nav-underline {
  position: absolute;
  bottom: -4px; left: 0;
  height: 2px;
  background: var(--cyan);
  width: 0;
  transition: width 0.3s ease;
}
.nav-links li a:hover .nav-underline,
.nav-links li a.current-menu-item .nav-underline { width: 100%; }

/* Theme Toggle */
.theme-toggle {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0.5rem;
  color: #d1d5db;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--cyan); border-color: rgba(6,182,212,0.5); }

/* Show correct icon based on theme */
[data-theme="dark"]  .theme-icon--light { display: none; }
[data-theme="light"] .theme-icon--dark  { display: none; }

/* Theme Overlay (wipe animation) */
#theme-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  background: #0a0a0a;
  transition: clip-path 0.36s cubic-bezier(0.4,0,0.2,1);
}
[data-theme="light"] #theme-overlay { background: #f8fafc; }
#theme-overlay.wiping { pointer-events: all; }

/* Mobile Nav */
.nav-mobile-controls { display: flex; align-items: center; gap: 0.25rem; }
@media (min-width: 768px) { .nav-mobile-controls { display: none; } }

.hamburger {
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: #d1d5db;
  transition: color 0.3s;
}
.hamburger:hover { color: var(--cyan); }
.hamburger-icon--close { display: none; }
body.menu-open .hamburger-icon--open  { display: none; }
body.menu-open .hamburger-icon--close { display: block; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
[data-theme="light"] .mobile-menu-backdrop {
  background: rgba(248,250,252,0.98);
}

.mobile-menu-content {
  position: absolute;
  top: 5rem; left: 0; right: 0;
  padding: 1.5rem;
  transform: translateY(-40px);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
}
.mobile-menu.open .mobile-menu-content {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-nav-links li a {
  display: block;
  font-size: 1.125rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #d1d5db;
  transition: color 0.2s;
}
[data-theme="light"] .mobile-nav-links li a { border-bottom-color: rgba(15,23,42,0.08); color: #334155; }
.mobile-nav-links li a:hover { color: var(--cyan); }

/* ── Back to Top ──────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 40;
  width: 2.75rem; height: 2.75rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--cyan);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(6,182,212,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover   { background: var(--cyan-dark); }

/* ── Hero Section ─────────────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.8;
}

.hero-grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(6,182,212,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,182,212,.1) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding: 5rem 1rem;
}
@media (min-width: 640px)  { .hero-content { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .hero-content { padding-inline: 2rem; } }

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1fr 1fr; } }

.hero-left { text-align: center; }
@media (min-width: 1024px) { .hero-left { text-align: left; } }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.3);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s, transform 0.7s;
}
.hero-badge.loaded { opacity: 1; transform: translateY(0); }

.hero-badge-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse-glow 3s ease-in-out infinite;
}

.hero-badge-text { font-size: 0.875rem; color: var(--cyan); font-weight: 500; }

.hero-h1 { margin-bottom: 1rem; line-height: 1.1; }
.hero-name {
  display: block;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  color: hsl(var(--foreground));
}
.hero-title {
  display: block;
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 700;
  margin-top: 0.5rem;
}
.hero-title-plain { color: hsl(var(--foreground)); }

.hero-description {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  max-width: 38rem;
  margin: 0 auto 2rem;
  line-height: 1.7;
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s 0.3s, transform 0.7s 0.3s;
}
@media (min-width: 1024px) { .hero-description { margin-left: 0; } }
.hero-description.loaded { opacity: 1; transform: translateY(0); }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s 0.4s, transform 0.7s 0.4s;
}
@media (min-width: 1024px) { .hero-ctas { justify-content: flex-start; } }
.hero-ctas.loaded { opacity: 1; transform: translateY(0); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--cyan); color: #fff !important;
  font-weight: 600; border-radius: 0.75rem;
  border: none;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.btn-primary:hover { background: var(--cyan-dark); box-shadow: 0 0 30px rgba(6,182,212,.3); transform: scale(1.05); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 1rem 2rem;
  border: 1px solid rgba(255,255,255,0.2);
  color: hsl(var(--foreground));
  font-weight: 600; border-radius: 0.75rem;
  background: transparent;
  transition: border-color 0.3s, background 0.3s;
}
.btn-secondary:hover { border-color: var(--cyan); background: rgba(6,182,212,0.1); }

/* Floating Cards (2-3-2 grid) */
.hero-right {
  display: none;
  position: relative;
  height: 540px;
}
@media (min-width: 1024px) { .hero-right { display: block; } }

.float-card {
  position: absolute;
  background: rgba(20,20,20,0.6);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  width: 8rem;
  opacity: 0; transform: scale(0.75);
  transition: opacity 0.7s, transform 0.7s, border-color 0.3s;
  cursor: pointer;
}
[data-theme="light"] .float-card { background: rgba(255,255,255,0.8); }
.float-card.loaded { opacity: 1; transform: scale(1); animation: float 6s ease-in-out infinite; }
.float-card:hover  { transform: scale(1.1); border-color: rgba(6,182,212,0.5); }

.float-card-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #fff;
}
.float-card-name { font-size: 0.75rem; font-weight: 600; color: hsl(var(--foreground)); line-height: 1.3; }

/* Decorative blobs */
.hero-blob-1 {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 16rem; height: 16rem;
  background: rgba(6,182,212,0.1);
  border-radius: 50%;
  filter: blur(48px);
  animation: pulse-glow 3s ease-in-out infinite;
}
.hero-blob-2 {
  position: absolute; top: 33%; right: 25%;
  width: 8rem; height: 8rem;
  background: rgba(139,92,246,0.1);
  border-radius: 50%;
  filter: blur(32px);
  animation: pulse-glow 3s ease-in-out infinite 0.5s;
}

.hero-bottom-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 8rem;
  background: linear-gradient(to top, var(--dark), transparent);
}

/* ── Section Common ───────────────────────────────────────────── */
.section-bg-dark    { background: #0a0a0a; }
.section-bg-darker  { background: #111111; }
[data-theme="light"] .section-bg-dark   { background: #f8fafc; }
[data-theme="light"] .section-bg-darker { background: #f1f5f9; }

.section-blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.section-blob-cyan   { background: rgba(6,182,212,0.05); }
.section-blob-purple { background: rgba(139,92,246,0.05); }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-title  { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin-bottom: 1rem; }
.section-title span.white { color: hsl(var(--foreground)); }
.section-subtitle { color: #9ca3af; font-size: 1.125rem; max-width: 40rem; margin-inline: auto; }
[data-theme="light"] .section-subtitle { color: #64748b; }

/* ── Skills Section ───────────────────────────────────────────── */
#skills {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}
@media (min-width: 1024px) { #skills { padding: 8rem 0; } }

.skills-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px)  { .skills-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .skills-grid { grid-template-columns: repeat(3,1fr); } }

.skill-card {
  position: relative;
  border-radius: 1rem;
  padding: 1.5rem;
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.5s, transform 0.5s;
}
.skill-card.visible { opacity: 1; transform: translateY(0); }

.skill-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.skill-icon {
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.skill-card:hover .skill-icon { transform: scale(1.1) rotate(3deg); }
.skill-icon svg { color: #fff; }
.skill-name { font-size: 1.25rem; font-weight: 600; color: #fff; }
[data-theme="light"] .skill-name { color: #0f172a; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: #d1d5db;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  cursor: default;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.skill-tag:hover { background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.3); color: var(--cyan); }
[data-theme="light"] .skill-tag { color: #475569; background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.1); }

.skill-overlay {
  position: absolute; inset: 0; border-radius: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.skill-card:hover .skill-overlay { opacity: 0.05; }

/* ── Experience Section ───────────────────────────────────────── */
#experience {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
  background: #111111;
}
@media (min-width: 1024px) { #experience { padding: 8rem 0; } }
[data-theme="light"] #experience { background: #f1f5f9; }

.timeline {
  position: relative;
}
.timeline-line {
  position: absolute;
  left: 1rem; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(6,182,212,.5), rgba(6,182,212,.3), transparent);
}
@media (min-width: 768px) {
  .timeline-line { left: 50%; transform: translateX(-50%); }
}

.timeline-list { display: flex; flex-direction: column; gap: 3rem; }

.timeline-item {
  position: relative;
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s, transform 0.7s;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }

.timeline-node {
  position: absolute;
  left: 1rem; top: 0.25rem;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  background: var(--cyan);
  border: 4px solid #111111;
  z-index: 1;
  transform: translateX(-50%);
}
[data-theme="light"] .timeline-node { border-color: #f1f5f9; }
.timeline-node.current { animation: pulse-glow 3s ease-in-out infinite; }

@media (min-width: 768px) {
  .timeline-node { left: 50%; }
}

.timeline-card-wrap {
  margin-left: 3rem;
}
@media (min-width: 768px) {
  .timeline-card-wrap       { margin-left: 0; width: calc(50% - 2rem); }
  .timeline-item:nth-child(odd)  .timeline-card-wrap { margin-right: auto; padding-right: 3rem; }
  .timeline-item:nth-child(even) .timeline-card-wrap { margin-left: auto; padding-left: 3rem; }
}

.exp-card {
  border-radius: 1rem;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.exp-card:hover .exp-role { color: var(--cyan); }

.exp-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 1rem; }
.exp-role { font-size: 1.25rem; font-weight: 600; color: #fff; transition: color 0.3s; }
[data-theme="light"] .exp-role { color: #0f172a; }
.exp-company { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; color: #9ca3af; font-size: 0.875rem; }
.exp-badge { padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 500; color: var(--cyan); background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3); border-radius: 9999px; white-space: nowrap; }

.exp-meta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.exp-meta-item { display: flex; align-items: center; gap: 0.25rem; font-size: 0.875rem; color: #6b7280; }

.exp-achievements { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.exp-achievement  { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: #9ca3af; }
[data-theme="light"] .exp-achievement { color: #475569; }
.exp-bullet { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--cyan); margin-top: 0.5rem; flex-shrink: 0; }

/* ── Projects Section ─────────────────────────────────────────── */
#projects {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}
@media (min-width: 1024px) { #projects { padding: 8rem 0; } }

.projects-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px)  { .projects-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .projects-grid { grid-template-columns: repeat(3,1fr); } }

.project-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s, transform 0.7s;
}
.project-card.visible { opacity: 1; transform: translateY(0); }

.project-gradient-bar {
  height: 4px; width: 4rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  transition: width 0.3s;
}
.project-card:hover .project-gradient-bar { width: 100%; }

.project-title {
  font-size: 1.25rem; font-weight: 600; color: #fff;
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}
[data-theme="light"] .project-title { color: #0f172a; }
.project-card:hover .project-title { color: var(--cyan); }

.project-desc { color: #9ca3af; font-size: 0.875rem; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
[data-theme="light"] .project-desc { color: #64748b; }

.project-highlight { margin-bottom: 1rem; padding: 0.75rem; border-radius: 0.5rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
[data-theme="light"] .project-highlight { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.08); }
.project-highlight p { font-size: 0.875rem; color: var(--cyan); font-weight: 500; }

.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-tag { padding: 0.25rem 0.5rem; font-size: 0.75rem; color: #9ca3af; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 0.375rem; transition: all 0.3s; }
.project-tag:hover { background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.3); color: var(--cyan); }
[data-theme="light"] .project-tag { color: #64748b; background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.08); }

.project-hover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,1), rgba(10,10,10,.8), transparent);
  opacity: 0; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1.5rem;
  transition: opacity 0.3s;
}
[data-theme="light"] .project-hover-overlay { background: linear-gradient(to top, rgba(248,250,252,1), rgba(248,250,252,.8), transparent); }
.project-card:hover .project-hover-overlay { opacity: 1; pointer-events: auto; }

.project-view-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--cyan); color: #fff;
  font-weight: 500; border-radius: 0.75rem; border: none;
  transform: translateY(1rem);
  transition: background 0.3s, transform 0.3s;
}
.project-card:hover .project-view-btn { transform: translateY(0); }
.project-view-btn:hover { background: var(--cyan-dark); }

.project-corner-icon {
  position: absolute; top: 1rem; right: 1rem;
  color: var(--cyan); opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover .project-corner-icon { opacity: 1; }

/* ── Certifications Section ───────────────────────────────────── */
#certifications {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
  background: #111111;
}
@media (min-width: 1024px) { #certifications { padding: 8rem 0; } }
[data-theme="light"] #certifications { background: #f1f5f9; }

.certs-featured { display: grid; gap: 1.5rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .certs-featured { grid-template-columns: repeat(3,1fr); } }

.cert-featured-card {
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.cert-featured-bg {
  position: absolute; inset: 0;
  opacity: 0.5; pointer-events: none;
}
.cert-featured-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
.cert-featured-icon { width: 4rem; height: 4rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; }
.cert-check { display: flex; align-items: center; gap: 0.5rem; justify-content: center; margin-bottom: 0.25rem; }
.cert-check-text { font-size: 0.875rem; font-weight: 500; color: var(--cyan); }
.cert-platform-title { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
[data-theme="light"] .cert-platform-title { color: #0f172a; }
.cert-platform-desc { font-size: 0.875rem; color: #9ca3af; }
[data-theme="light"] .cert-platform-desc { color: #64748b; }
.cert-count-num { font-size: 1.875rem; font-weight: 700; }
.cert-count-label { font-size: 0.75rem; color: #9ca3af; }

.certs-grid { display: grid; gap: 1rem; }
@media (min-width: 640px)  { .certs-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .certs-grid { grid-template-columns: repeat(4,1fr); } }

.cert-card {
  display: block;
  position: relative;
  border-radius: 0.75rem;
  padding: 1.25rem;
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.5s, transform 0.5s;
  overflow: hidden;
  text-decoration: none;
}
.cert-card.visible { opacity: 1; transform: translateY(0); }

.cert-bar { height: 4px; width: 3rem; border-radius: 9999px; margin-bottom: 1rem; transition: width 0.3s; }
.cert-card:hover .cert-bar { width: 100%; }

.cert-name { font-size: 0.875rem; font-weight: 600; color: #fff; margin-bottom: 0.25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.3s; }
[data-theme="light"] .cert-name { color: #0f172a; }
.cert-card:hover .cert-name { color: var(--cyan); }
.cert-issuer { font-size: 0.75rem; color: #6b7280; margin-bottom: 0.5rem; }
.cert-desc { font-size: 0.75rem; color: #9ca3af; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
[data-theme="light"] .cert-desc { color: #64748b; }

.cert-month {
  display: inline-flex; align-items: center; gap: 0.25rem;
  margin-top: 0.75rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem; color: var(--cyan);
  background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3);
  border-radius: 9999px;
}

.cert-verify-icon {
  position: absolute; top: 1rem; right: 1rem;
  color: var(--cyan);
  opacity: 0; transform: translateX(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.cert-card:hover .cert-verify-icon { opacity: 1; transform: translateX(0); }

.cert-glow {
  position: absolute; inset: 0; border-radius: 0.75rem;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cert-card:hover .cert-glow { opacity: 0.05; }

/* SVG icons in cert cards */
.cert-card svg, .cert-check svg { color: var(--cyan); }

/* ── Contact Section ──────────────────────────────────────────── */
#contact {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}
@media (min-width: 1024px) { #contact { padding: 8rem 0; } }

.contact-grid { display: grid; gap: 4rem; align-items: center; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-left  { opacity: 0; transform: translateX(-32px); transition: opacity 0.7s, transform 0.7s; }
.contact-right { opacity: 0; transform: translateX(32px);  transition: opacity 0.7s 0.2s, transform 0.7s 0.2s; }
.contact-left.visible, .contact-right.visible { opacity: 1; transform: translateX(0); }

.contact-title { font-size: clamp(2rem,5vw,3rem); font-weight: 700; margin-bottom: 1.5rem; }
.contact-intro { color: #9ca3af; font-size: 1.125rem; margin-bottom: 2rem; line-height: 1.7; }
[data-theme="light"] .contact-intro { color: #64748b; }

.contact-info { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.contact-info-item { display: flex; align-items: center; gap: 1rem; }
.contact-info-icon {
  width: 3rem; height: 3rem; flex-shrink: 0;
  border-radius: 0.75rem;
  background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
}
.contact-info-label { font-size: 0.875rem; color: #6b7280; }
.contact-info-value { color: #fff; }
[data-theme="light"] .contact-info-value { color: #0f172a; }
.contact-info-value a { color: #fff; transition: color 0.2s; }
[data-theme="light"] .contact-info-value a { color: #0f172a; }
.contact-info-value a:hover { color: var(--cyan); }

.social-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.social-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem; color: #fff;
  transition: all 0.3s;
}
[data-theme="light"] .social-link { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.1); color: #0f172a; }
.social-link:hover { background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.3); color: var(--cyan); }
.social-link svg { color: var(--cyan); transition: color 0.3s; }
.social-link-arrow { color: #6b7280; transition: color 0.3s; }
.social-link:hover .social-link-arrow { color: var(--cyan); }

/* Contact form */
.contact-form { border-radius: 1rem; padding: 2rem; }
.contact-form h3 { font-size: 1.5rem; font-weight: 600; color: #fff; margin-bottom: 1.5rem; }
[data-theme="light"] .contact-form h3 { color: #0f172a; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; color: #9ca3af; margin-bottom: 0.5rem; }
[data-theme="light"] .form-label { color: #64748b; }
.form-required { color: var(--cyan); }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0 1rem;
  height: 3rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  font-family: var(--font-inter);
  transition: border-color 0.2s;
  outline: none;
}
[data-theme="light"] .form-input, [data-theme="light"] .form-select, [data-theme="light"] .form-textarea {
  background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.1); color: #0f172a;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--cyan); }
.form-input::placeholder, .form-textarea::placeholder { color: #4b5563; }
[data-theme="light"] .form-input::placeholder, [data-theme="light"] .form-textarea::placeholder { color: #94a3b8; }

.form-input.error   { border-color: rgba(248,113,113,.7); }
.form-input.valid   { border-color: rgba(74,222,128,.6); }
.form-select.error  { border-color: rgba(248,113,113,.7); }
.form-select.valid  { border-color: rgba(74,222,128,.6); }
.form-textarea.error{ border-color: rgba(248,113,113,.7); }
.form-textarea.valid{ border-color: rgba(74,222,128,.6); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  cursor: pointer;
}
.form-select option { background: #111111; color: #fff; }
[data-theme="light"] .form-select option { background: #fff; color: #0f172a; }

.form-textarea { height: auto; padding: 0.875rem 1rem; resize: none; }

.form-hint     { margin-top: 0.25rem; font-size: 0.75rem; color: #4b5563; }
.form-error    { margin-top: 0.25rem; font-size: 0.75rem; color: #f87171; }
.form-success  { margin-top: 0.25rem; font-size: 0.75rem; color: #4ade80; }

.form-char-count { font-size: 0.75rem; font-variant-numeric: tabular-nums; color: #6b7280; }
.form-char-count.valid-count { color: #4ade80; }
.form-char-count.cyan-count  { color: var(--cyan); }

.phone-group { display: flex; }

/* Country selector dropdown */
.country-selector {
  position: relative;
  flex-shrink: 0;
}
.country-select-btn {
  display: flex; align-items: center; gap: 0.25rem;
  height: 3rem; padding: 0 0.75rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-right: none; border-radius: 0.75rem 0 0 0.75rem;
  color: #fff; font-size: 0.875rem; white-space: nowrap;
  cursor: pointer; transition: border-color 0.2s;
}
[data-theme="light"] .country-select-btn { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.1); color: #0f172a; }
.country-select-btn:focus { outline: none; border-color: var(--cyan); }
.country-select-btn.error  { border-color: rgba(248,113,113,.7); }
.country-select-btn.valid  { border-color: rgba(74,222,128,.6); }

.country-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0;
  z-index: 100;
  min-width: 16rem; max-height: 12rem; overflow-y: auto;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem; box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  display: none;
}
[data-theme="light"] .country-dropdown { background: #fff; border-color: rgba(15,23,42,0.1); box-shadow: 0 16px 40px rgba(15,23,42,0.15); }
.country-dropdown.open { display: block; }

.country-option {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; font-size: 0.875rem; color: #d1d5db;
  cursor: pointer; transition: background 0.15s;
}
[data-theme="light"] .country-option { color: #334155; }
.country-option:hover, .country-option.selected { background: rgba(6,182,212,0.1); color: var(--cyan); }

.phone-input-field {
  flex: 1;
  padding: 0 1rem;
  height: 3rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0 0.75rem 0.75rem 0;
  color: #fff; font-size: 0.875rem; font-family: var(--font-inter);
  outline: none; transition: border-color 0.2s;
}
[data-theme="light"] .phone-input-field { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.1); color: #0f172a; }
.phone-input-field:focus { border-color: var(--cyan); }
.phone-input-field.error { border-color: rgba(248,113,113,.7); }
.phone-input-field.valid { border-color: rgba(74,222,128,.6); }
.phone-input-field::placeholder { color: #4b5563; }

.form-banner {
  border-radius: 0.75rem; padding: 0.75rem 1rem;
  font-size: 0.875rem; margin-bottom: 1rem;
}
.form-banner.success { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); color: #4ade80; }
.form-banner.error   { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #f87171; }

.submit-btn {
  width: 100%; height: 3rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--cyan); color: #fff;
  font-weight: 600; font-size: 0.9375rem;
  border: none; border-radius: 0.75rem;
  transition: background 0.3s, box-shadow 0.3s, opacity 0.2s;
}
.submit-btn:hover   { background: var(--cyan-dark); box-shadow: 0 0 30px rgba(6,182,212,.3); }
.submit-btn:disabled{ opacity: 0.5; cursor: not-allowed; }

.spinner {
  width: 1.25rem; height: 1.25rem;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rotate-slow 0.6s linear infinite;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 2rem 0;
}
[data-theme="light"] .site-footer { background: #f8fafc; border-top-color: rgba(15,23,42,0.08); }

.footer-inner {
  max-width: 80rem; margin-inline: auto;
  padding-inline: 1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 0.75rem;
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .footer-inner { padding-inline: 2rem; } }

.footer-copy { font-size: 0.875rem; color: #6b7280; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; }
.footer-link  { display: flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; color: #6b7280; transition: color 0.2s; }
.footer-link:hover { color: var(--cyan); }

/* ── Blog / Archive cards (shared) ───────────────────────────── */
.post-card {
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(6,182,212,0.12); }

.post-card-img { aspect-ratio: 16/9; overflow: hidden; background: rgba(255,255,255,0.05); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .post-card-img img { transform: scale(1.05); }

.post-card-body { padding: 1.25rem; }
.post-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; font-size: 0.75rem; color: #6b7280; }
.post-card-badge { padding: 0.2rem 0.5rem; background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3); color: var(--cyan); border-radius: 9999px; font-size: 0.7rem; font-weight: 600; }
.post-card-new-badge { background: rgba(139,92,246,0.15); border-color: rgba(139,92,246,0.4); color: var(--purple); }
.post-card-title { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 0.5rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
[data-theme="light"] .post-card-title { color: #0f172a; }
.post-card:hover .post-card-title { color: var(--cyan); }
.post-card-excerpt { font-size: 0.875rem; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
[data-theme="light"] .post-card-excerpt { color: #64748b; }

/* ── Archive page ─────────────────────────────────────────────── */
.archive-page { padding: 7rem 0 4rem; }
.archive-hero { text-align: center; margin-bottom: 3rem; }
.archive-hero h1 { font-size: clamp(2rem,5vw,3rem); font-weight: 700; margin-bottom: 0.75rem; }
.archive-hero p  { color: #9ca3af; font-size: 1.125rem; }
[data-theme="light"] .archive-hero p { color: #64748b; }

.cat-filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center; margin-bottom: 2rem;
  position: sticky; top: 4rem; z-index: 30;
  padding: 1rem 0;
  background: hsl(var(--background));
}
.cat-filter-btn {
  padding: 0.375rem 1rem;
  border-radius: 9999px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05); color: #9ca3af;
  font-size: 0.875rem; cursor: pointer; transition: all 0.2s;
}
[data-theme="light"] .cat-filter-btn { border-color: rgba(15,23,42,0.1); background: rgba(15,23,42,0.04); color: #64748b; }
.cat-filter-btn:hover, .cat-filter-btn.active {
  background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.4); color: var(--cyan);
}

.archive-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem;
}
.archive-search {
  display: flex; gap: 0;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem; overflow: hidden;
}
.archive-search input {
  padding: 0.5rem 0.75rem; background: transparent; border: none;
  color: #fff; font-size: 0.875rem; outline: none;
  width: 12rem;
}
[data-theme="light"] .archive-search { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.1); }
[data-theme="light"] .archive-search input { color: #0f172a; }
.archive-search input::placeholder { color: #6b7280; }
.archive-search-btn { padding: 0.5rem 0.75rem; background: transparent; border: none; color: #6b7280; cursor: pointer; transition: color 0.2s; }
.archive-search-btn:hover { color: var(--cyan); }

.toolbar-actions { display: flex; gap: 0.5rem; }
.toolbar-btn {
  padding: 0.5rem 0.75rem; border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #9ca3af; font-size: 0.875rem; cursor: pointer; transition: all 0.2s;
}
[data-theme="light"] .toolbar-btn { border-color: rgba(15,23,42,0.1); background: rgba(15,23,42,0.04); color: #64748b; }
.toolbar-btn:hover, .toolbar-btn.active { border-color: rgba(6,182,212,0.4); color: var(--cyan); }

.posts-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px)  { .posts-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .posts-grid { grid-template-columns: repeat(3,1fr); } }
.posts-grid.list-view { grid-template-columns: 1fr; }

.archive-sentinel { height: 1px; }
.archive-loading  { text-align: center; padding: 2rem; color: #6b7280; }
.archive-empty    { text-align: center; padding: 4rem 1rem; color: #6b7280; }
.archive-empty h2 { font-size: 1.25rem; margin-bottom: 0.5rem; color: #9ca3af; }

/* ── Breadcrumb ───────────────────────────────────────────────── */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: #6b7280; margin-bottom: 1.5rem; }
.breadcrumb a { color: #6b7280; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb-sep { color: #4b5563; }
.breadcrumb-current { color: #9ca3af; }
[data-theme="light"] .breadcrumb { color: #94a3b8; }
[data-theme="light"] .breadcrumb a { color: #94a3b8; }

/* ── Page (generic) ───────────────────────────────────────────── */
.page-content { padding: 7rem 1rem 4rem; max-width: 48rem; margin-inline: auto; }
.page-content h1 { font-size: clamp(1.75rem,4vw,2.5rem); font-weight: 700; color: hsl(var(--foreground)); margin-bottom: 1.5rem; }
.page-content .wp-content { margin-top: 1rem; }

/* ── 404 ──────────────────────────────────────────────────────── */
.not-found { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10rem 1rem; }
.not-found h1 { font-size: 8rem; font-weight: 700; line-height: 1; }
.not-found h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.not-found p  { color: #9ca3af; margin-bottom: 2rem; }

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Gutenberg / WP Content ───────────────────────────────────── */
.wp-content {
  color: #d1d5db;
  line-height: 1.8;
  font-size: 1.125rem;
  counter-reset: faq-counter;
}

.wp-content h2, .wp-content h3, .wp-content h4 { scroll-margin-top: 5rem; }

.wp-content h2.wp-block-heading {
  color: #fff; font-weight: 700; font-size: 1.75rem;
  margin-top: 2.5rem; margin-bottom: 1rem; line-height: 1.3;
  border-bottom: 1px solid rgba(6,182,212,.15); padding-bottom: 0.5rem;
}
.wp-content h3.wp-block-heading { color: #f3f4f6; font-weight: 600; font-size: 1.375rem; margin-top: 2rem; margin-bottom: 0.75rem; line-height: 1.4; }
.wp-content h4.wp-block-heading { color: #e5e7eb; font-weight: 600; font-size: 1.125rem; margin-top: 1.5rem; margin-bottom: 0.5rem; line-height: 1.4; }

.wp-content p { color: #d1d5db; margin-bottom: 1.25rem; line-height: 1.8; }
.wp-content a { color: var(--cyan); border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.wp-content a:hover { color: var(--cyan-light); border-bottom-color: var(--cyan-light); }
.wp-content strong { color: #fff; font-weight: 600; }

.wp-content .wp-block-image { margin: 2rem 0; }
.wp-content .wp-block-image img { max-width: 100%; height: auto; border-radius: .75rem; border: 1px solid rgba(255,255,255,.08); }
.wp-content .wp-block-image figcaption { text-align: center; color: #9ca3af; font-size: .875rem; margin-top: .75rem; font-style: italic; }

.wp-content ul { list-style-type: disc; padding-left: 1.5rem; margin: 1.25rem 0; }
.wp-content ol { list-style-type: decimal; padding-left: 1.5rem; margin: 1.25rem 0; }
.wp-content li { color: #d1d5db; margin-bottom: .5rem; line-height: 1.7; }
.wp-content li::marker { color: var(--cyan); }

.wp-content blockquote {
  border-left: 4px solid var(--cyan); background: rgba(6,182,212,.05);
  padding: 1rem 1.5rem; margin: 1.5rem 0; border-radius: 0 .75rem .75rem 0;
}
.wp-content blockquote p { color: #e5e7eb; font-style: italic; margin-bottom: 0; }
.wp-content blockquote cite { color: #9ca3af; font-size: .875rem; display: block; margin-top: .5rem; }

.wp-content code { color: var(--cyan-light); background: rgba(255,255,255,.08); padding: .15rem .4rem; border-radius: .25rem; font-size: .875em; font-family: 'JetBrains Mono','Fira Code',monospace; }
.wp-content pre  { background: #111; border: 1px solid rgba(255,255,255,.1); border-radius: .75rem; padding: 1.5rem; overflow-x: auto; margin: 1.5rem 0; position: relative; }
.wp-content pre code { background: none; padding: 0; color: #e5e7eb; font-size: .875rem; line-height: 1.7; }

.wp-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; border: 1px solid rgba(255,255,255,.1); border-radius: .75rem; overflow: hidden; }
.wp-content thead { background: rgba(255,255,255,.05); }
.wp-content th { color: #fff; font-weight: 600; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.1); }
.wp-content td { color: #d1d5db; padding: .75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.wp-content tr:last-child td { border-bottom: none; }
.wp-content hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 2rem 0; }
.wp-content iframe { max-width: 100%; border-radius: .75rem; margin: 1.5rem 0; }

.wp-content > p:first-of-type { font-size: 1.2rem; color: #e5e7eb; line-height: 1.75; }
.wp-content > p:first-of-type::first-letter {
  float: left; font-size: 3.75rem; font-weight: 700; line-height: .82;
  margin-right: .12em; margin-top: .06em; color: var(--cyan);
  font-family: Georgia,'Times New Roman',serif;
}

@media (min-width: 640px) {
  .wp-content h2.wp-block-heading { font-size: 2rem; }
  .wp-content h3.wp-block-heading { font-size: 1.5rem; }
}

/* Light mode WP content */
[data-theme="light"] .wp-content { color: #334155; }
[data-theme="light"] .wp-content h2.wp-block-heading { color: #0f172a; border-bottom-color: rgba(6,182,212,.2); }
[data-theme="light"] .wp-content h3.wp-block-heading { color: #1e293b; }
[data-theme="light"] .wp-content h4.wp-block-heading { color: #334155; }
[data-theme="light"] .wp-content p  { color: #334155; }
[data-theme="light"] .wp-content li { color: #334155; }
[data-theme="light"] .wp-content strong { color: #0f172a; }
[data-theme="light"] .wp-content blockquote { background: rgba(6,182,212,.06); }
[data-theme="light"] .wp-content blockquote p { color: #1e293b; }
[data-theme="light"] .wp-content code { color: #0891b2; background: rgba(6,182,212,.08); }
[data-theme="light"] .wp-content pre  { background: #f1f5f9; border-color: rgba(15,23,42,.1); }
[data-theme="light"] .wp-content pre code { color: #1e293b; }
[data-theme="light"] .wp-content table  { border-color: rgba(15,23,42,.1); }
[data-theme="light"] .wp-content thead  { background: rgba(15,23,42,.04); }
[data-theme="light"] .wp-content th     { color: #0f172a; border-bottom-color: rgba(15,23,42,.1); }
[data-theme="light"] .wp-content td     { color: #334155; border-bottom-color: rgba(15,23,42,.05); }
[data-theme="light"] .wp-content hr     { border-top-color: rgba(15,23,42,.1); }
[data-theme="light"] .wp-content .wp-block-image img { border-color: rgba(15,23,42,.08); }
[data-theme="light"] .wp-content > p:first-of-type { color: #1e293b; }
[data-theme="light"] .wp-content > p:first-of-type::first-letter { color: #0891b2; }

/* H2 anchor buttons */
.wp-content h2[id] { position: relative; cursor: pointer; }
.wp-content .h2-anchor-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  margin-left: .5rem; padding: .25rem; border-radius: .25rem;
  background: transparent; border: none; cursor: pointer;
  opacity: 0; vertical-align: middle; line-height: 1; position: relative; z-index: 2;
  transition: opacity .15s ease, color .15s ease, background-color .15s ease !important;
}
.wp-content .h2-anchor-btn svg { stroke: #94a3b8; }
.wp-content h2:hover .h2-anchor-btn { opacity: 1; }
.wp-content .h2-anchor-btn:hover { background: rgba(6,182,212,.15); }
.wp-content .h2-anchor-btn:hover svg { stroke: var(--cyan); }
@media (max-width: 767px) { .wp-content .h2-anchor-btn { display: none; } }

/* Copy code button */
.copy-code-btn {
  position: absolute; top: .6rem; right: .6rem;
  padding: .2rem .65rem; font-size: .72rem; font-family: var(--font-inter); font-weight: 500;
  color: #9ca3af; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); border-radius: .35rem; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s !important; z-index: 10;
}
.copy-code-btn:hover { color: var(--cyan); background: rgba(6,182,212,.1); border-color: rgba(6,182,212,.3); }
[data-theme="light"] .copy-code-btn { color: #64748b; background: rgba(15,23,42,.05); border-color: rgba(15,23,42,.12); }
[data-theme="light"] .copy-code-btn:hover { color: #0891b2; }

/* AIOSEO FAQ Block */
.wp-content .wp-block-aioseo-faq {
  counter-increment: faq-counter;
  border-radius: .75rem; margin-bottom: .625rem;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 2px 8px rgba(0,0,0,.35); overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.wp-content .wp-block-aioseo-faq:hover { border-color: rgba(6,182,212,.35); }
.wp-content .wp-block-aioseo-faq.faq-open { border-color: rgba(6,182,212,.45); box-shadow: 0 4px 20px rgba(0,0,0,.4), 0 0 0 1px rgba(6,182,212,.15); }

.wp-content .aioseo-faq-block-question {
  display: flex !important; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem; font-size: .9375rem !important; font-weight: 600 !important;
  color: #e2e8f0 !important; cursor: pointer; user-select: none;
  list-style: none !important; margin: 0 !important; line-height: 1.5 !important;
  border: none !important; transition: color .2s !important;
}
.wp-content .aioseo-faq-block-question::-webkit-details-marker,
.wp-content .aioseo-faq-block-question::marker { display: none; content: ''; }

.wp-content .aioseo-faq-block-question::before {
  content: "Q" counter(faq-counter);
  flex-shrink: 0; font-size: .6875rem; font-weight: 700; letter-spacing: .04em;
  color: var(--cyan); background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.25);
  border-radius: .375rem; padding: .2rem .45rem; line-height: 1.5;
  transition: background .2s, border-color .2s;
}
.wp-content .faq-open > .aioseo-faq-block-question { color: #fff !important; border-bottom: 1px solid rgba(6,182,212,.12) !important; }
.wp-content .faq-open > .aioseo-faq-block-question::before { background: rgba(6,182,212,.18); border-color: rgba(6,182,212,.45); }

.wp-content .wp-block-aioseo-faq .aioseo-faq-block-question::after {
  content: ''; flex-shrink: 0; display: block; margin-left: auto;
  width: .5rem; height: .5rem;
  border-right: 2px solid #6b7280; border-bottom: 2px solid #6b7280;
  transform: rotate(45deg);
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .2s;
  position: relative; top: -2px;
}
.wp-content .wp-block-aioseo-faq.faq-open > .aioseo-faq-block-question::after { transform: rotate(225deg); border-color: var(--cyan); top: 2px; }

.wp-content .wp-block-aioseo-faq .aioseo-faq-block-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.wp-content .wp-block-aioseo-faq.faq-open .aioseo-faq-block-answer { max-height: 600px; }
.wp-content .aioseo-faq-block-answer p { font-size: .9375rem; color: #94a3b8; margin: 0; line-height: 1.8; padding: 1rem 1.25rem 1.25rem; }

/* FAQ light mode */
[data-theme="light"] .wp-content .wp-block-aioseo-faq { background: #fff; border-color: rgba(15,23,42,.12); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
[data-theme="light"] .wp-content .wp-block-aioseo-faq:hover { border-color: rgba(6,182,212,.4); }
[data-theme="light"] .wp-content .wp-block-aioseo-faq.faq-open { border-color: rgba(6,182,212,.45); }
[data-theme="light"] .wp-content .aioseo-faq-block-question { color: #1e293b !important; }
[data-theme="light"] .wp-content .faq-open > .aioseo-faq-block-question { color: #0f172a !important; }
[data-theme="light"] .wp-content .wp-block-aioseo-faq .aioseo-faq-block-question::after { border-color: #9ca3af; }
[data-theme="light"] .wp-content .wp-block-aioseo-faq.faq-open > .aioseo-faq-block-question::after { border-color: var(--cyan); }
[data-theme="light"] .wp-content .aioseo-faq-block-answer p { color: #475569; }
