/* ===========================================================
   Husain Raza Portfolio — Premium CSS Rewrite
   =========================================================== */

/* -----------------------------------------------------------
   01. CUSTOM PROPERTIES & THEME SETTINGS
   ----------------------------------------------------------- */
:root {
  /* Typography */
  --font-display: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;

  /* Color Palette - Core */
  --color-ink: #0A0C10;
  --color-surface: #0F1218;
  --color-gold: #C9A15A;
  --color-gold-light: #E6C68A;
  --color-accent: #5B7FFF;

  /* Theme: Light (Default base, overwritten by .dark) */
  --bg: #ffffff;
  --fg: #0A0C10;
  
  /* Borders */
  --border: rgba(0, 0, 0, 0.10);
  --border-soft: rgba(0, 0, 0, 0.05);
  
  /* Typography Colors */
  --muted-50: rgba(10, 12, 16, 0.5);
  --muted-60: rgba(10, 12, 16, 0.6);
  --muted-70: rgba(10, 12, 16, 0.7);
  --muted-80: rgba(10, 12, 16, 0.8);

  /* Compatibility aliases used by the templates. */
  --gold: var(--color-gold);
  --surface: var(--color-surface);
  --bg-color: var(--bg);
  --border-color: var(--border);
  --text-muted: var(--muted-60);
  
  /* Cards & Glassmorphism */
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  
  /* Background Elements */
  --grid-line: rgba(0, 0, 0, 0.04);
  
  /* Premium Effects & Gradients */
  --mesh-bg-1: radial-gradient(at 0% 0%, rgba(201,161,90,0.05) 0px, transparent 50%);
  --mesh-bg-2: radial-gradient(at 100% 100%, rgba(91,127,255,0.05) 0px, transparent 50%);
  --glow-gold: rgba(201, 161, 90, 0.3);
  
  /* Safe Area Insets */
  --sai-top: env(safe-area-inset-top, 0px);
  --sai-bottom: env(safe-area-inset-bottom, 0px);
  --sai-left: env(safe-area-inset-left, 0px);
  --sai-right: env(safe-area-inset-right, 0px);

  /* Fluid Typography Clamps */
  --text-hero: clamp(3rem, 10vw, 7rem);
  --text-h2: clamp(1.75rem, 4vw, 3rem);
  --text-body: clamp(0.875rem, 1.2vw, 1.125rem);
}

/* Theme: Dark */
body.dark {
  --bg: #0A0C10;
  --fg: #ffffff;
  
  --border: rgba(255, 255, 255, 0.10);
  --border-soft: rgba(255, 255, 255, 0.05);
  
  --muted-50: rgba(255, 255, 255, 0.5);
  --muted-60: rgba(255, 255, 255, 0.6);
  --muted-70: rgba(255, 255, 255, 0.7);
  --muted-80: rgba(255, 255, 255, 0.8);
  
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --grid-line: rgba(255, 255, 255, 0.05);
  
  --mesh-bg-1: radial-gradient(at 0% 0%, rgba(201,161,90,0.1) 0px, transparent 50%);
  --mesh-bg-2: radial-gradient(at 100% 100%, rgba(91,127,255,0.1) 0px, transparent 50%);
  --glow-gold: rgba(201, 161, 90, 0.5);
}

/* -----------------------------------------------------------
   02. RESET & BASE
   ----------------------------------------------------------- */
* {
  box-sizing: border-box;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  background-image: var(--mesh-bg-1), var(--mesh-bg-2);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding-top: var(--sai-top);
  padding-bottom: var(--sai-bottom);
  padding-left: var(--sai-left);
  padding-right: var(--sai-right);
}

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

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

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

::selection {
  background: rgba(201, 161, 90, 0.4);
  color: var(--fg);
}

/* -----------------------------------------------------------
   03. RESPONSIVE DESIGN SYSTEM (8 Breakpoints)
   ----------------------------------------------------------- */
.container-x {
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem; /* Default mobile padding */
}

/* 1. 320px (Small Phones) */
@media (min-width: 320px) {
  .container-x { padding: 0 1.5rem; }
}

/* 2. 375px (Standard Phones) */
@media (min-width: 375px) {
  .container-x { padding: 0 1.75rem; }
}

/* 3. 428px (Large Phones) */
@media (min-width: 428px) {
  .container-x { padding: 0 2rem; }
}

/* 4. 768px (Tablet Portrait) */
@media (min-width: 768px) {
  .container-x { 
    max-width: 768px; 
    padding: 0 2.5rem; 
  }
}

/* 5. 1024px (Tablet Landscape / Small Laptop) */
@media (min-width: 1024px) {
  .container-x { 
    max-width: 1024px; 
    padding: 0 3rem; 
  }
}

/* 6. 1280px (Desktop) */
@media (min-width: 1280px) {
  .container-x { 
    max-width: 1280px; 
    padding: 0 4rem; 
  }
}

/* 7. 1536px (Large Desktop) */
@media (min-width: 1536px) {
  .container-x { 
    max-width: 1536px; 
    padding: 0 5rem; 
  }
}

/* 8. 1920px+ (4K / Ultrawide) */
@media (min-width: 1920px) {
  .container-x { 
    max-width: 1800px; 
    padding: 0 6rem; 
  }
}

/* -----------------------------------------------------------
   04. UTILITY CLASSES
   ----------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { display: flex; flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.text-gold { color: var(--color-gold); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* -----------------------------------------------------------
   05. PREMIUM VISUAL EFFECTS & ANIMATIONS
   ----------------------------------------------------------- */
/* 1. Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-light);
}

/* 2. Floating Animation */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
.floating {
  animation: float 3s ease-in-out infinite;
}

/* 3. Text Gradient Headings */
.text-gradient {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2.text-gradient {
  display: inline-block;
}

/* 4. Glow Hover Effects */
.glow-hover {
  transition: box-shadow 0.3s ease;
}
.glow-hover:hover {
  box-shadow: 0 0 20px var(--glow-gold);
}

/* 5. Button Press Effect */
button:active, .btn:active, .btn-pill:active, .btn-outline:active {
  transform: scale(0.97);
}

/* 6. Animated Gradient Borders on CTA */
.btn-animated-border {
  position: relative;
  background: var(--bg);
  background-clip: padding-box;
  border: solid 2px transparent;
  border-radius: 999px;
}
.btn-animated-border::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: -1;
  margin: -2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-gold), var(--color-accent), var(--color-gold-light), var(--color-gold));
  background-size: 300% 100%;
  animation: gradientPan 3s linear infinite;
}
@keyframes gradientPan {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* 7. Card Shine Effect */
.glass-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
}
.glass-card:hover::after {
  left: 200%;
}
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
body.dark .glass-card:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

/* 8. Link Underline Animation */
.link-animated {
  position: relative;
  display: inline-block;
}
.link-animated::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-gold);
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}
.link-animated:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* 9. Skeleton Loading State */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: var(--border-soft);
  border-radius: 0.25rem;
}
.skeleton::after {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.3) 60%, rgba(255,255,255,0));
  animation: shimmer 2s infinite;
  content: '';
}
body.dark .skeleton::after {
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.05) 20%, rgba(255,255,255,0.1) 60%, rgba(255,255,255,0));
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* 10. Focus Rings for Accessibility */
*:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* -----------------------------------------------------------
   06. TYPOGRAPHY & HEADINGS
   ----------------------------------------------------------- */
.section-label {
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
}
.section-heading h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1.2;
  margin: 1rem 0 0;
}
.section-heading {
  max-width: 42rem;
  margin-bottom: 3.5rem;
}

/* -----------------------------------------------------------
   07. COMPONENTS (Buttons, Forms)
   ----------------------------------------------------------- */
.icon-btn {
  width: 2.75rem; 
  height: 2.75rem; /* Min 44px for touch */
  display: grid; 
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  transition: all 0.2s;
}
.icon-btn:hover { 
  border-color: var(--color-gold); 
  color: var(--color-gold);
  box-shadow: 0 0 10px var(--glow-gold);
}

.btn-pill {
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  min-height: 44px; /* Touch target */
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
  transition: all 0.2s;
  border: none;
}
.btn-pill:hover { 
  opacity: 0.9; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.btn-outline:hover { 
  border-color: var(--color-gold); 
  color: var(--color-gold);
  box-shadow: 0 0 15px var(--glow-gold);
}

/* -----------------------------------------------------------
   08. HEADER / NAVIGATION
   ----------------------------------------------------------- */
.site-header {
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  z-index: 50;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.nav { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 4.5rem; 
}
.logo { 
  font-family: var(--font-display); 
  font-size: 1.25rem; 
  font-weight: 600; 
  letter-spacing: -0.01em; 
}

.nav-links { 
  display: none; 
  align-items: center; 
  gap: 2.5rem; 
}
.nav-links a:not(.btn-pill) { 
  font-size: 0.9375rem; 
  color: var(--muted-70); 
  transition: color 0.2s; 
  font-weight: 500;
}
.nav-links a:not(.btn-pill):hover,
.nav-links a.active-link:not(.btn-pill) { 
  color: var(--color-gold); 
}

.nav-mobile-actions { 
  display: flex; 
  align-items: center; 
  gap: 0.75rem; 
}

/* Mobile Full-Screen Overlay Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu.open { 
  opacity: 1;
  visibility: visible;
}
.mobile-menu a {
  font-size: 2rem;
  font-family: var(--font-display);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.mobile-menu.open a {
  transform: translateY(0);
  opacity: 1;
}
/* Staggered animation */
.mobile-menu.open a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.4s; }

/* Desktop overrides */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-mobile-actions { display: none; }
}

/* Mobile Bottom Navigation Bar (.nav-bottom) */
.nav-bottom {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 48;
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-soft);
  justify-content: space-around;
  padding: 0.75rem 1rem calc(0.75rem + var(--sai-bottom));
}
.nav-bottom .icon-btn {
  border: none;
  width: 3rem;
  height: 3rem;
}
@media (min-width: 768px) {
  .nav-bottom { display: none; }
}

/* -----------------------------------------------------------
   09. SECTIONS
   ----------------------------------------------------------- */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 12rem 0 8rem;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; 
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 20%, transparent 75%);
  pointer-events: none;
}
.hero-glow {
  position: absolute; 
  top: -15rem; 
  right: -10rem;
  width: 600px; 
  height: 600px;
  background: rgba(201,161,90,0.15);
  border-radius: 999px;
  filter: blur(140px);
  pointer-events: none;
}
/* Floating decorative shapes */
.hero-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
}
.hero-shape-1 {
  top: 20%; left: 10%;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--color-gold), transparent);
  filter: blur(5px);
  animation: float 4s infinite ease-in-out;
}
.hero-shape-2 {
  bottom: 30%; right: 15%;
  width: 80px; height: 80px;
  border: 2px solid var(--color-accent);
  border-radius: 10px;
  transform: rotate(45deg);
  animation: float 5s infinite ease-in-out reverse;
}
/* Particle Canvas Layer */
#hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-inner { 
  position: relative; 
  z-index: 1; 
}
.hero-eyebrow { margin-bottom: 1.5rem; }
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 60rem;
  margin: 0;
}
.hero-tagline {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--muted-70);
  max-width: 42rem;
}
@media (min-width: 768px) { .hero-tagline { font-size: 1.75rem; } }
.hero-sub {
  margin-top: 1.5rem;
  max-width: 36rem;
  color: var(--muted-60);
  font-size: 1.125rem;
}
.hero-actions {
  margin-top: 3rem;
  display: flex; 
  flex-wrap: wrap; 
  align-items: center; 
  gap: 1.25rem;
}
.hero-socials { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
  margin-left: 0.5rem; 
}
.hero-stats {
  margin-top: 6rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 32rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.hero-stats .stat-num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--color-gold);
}
.hero-stats .stat-label { 
  font-size: 0.875rem; 
  color: var(--muted-50); 
  margin-top: 0.25rem; 
}
/* Availability badge pulse */
.hero-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-70);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem 0.4rem 0.6rem;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
}
.availability-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3ecf6f;
  box-shadow: 0 0 0 rgba(62,207,111,0.55);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(62,207,111,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(62,207,111,0); }
  100% { box-shadow: 0 0 0 0 rgba(62,207,111,0); }
}
.typing-cursor {
  display: inline-block;
  color: var(--color-gold);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Skills Marquee ---------- */
.skills-section { 
  padding: 6rem 0; 
  border-top: 1px solid var(--border-soft); 
  border-bottom: 1px solid var(--border-soft);
  background: rgba(0,0,0,0.01);
}
.skills-heading { margin-bottom: 3rem; text-align: center; }
.skills-heading h2 { 
  font-family: var(--font-display); 
  font-size: var(--text-h2); 
  font-weight: 600; 
  margin: 0.75rem 0 0; 
}
.marquee-wrap { 
  position: relative; 
  overflow: hidden; 
}
.marquee-fade { 
  position: absolute; 
  top: 0; 
  bottom: 0; 
  width: 10vw; 
  z-index: 10; 
  pointer-events: none; 
}
.marquee-fade.left { 
  left: 0; 
  background: linear-gradient(to right, var(--bg), transparent); 
}
.marquee-fade.right { 
  right: 0; 
  background: linear-gradient(to left, var(--bg), transparent); 
}
.marquee-track { 
  display: flex; 
  width: max-content; 
  animation: marquee 35s linear infinite; 
}
.marquee-item { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
  padding: 1.5rem 3rem; 
  flex-shrink: 0; 
}
.marquee-dot { 
  width: 0.5rem; 
  height: 0.5rem; 
  border-radius: 999px; 
  background: var(--color-gold); 
}
.marquee-text {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--muted-50);
  opacity: 0.6;
  white-space: nowrap;
  transition: opacity 0.3s;
}
.marquee-item:hover .marquee-text {
  opacity: 1;
  color: var(--color-gold);
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- About ---------- */
.about-section { padding: 8rem 0; }
.about-grid { 
  display: grid; 
  gap: 4rem; 
  align-items: start; 
}
@media (min-width: 1024px) { 
  .about-grid { grid-template-columns: 1fr 1.5fr; } 
}
.about-grid h2 { 
  font-family: var(--font-display); 
  font-size: var(--text-h2); 
  font-weight: 600; 
  line-height: 1.2; 
  margin: 0; 
}
.about-copy { 
  display: flex; 
  flex-direction: column; 
  gap: 1.5rem; 
  color: var(--muted-70); 
  font-size: 1.125rem; 
}
.about-copy .highlight { 
  color: var(--fg); 
  font-weight: 500; 
}

/* ---------- Experience Timeline (#timeline) - NEW ---------- */
#timeline {
  padding: 8rem 0;
  border-top: 1px solid var(--border-soft);
}
.timeline-section {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}
.timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  z-index: 1;
}
.timeline-line-animated {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--color-gold);
  transition: height 0.3s ease-out;
}
@media (min-width: 768px) {
  .timeline-line { left: 50%; transform: translateX(-50%); }
}
.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding-left: 50px;
}
@media (min-width: 768px) {
  .timeline-item { justify-content: space-between; padding-left: 0; }
  .timeline-item:nth-child(even) { flex-direction: row-reverse; }
}
.timeline-dot {
  position: absolute;
  left: 14px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--color-gold);
  z-index: 2;
  box-shadow: 0 0 10px rgba(201,161,90,0.5);
}
@media (min-width: 768px) {
  .timeline-dot { left: 50%; transform: translateX(-50%); }
}
.timeline-card {
  width: 100%;
  padding: 2rem;
}
@media (min-width: 768px) {
  .timeline-card { width: calc(50% - 40px); }
}
.timeline-date {
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
  display: block;
}

/* ---------- Projects ---------- */
.section-bordered { 
  padding: 8rem 0; 
  border-top: 1px solid var(--border-soft); 
}
.projects-grid { 
  display: grid; 
  gap: 3rem; 
}
@media (min-width: 768px) { 
  .projects-grid { grid-template-columns: repeat(2, 1fr); } 
}
@media (min-width: 1280px) { 
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 4rem; } 
}
.project-card { 
  overflow: hidden; 
  display: flex;
  flex-direction: column;
}
.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
  background: rgba(0,0,0,0.05);
}
.project-media img {
  width: 100%; 
  height: 100%; 
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover .project-media img { 
  transform: scale(1.08); 
}
.project-overlay {
  position: absolute; 
  inset: 0;
  background: linear-gradient(to top, rgba(10,12,16,0.8), transparent 60%);
  opacity: 0; 
  transition: opacity 0.5s;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-links {
  position: absolute; 
  left: 0; 
  right: 0; 
  bottom: 0;
  padding: 1.5rem;
  display: flex; 
  gap: 1rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover .project-links { 
  transform: translateY(0); 
  opacity: 1; 
}
.project-links a {
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem;
  font-size: 0.875rem; 
  padding: 0.75rem 1.25rem;
  border-radius: 999px; 
  font-weight: 500;
  min-height: 44px; /* Touch target */
  transition: all 0.2s;
}
.project-links a.live { 
  background: white; 
  color: var(--color-ink); 
}
.project-links a.live:hover { 
  background: var(--color-gold); 
  color: white; 
}
.project-links a.code {
  background: rgba(255,255,255,0.15); 
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
}
.project-links a.code:hover { 
  background: rgba(255,255,255,0.25); 
}
.project-body { 
  padding: 2rem; 
  flex-grow: 1;
}
.project-category { 
  font-family: monospace; 
  font-size: 0.75rem; 
  text-transform: uppercase; 
  letter-spacing: 0.1em; 
  color: var(--color-gold); 
  margin-bottom: 0.75rem; 
}
.project-title { 
  font-family: var(--font-display); 
  font-size: 1.75rem; 
  font-weight: 600; 
  margin: 0 0 0.75rem; 
}
.project-desc { 
  font-size: 1rem; 
  color: var(--muted-60); 
  margin: 0 0 1.5rem; 
}
.project-stack { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.5rem; 
}
.project-stack span {
  font-family: monospace; 
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted-60);
  background: var(--bg);
}
/* Expandable Case Study */
.project-case-study {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  padding: 0 2rem;
}
.project-card.expanded .project-case-study {
  max-height: 500px; /* arbitrary large max-height for transition */
  padding: 0 2rem 2rem;
}

/* Project Filters */
.filter-bar {
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.filter-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.875rem; 
  font-family: monospace;
  color: var(--muted-60);
  min-height: 44px;
  transition: all 0.2s;
}
.filter-btn:hover { 
  border-color: var(--color-gold); 
  color: var(--fg); 
}
.filter-btn.active { 
  background: var(--fg); 
  color: var(--bg); 
  border-color: var(--fg); 
}
.project-card.filtered-out { display: none; }
.project-card.filter-in { animation: fadeScaleIn 0.5s ease both; }
@keyframes fadeScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Services ---------- */
.services-grid { 
  display: grid; 
  gap: 2rem; 
}
@media (min-width: 768px) { 
  .services-grid { grid-template-columns: repeat(2, 1fr); } 
}
@media (min-width: 1280px) { 
  .services-grid { grid-template-columns: repeat(4, 1fr); } 
}
.service-card { 
  padding: 2rem; 
  height: 100%; 
}
.service-icon {
  width: 3.5rem; 
  height: 3.5rem;
  display: grid; 
  place-items: center;
  border-radius: 1rem;
  background: rgba(201,161,90,0.1);
  color: var(--color-gold);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}
.service-card h3 { 
  font-family: var(--font-display); 
  font-size: 1.25rem; 
  font-weight: 600; 
  margin: 0 0 0.75rem; 
}
.service-card p { 
  font-size: 1rem; 
  color: var(--muted-60); 
  margin: 0; 
}

/* ---------- Blog Section (#blog) - NEW ---------- */
#blog {
  padding: 8rem 0;
  border-top: 1px solid var(--border-soft);
}
.blog-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.blog-card {
  display: flex;
  flex-direction: column;
  padding: 0; /* Override glass-card padding if any */
}
.blog-card.is-hidden { display: none; }
.blog-empty-state {
  margin: 2rem 0 0;
  color: var(--muted-60);
  text-align: center;
}
.blog-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 1rem 1rem 0 0;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}
.blog-img-wrapper {
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
  position: relative;
}
.blog-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s;
}
.blog-card:hover .blog-img-overlay { opacity: 1; }
.blog-card-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.blog-category-tag {
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.blog-card-excerpt {
  color: var(--muted-60);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.reading-time, .blog-date {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--muted-50);
}

/* Blog Listing Page */
.blog-hero {
  padding: 10rem 0 5rem;
  text-align: center;
}
.blog-search {
  max-width: 500px;
  margin: 2rem auto;
  position: relative;
}
.blog-search input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  color: var(--fg);
  font-size: 1rem;
}
.blog-search input:focus {
  border-color: var(--color-gold);
  outline: none;
}
.blog-search i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-50);
}
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 4rem;
}
.blog-pagination .page-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.blog-pagination .page-btn.active {
  background: var(--color-gold);
  color: var(--color-ink);
  border-color: var(--color-gold);
}

/* Blog Post Page */
.post-header {
  padding: 10rem 0 4rem;
  text-align: center;
}
.post-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  color: var(--muted-60);
  font-family: monospace;
  font-size: 0.875rem;
  margin: 2rem 0;
}
.post-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.8;
}
.post-content h1, .post-content h2, .post-content h3 {
  font-family: var(--font-display);
  margin: 3rem 0 1.5rem;
}
.post-content p {
  margin-bottom: 1.5rem;
}
.post-content blockquote {
  border-left: 4px solid var(--color-gold);
  padding-left: 1.5rem;
  font-style: italic;
  font-size: 1.25rem;
  margin: 2rem 0;
  color: var(--muted-70);
}
.post-content pre {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border);
}
.post-share {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 4rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.related-posts {
  margin-top: 6rem;
}

/* ---------- Achievements Row (#achievements) - NEW ---------- */
#achievements {
  padding: 6rem 0;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
}
.achievements-strip {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}
@media (min-width: 1024px) {
  .achievements-strip {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
  }
}
.achievement-item {
  flex: 0 0 250px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}
.achievement-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  background: var(--border-soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: var(--color-gold);
}
.achievement-label {
  font-weight: 600;
  font-size: 1.125rem;
}

/* ---------- Newsletter Section (#newsletter) - NEW ---------- */
.newsletter-section {
  padding: 8rem 0;
  background: linear-gradient(135deg, rgba(201,161,90,0.1), transparent);
  text-align: center;
}
.newsletter-form {
  max-width: 500px;
  margin: 2rem auto 0;
  display: flex;
  gap: 0.5rem;
}
.newsletter-form input {
  flex-grow: 1;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  color: var(--fg);
  font-size: 1rem;
  outline: none;
}
.newsletter-form input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px var(--glow-gold);
}
@media (max-width: 428px) {
  .newsletter-form { flex-direction: column; }
}

/* ---------- Contact ---------- */
.contact-grid { 
  display: grid; 
  gap: 4rem; 
}
@media (min-width: 1024px) { 
  .contact-grid { grid-template-columns: 1fr 1.2fr; } 
}
.contact-grid h2 { 
  font-family: var(--font-display); 
  font-size: var(--text-h2); 
  font-weight: 600; 
  line-height: 1.2; 
  margin: 1rem 0 1.5rem; 
}
.contact-intro { 
  color: var(--muted-60); 
  margin: 0 0 3rem; 
  max-width: 28rem; 
}
.contact-methods { 
  display: flex; 
  flex-direction: column; 
  gap: 1.5rem; 
}
.contact-methods a { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
  font-size: 1rem; 
  transition: color 0.2s; 
}
.contact-methods a:hover { color: var(--color-gold); }
.contact-methods .icon-btn { 
  width: 2.75rem; 
  height: 2.75rem; 
}

.contact-form { 
  padding: 3rem; 
  display: flex; 
  flex-direction: column; 
  gap: 2rem; 
}
.form-group label {
  font-family: monospace; 
  font-size: 0.875rem; 
  text-transform: uppercase;
  letter-spacing: 0.05em; 
  color: var(--muted-50);
  display: block; 
  margin-bottom: 0.75rem;
}
.form-group input, .form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  padding: 0.75rem 0;
  color: var(--fg);
  font-family: inherit;
  font-size: 1.125rem;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form-group input:focus, .form-group textarea:focus { 
  border-color: var(--color-gold); 
}
.field-error { 
  font-size: 0.875rem; 
  color: #ef4444; 
  margin-top: 0.5rem; 
}
.form-hidden { 
  position: absolute; 
  left: -9999px; 
}
.form-submit {
  width: 100%;
  padding: 1rem;
  font-size: 1.125rem;
}
.form-status { 
  font-size: 1rem; 
  text-align: center; 
  margin-top: 1rem;
}
.form-status.success { color: #22c55e; }
.form-status.error { color: #ef4444; }

/* ---------- Testimonials ---------- */
.testimonial-carousel { 
  max-width: 56rem; 
  margin: 0 auto; 
  overflow: hidden; 
}
.testimonial-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.testimonial-slide { 
  flex: 0 0 100%; 
  padding: 0 1rem; 
}
.testimonial-card { 
  padding: 3rem; 
  text-align: center; 
}
.testimonial-stars { 
  color: var(--color-gold); 
  font-size: 1.25rem; 
  letter-spacing: 0.2em; 
  margin-bottom: 1.5rem; 
}
.testimonial-quote { 
  font-family: var(--font-display); 
  font-style: italic; 
  font-size: 1.5rem; 
  line-height: 1.6; 
  margin: 0 0 2rem; 
}
.testimonial-author { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 1rem; 
}
.testimonial-avatar {
  width: 3rem; 
  height: 3rem; 
  border-radius: 999px;
  background: rgba(201,161,90,0.15); 
  color: var(--color-gold);
  display: grid; 
  place-items: center; 
  font-weight: 600; 
  font-family: var(--font-display);
}
.testimonial-name { font-weight: 600; font-size: 1rem; text-align: left; }
.testimonial-role { font-size: 0.875rem; color: var(--muted-50); text-align: left; }

.testimonial-controls { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 1.5rem; 
  margin-top: 2rem; 
}
.testimonial-dots { display: flex; gap: 0.75rem; }
.testimonial-dot {
  width: 0.75rem; 
  height: 0.75rem; 
  border-radius: 999px;
  background: var(--border);
  transition: background-color 0.2s, transform 0.2s;
  min-height: 44px; /* touch */
  min-width: 44px;
  display: grid;
  place-items: center;
}
.testimonial-dot::before {
  content: '';
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: inherit;
}
.testimonial-dot.active::before { 
  background: var(--color-gold); 
  transform: scale(1.3); 
}

/* ---------- FAQ ---------- */
.faq-list { 
  display: flex; 
  flex-direction: column; 
  gap: 1.25rem; 
  max-width: 56rem; 
  margin: 0 auto;
}
.faq-item {
  padding: 0;
  overflow: hidden;
  border-radius: 1rem;
  transition: all 0.3s ease;
}
.faq-item:hover { 
  border-color: rgba(201,161,90,0.4); 
}
.faq-item[open] {
  border-color: var(--color-gold);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06), 0 0 0 1px rgba(201,161,90,0.1) inset;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  font-weight: 600;
  font-size: 1.125rem;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-num {
  flex-shrink: 0;
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--color-gold);
  opacity: 0.8;
}
.faq-q { 
  flex: 1; 
  line-height: 1.45; 
  transition: color 0.2s; 
}
.faq-item:hover .faq-q { color: var(--color-gold); }
.faq-item[open] .faq-q { color: var(--color-gold-light); }

.faq-chevron-wrap {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.faq-item[open] .faq-chevron-wrap {
  background: rgba(201,161,90,0.15);
  border-color: var(--color-gold);
}
.faq-chevron { 
  color: var(--color-gold); 
  transition: transform 0.4s ease; 
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}
.faq-item[open] .faq-answer { grid-template-rows: 1fr; }
.faq-answer > p {
  overflow: hidden;
  margin: 0;
  padding: 0 2rem 1.5rem 4rem;
  color: var(--muted-70);
  font-size: 1rem;
  line-height: 1.8;
}

/* ---------- Footer (Rich 4-column) ---------- */
.site-footer { 
  border-top: 1px solid var(--border-soft); 
  padding: 6rem 0 3rem; 
  background: var(--surface);
}
.footer-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  margin-bottom: 4rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--fg);
}
.footer-col p {
  color: var(--muted-60);
  margin-bottom: 1.5rem;
}
.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-links-col a {
  color: var(--muted-60);
  transition: color 0.2s;
  padding: 0.25rem 0; /* min touch area consideration */
}
.footer-links-col a:hover {
  color: var(--color-gold);
}
.footer-bottom {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: space-between;
  gap: 1.5rem; 
  font-size: 0.875rem; 
  color: var(--muted-50);
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
@media (min-width: 768px) { 
  .footer-bottom { flex-direction: row; } 
}
.footer-socials { 
  display: flex; 
  align-items: center; 
  gap: 1.5rem; 
}
.footer-socials a:hover { color: var(--color-gold); }

/* ---------- Floating WhatsApp ---------- */
.whatsapp-btn {
  position: fixed; 
  bottom: 2rem; 
  right: 2rem; 
  z-index: 50;
  width: 4rem; 
  height: 4rem;
  border-radius: 999px;
  background: #25D366;
  color: white;
  display: grid; 
  place-items: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: 2rem;
}
.whatsapp-btn:hover { 
  transform: scale(1.1) translateY(-5px); 
}
@media (max-width: 767px) {
  .whatsapp-btn { bottom: 5rem; right: 1rem; } /* Avoid nav-bottom */
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed; 
  bottom: 7rem; 
  right: 2rem; 
  z-index: 49;
  width: 3.5rem; 
  height: 3.5rem;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: grid; 
  place-items: center;
  color: var(--fg);
  opacity: 0; 
  visibility: hidden; 
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.back-to-top.visible { 
  opacity: 1; 
  visibility: visible; 
  transform: translateY(0); 
}
.back-to-top:hover { 
  border-color: var(--color-gold); 
  color: var(--color-gold);
}
@media (max-width: 767px) {
  .back-to-top { bottom: 9rem; right: 1rem; }
}

/* ---------- Preloader & Scroll Progress ---------- */
body.preload-lock { overflow: hidden; }
.preloader {
  position: fixed; 
  inset: 0; 
  z-index: 200;
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  gap: 1.5rem;
  background: var(--bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.hidden { 
  opacity: 0; 
  visibility: hidden; 
  pointer-events: none; 
}
.preloader-mark { 
  font-family: var(--font-display); 
  font-size: 2rem; 
  font-weight: 600; 
  letter-spacing: -0.01em; 
}
.preloader-bar { 
  width: 240px; 
  height: 3px; 
  background: var(--border); 
  border-radius: 999px; 
  overflow: hidden; 
}
.preloader-bar span {
  display: block; 
  height: 100%; 
  width: 0%;
  background: var(--color-gold);
  transition: width 0.3s ease;
}

.scroll-progress {
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  height: 4px; 
  z-index: 60;
  background: transparent;
}
.scroll-progress span {
  display: block; 
  height: 100%; 
  width: 0%;
  background: linear-gradient(to right, var(--color-gold), var(--color-gold-light));
  transition: width 0.1s linear;
}

/* ---------- Reveal on Scroll ---------- */
.reveal { 
  opacity: 0; 
  transform: translateY(30px); 
  transition: opacity 0.8s ease, transform 0.8s ease; 
}
.reveal.in-view { 
  opacity: 1; 
  transform: translateY(0); 
}
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ---------- Tilt Cards ---------- */
[data-tilt] { 
  transform-style: preserve-3d; 
  transition: transform 0.2s ease-out, box-shadow 0.4s; 
  will-change: transform; 
}
[data-tilt]:hover { 
  box-shadow: 0 30px 60px rgba(0,0,0,0.15); 
}

/* ---------- Copy Button ---------- */
.contact-method-row { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
  flex-wrap: wrap; 
}
.copy-btn {
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem;
  font-size: 0.75rem; 
  font-family: monospace; 
  text-transform: uppercase; 
  letter-spacing: 0.05em;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted-50);
  transition: all 0.2s;
  min-height: 44px; /* Touch */
}
.copy-btn:hover { 
  border-color: var(--color-gold); 
  color: var(--color-gold); 
}
.copy-btn.copied { 
  border-color: #22c55e; 
  color: #22c55e; 
}

/* ---------- Proficiency Bars ---------- */
.proficiency-grid { 
  display: grid; 
  gap: 2rem; 
  max-width: 48rem; 
}
.proficiency-label { 
  display: flex; 
  justify-content: space-between; 
  font-size: 1rem; 
  margin-bottom: 0.75rem; 
}
.proficiency-pct { 
  color: var(--color-gold); 
  font-family: monospace; 
}
.proficiency-track {
  height: 10px; 
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.proficiency-fill {
  height: 100%; 
  border-radius: 999px;
  background: linear-gradient(to right, var(--color-gold), var(--color-gold-light));
  transition: width 1.5s cubic-bezier(0.2, 1, 0.3, 1);
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed; 
  top: 6rem; 
  right: 2rem; 
  z-index: 100;
  display: flex; 
  flex-direction: column; 
  gap: 0.75rem;
  pointer-events: none;
}
.toast {
  background: var(--fg); 
  color: var(--bg);
  font-size: 0.9375rem; 
  font-weight: 500;
  padding: 1rem 1.5rem; 
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  opacity: 0; 
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { 
  opacity: 1; 
  transform: translateY(0); 
}

/* ---------- Mini-game: Debug Run (Existing preserved) ---------- */
.game-intro { color: var(--muted-60); max-width: 42rem; margin-top: 1.5rem; font-size: 1.125rem; }
.game-card { padding: 2rem; }
.game-hud { display: flex; flex-wrap: wrap; gap: 2rem; font-family: monospace; font-size: 1rem; color: var(--muted-60); margin-bottom: 1rem; }
.game-hud span { color: var(--color-gold); font-weight: 600; }
.game-hud-mode { margin-left: auto; }
.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.game-difficulty { display: flex; gap: 0.5rem; }
.game-diff-btn {
  font-family: monospace;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted-70);
  transition: all 0.2s;
  min-height: 44px;
}
.game-diff-btn:hover { border-color: var(--color-gold); color: var(--fg); }
.game-diff-btn.active { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-ink); }
.game-diff-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.game-toolbar-actions { display: flex; gap: 0.75rem; }
.game-share-btn { margin-top: 1rem; }
.game-share-btn.hidden { display: none; }
.game-canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(201,161,90,0.08), transparent);
}
#game-canvas { display: block; width: 100%; height: auto; aspect-ratio: 700 / 260; touch-action: manipulation; cursor: pointer; }
.game-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,12,16,0.7);
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.game-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.game-overlay-inner { text-align: center; color: #fff; padding: 2rem; }
.game-overlay-title { font-family: var(--font-display); font-size: 2.25rem; font-weight: 600; margin: 0 0 0.75rem; }
.game-overlay-text { font-size: 1.125rem; color: rgba(255,255,255,0.8); margin: 0 0 1.5rem; }
.game-overlay-text kbd {
  font-family: monospace; font-size: 0.875rem;
  background: rgba(255,255,255,0.15);
  padding: 0.25rem 0.6rem; border-radius: 0.4rem;
  border: 1px solid rgba(255,255,255,0.3);
}
.game-hint { text-align: center; font-size: 0.875rem; color: var(--muted-50); margin: 1rem 0 0; }
.hero-game-hint { margin-top: 1.5rem; }
.hero-game-hint a {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-family: monospace;
  color: var(--muted-60);
  padding: 0.75rem 1.25rem;
  border: 1px dashed var(--border);
  border-radius: 999px;
  transition: all 0.2s;
}
.hero-game-hint a:hover { border-color: var(--color-gold); color: var(--color-gold); }
.hero-game-hint .arrow { transition: transform 0.2s; }
.hero-game-hint a:hover .arrow { transform: translateX(5px); }

/* ---------- Print Styles ---------- */
@media print {
  .site-header, .site-footer, .nav-bottom, .mobile-menu, 
  .back-to-top, .whatsapp-btn, .game-canvas-wrap, 
  .game-toolbar, .hero-game-hint, .preloader, .scroll-progress {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
    padding: 0 !important;
  }
  * {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  a { text-decoration: underline; color: black; }
  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
  img { page-break-inside: avoid; }
  .glass-card, .project-card, .service-card {
    border: 1px solid #ddd !important;
    background: transparent !important;
    backdrop-filter: none !important;
    page-break-inside: avoid;
  }
  .container-x { max-width: 100% !important; padding: 0 !important; }
}

/* ---------- Prefers Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
