/* ============================================
   Shinkai — Portfolio Dark Theme v2
   Performance-optimized + enhanced glow
   ============================================ */

/* ----- CSS Custom Properties ----- */
:root {
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --font-arabic:  'Cairo', Arial, sans-serif;

  --bg-primary: #07090e;
  --bg-secondary: #09111d;
  --bg-surface: #0d1625;
  --bg-elevated: #12192a;
  --bg-glass: rgba(7, 9, 14, 0.90);

  --accent: #c9a84c;
  --accent-light: #e8c96a;
  --accent-dark: #8a6a20;
  --accent-glow: rgba(201, 168, 76, 0.40);
  --accent-subtle: rgba(201, 168, 76, 0.12);
  --accent-glow-soft: rgba(201, 168, 76, 0.10);
  --accent-blue: #6b4e1e;
  --accent-blue-glow: rgba(107, 78, 30, 0.4);

  --text-primary: #eaedf5;
  --text-secondary: #7d8898;
  --text-muted: #3a4a60;
  --text-card: #c9d0e0;

  --border: rgba(255, 255, 255, 0.04);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(201, 168, 76, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Reset (with performance hints) ----- */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

/* ----- Base ----- */
html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #07090e 0%, #0b111d 50%, #07090e 100%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   AURORA LAYER — cinematic ambient background
   ============================================ */

.aurora-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;          /* above base gradient, below all content */
  overflow: hidden;
}

/* ── Blob shared base ── */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform, opacity;
  /* GPU-accelerated — uses only transform and opacity */
}

/* ── Blob 1 — upper left — warm gold ── */
.aurora-blob-1 {
  width: 70vw;
  height: 60vh;
  top: -20vh;
  left: -20vw;
  background: radial-gradient(
    ellipse at center,
    rgba(201, 168, 76, 0.07) 0%,
    rgba(201, 168, 76, 0.03) 45%,
    transparent 70%
  );
  animation: auroraFloat1 55s ease-in-out infinite alternate;
}

/* ── Blob 2 — lower right — deep navy ── */
.aurora-blob-2 {
  width: 80vw;
  height: 70vh;
  bottom: -25vh;
  right: -25vw;
  background: radial-gradient(
    ellipse at center,
    rgba(9, 17, 29, 0.18) 0%,
    rgba(107, 78, 30, 0.04) 40%,
    transparent 70%
  );
  animation: auroraFloat2 65s ease-in-out infinite alternate;
}

/* ── Blob 3 — center right — warm amber (optional depth) ── */
.aurora-blob-3 {
  width: 50vw;
  height: 45vh;
  top: 30vh;
  right: -10vw;
  background: radial-gradient(
    ellipse at center,
    rgba(107, 78, 30, 0.05) 0%,
    rgba(201, 168, 76, 0.02) 40%,
    transparent 68%
  );
  animation: auroraFloat3 48s ease-in-out infinite alternate;
}

/* ── Keyframes ── */

/* Blob 1 — drifts gently down-right, barely moves */
@keyframes auroraFloat1 {
  0% {
    transform: translate(0px, 0px) scale(1.00);
    opacity: 1;
  }
  33% {
    transform: translate(18px, 12px) scale(1.02);
    opacity: 0.85;
  }
  66% {
    transform: translate(8px, 22px) scale(1.01);
    opacity: 0.95;
  }
  100% {
    transform: translate(24px, 16px) scale(1.03);
    opacity: 0.80;
  }
}

/* Blob 2 — drifts gently up-left */
@keyframes auroraFloat2 {
  0% {
    transform: translate(0px, 0px) scale(1.00);
    opacity: 1;
  }
  33% {
    transform: translate(-20px, -14px) scale(1.02);
    opacity: 0.88;
  }
  66% {
    transform: translate(-10px, -24px) scale(1.01);
    opacity: 0.92;
  }
  100% {
    transform: translate(-28px, -18px) scale(1.03);
    opacity: 0.78;
  }
}

/* Blob 3 — very subtle diagonal drift */
@keyframes auroraFloat3 {
  0% {
    transform: translate(0px, 0px) scale(1.00);
    opacity: 0.9;
  }
  50% {
    transform: translate(-15px, 18px) scale(1.02);
    opacity: 0.75;
  }
  100% {
    transform: translate(-22px, 10px) scale(1.01);
    opacity: 0.85;
  }
}

/* Mobile: reduce aurora GPU load */
@media (max-width: 768px) {
  .aurora-blob {
    filter: blur(80px);
    opacity: 0.7;
  }

  .aurora-blob-3 {
    display: none;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .aurora-blob {
    animation: none;
  }
}

/* Stars canvas — crisp pixel stars behind all content */
#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  display: block;
}

/* Ensure sections sit above the stars */
.hero,
#portfolio,
#about,
#contact,
.cta-section,
footer,
.project-card {
  position: relative;
  z-index: 3;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.85; }

:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

button:focus-visible, .btn:focus-visible, .filter-btn:focus-visible,
.like-btn:focus-visible, .project-card:focus-visible,
.project-modal-close:focus-visible, #scroll-top-btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

/* ============================================
   FONT SYSTEM — DM Serif Display + Source Sans 3
   ============================================ */

/* BASE — everything defaults to Source Sans 3 */
*,
body,
p,
span,
a,
li,
input,
textarea,
select,
label,
button,
.nav-link,
.filter-btn,
.tool-badge,
.category-chip,
.skill-pill,
.project-description,
.section-tag,
.footer,
.form-group,
.contact-info,
.about-text {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
}

/* BODY defaults */
body {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

/* DISPLAY — headings get DM Serif Display */
h1,
h2,
.hero-title,
.section-title,
.modal-title,
.loader-logo,
.logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* h3 stays Source Sans 3 — it's a UI element, not a display heading */
h3,
.project-title,
.card-title,
.about-card-title {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* NAV LINKS */
.nav-link {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.nav-link:hover,
.nav-link.active {
  font-weight: 600;
}

/* BUTTONS */
.btn-primary,
.btn-secondary,
button {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* FILTER PILLS & CATEGORY CHIPS */
.filter-btn,
.category-chip,
.section-tag {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* TOOL BADGES & SKILL PILLS */
.tool-badge,
.skill-pill {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* HERO EYEBROW / SUBTITLE */
.hero-subtitle,
.hero-tag,
.section-description {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 300;
  line-height: 1.7;
}

/* ITALIC ACCENT — use italic DM Serif Display for highlighted words in headings */
.display-italic,
h1 em,
h2 em {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  color: #c9a84c;
}

/* FOOTER */
.footer,
.footer-copy {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 300;
}

/* FORM INPUTS */
input,
textarea,
select {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
}

/* TYPOGRAPHY SCALE — font-size only */
body, p { font-size: 1rem; }

.tool-badge,
.skill-pill,
.footer-copy { font-size: 0.82rem; }

/* ARABIC / RTL — Cairo only */

[lang="ar"],
[dir="rtl"],
.ar-text,
.arabic-content,
.arabic-section,
.arabic-section h1,
.arabic-section h2,
.arabic-section h3,
.arabic-section p,
.arabic-section span,
.arabic-section button {
  font-family: 'Cairo', Arial, sans-serif;
  direction: rtl;
  text-align: right;
}

/* Arabic body text */
[lang="ar"] p,
[dir="rtl"] p,
.ar-body {
  font-family: 'Cairo', sans-serif;
  font-weight: 400;
  line-height: 1.85;
}

/* Arabic headings */
[lang="ar"] h1,
[lang="ar"] h2,
[dir="rtl"] h1,
[dir="rtl"] h2,
.ar-heading {
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  line-height: 1.3;
}

/* Arabic subtext */
[lang="ar"] h3,
[dir="rtl"] h3,
.ar-subheading {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
}

/* Arabic UI labels */
[lang="ar"] button,
[dir="rtl"] button,
[lang="ar"] .category-chip,
.ar-label {
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
}

/* Arabic scale */
[lang="ar"] h1,
[dir="rtl"] h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

[lang="ar"] h2,
[dir="rtl"] h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

[lang="ar"] p,
[dir="rtl"] p {
  font-size: 1rem;
}

.gradient-text {
  background: linear-gradient(120deg, #eaedf5 0%, #e8c96a 45%, #c9a84c 70%, #6b4e1e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent-glow-text {
  text-shadow:
    0 0 40px rgba(201, 168, 76, 0.35),
    0 0 80px rgba(201, 168, 76, 0.15);
}

/* ----- Container ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ----- Buttons (with glow + animations) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary {
  background: #c9a84c;
  color: #07090e;
  font-weight: 700;
  border: none;
  transition: all 0.25s ease;
  animation: btnPulse 3s ease-in-out infinite;
}
.btn-primary:hover {
  background: #e8c96a;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.30);
  opacity: 1;
  animation: none;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
  50%       { box-shadow: 0 0 20px 4px rgba(201, 168, 76, 0.20); }
}

.btn-secondary {
  background: transparent;
  color: #eaedf5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s ease;
}
.btn-secondary:hover {
  border-color: rgba(201, 168, 76, 0.50);
  color: #c9a84c;
  transform: translateY(-2px);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  opacity: 1;
}

.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* Arrow slide animation on hover */
.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn .btn-arrow {
  display: inline-block;
  transition: transform var(--transition);
}

/* ============================================
   NAVBAR (glass, performance-optimized)
   ============================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background var(--transition-slow), padding var(--transition-slow), border-color var(--transition-slow);
  will-change: background, padding;
}

nav.scrolled {
  background: rgba(7, 9, 14, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid #12192a;
  padding: 12px 0;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

footer .logo {
  font-size: 1.8rem;
}

nav .logo {
  font-size: 1.65rem;
  align-items: center;
  gap: 10px;
  transition: filter 0.25s ease, transform 0.25s ease;
}

nav .logo .nav-logo-img {
  height: 30px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.45));
  transition: filter 0.25s ease;
}

nav .logo:hover .nav-logo-img {
  filter: drop-shadow(0 0 14px rgba(201, 168, 76, 0.80));
}

nav .logo:hover {
  filter: brightness(1.15);
  transform: scale(1.02);
}

.logo-shin {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  color: #c9a84c;
  text-shadow:
    0 0 12px rgba(201, 168, 76, 0.80),
    0 0 28px rgba(201, 168, 76, 0.45),
    0 0 55px rgba(201, 168, 76, 0.20);
}

.logo-kai {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  color: #eaedf5;
  text-shadow:
    0 0 12px rgba(234, 237, 245, 0.60),
    0 0 28px rgba(234, 237, 245, 0.25),
    0 0 55px rgba(234, 237, 245, 0.10);
}

.logo:hover .logo-shin {
  text-shadow:
    0 0 16px rgba(201, 168, 76, 1.00),
    0 0 36px rgba(201, 168, 76, 0.60),
    0 0 70px rgba(201, 168, 76, 0.30);
  transition: text-shadow 0.3s ease;
}

.logo:hover .logo-kai {
  text-shadow:
    0 0 16px rgba(234, 237, 245, 0.80),
    0 0 36px rgba(234, 237, 245, 0.40),
    0 0 70px rgba(234, 237, 245, 0.15);
  transition: text-shadow 0.3s ease;
}

.navbar-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--accent-glow));
  transition: transform var(--transition);
}

.logo:hover .navbar-logo-img {
  transform: scale(1.1) rotate(5deg);
}

.hero-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  animation: logoFloat 5s ease-in-out infinite alternate;
}

.hero-logo-img {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 0 25px var(--accent-glow));
}

@keyframes logoFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.admin-login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.admin-login-logo-img {
  width: 80px;
  height: auto;
  filter: drop-shadow(0 0 15px var(--accent-glow));
}

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

/* Icon size */
.nav-links a i,
.nav-links a svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
  color: inherit;
  flex-shrink: 0;
}

/* Active state — icon inherits gold color */
.nav-links a.active i,
.nav-links a.active svg {
  color: #c9a84c;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-light);
  background: var(--accent-subtle);
  opacity: 1;
}

.nav-links a.active::after { transform: scaleX(1); }

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

/* Mobile Menu */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: none;
  padding: 80px 24px 32px;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mobile-menu-panel.open { transform: translateX(0); }

.mobile-menu-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-radius: 0;
  color: #5a6a80;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  width: auto;
  margin-bottom: 0;
}

.mobile-menu-panel a:hover,
.mobile-menu-panel a.active {
  color: #c9a84c;
  background: none;
}

.mobile-menu-panel a svg,
.mobile-menu-panel a i {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.mobile-menu-panel .menu-socials {
  position: absolute;
  bottom: 40px;
  display: flex;
  gap: 16px;
}

.mobile-menu-panel .menu-socials a {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a6a80;
  padding: 0;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  font-style: normal;
}

.mobile-menu-panel .menu-socials a:hover {
  color: #c9a84c;
}

/* ============================================
   HERO (enhanced glow)
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 110px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Dual gradient with enhanced glow */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 168, 76, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(107, 78, 30, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 60%, rgba(201, 168, 76, 0.1) 0%, transparent 40%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 25% 20%, rgba(232, 201, 106, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 75% 80%, rgba(107, 78, 30, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 30% 50% at 50% 50%, rgba(232, 201, 106, 0.02) 0%, transparent 50%);
  animation: ambientGlow 12s ease-in-out infinite alternate;
}

/* Accent glow orbs */
.hero-glow-1,
.hero-glow-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.4;
}

.hero-glow-1 {
  width: 400px;
  height: 400px;
  background: rgba(201, 168, 76, 0.18);
  top: -100px;
  right: -100px;
  animation: floatGlow 8s ease-in-out infinite alternate;
}

.hero-glow-2 {
  width: 300px;
  height: 300px;
  background: rgba(107, 78, 30, 0.15);
  bottom: -50px;
  left: -80px;
  animation: floatGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.2); }
}

@keyframes ambientGlow {
  0% { opacity: 0.4; transform: translate(0, 0) scale(1); }
  50% { opacity: 0.7; transform: translate(15px, -10px) scale(1.03); }
  100% { opacity: 0.5; transform: translate(-10px, 15px) scale(0.98); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s 0.1s ease-out both;
  text-shadow: 0 0 60px var(--accent-glow);
}

.hero h1 .gradient-text { display: block; }

.hero-highlight {
  position: relative;
  display: inline-block;
}

/* Animated gold underline */
.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1.5px;
  background: linear-gradient(90deg, #c9a84c, #e8c96a);
  border-radius: 2px;
  animation: underlineReveal 1s ease 0.8s forwards;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.6);
}

@keyframes underlineReveal {
  from { width: 0%; }
  to   { width: 100%; }
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 36px;
  animation: fadeInUp 0.6s 0.2s ease-out both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s 0.3s ease-out both;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Ambient gold glow orb behind logo */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 500px;
  height: 500px;
  background: radial-gradient(
    ellipse at center,
    rgba(201, 168, 76, 0.07) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  animation: fadeInUp 1s 0.8s ease-out both;
}

.scroll-indicator {
  width: 20px;
  height: 32px;
  border: 2px solid var(--text-muted);
  border-radius: 10px;
  position: relative;
}

.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--accent-light);
  border-radius: 2px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.3; }
}

/* ============================================
   SECTIONS (with glow accents)
   ============================================ */
section { padding: 80px 0; content-visibility: auto; contain-intrinsic-size: 600px; }

/* Ambient glow behind each section */
#featured, #portfolio, #about, #contact {
  position: relative;
  overflow: hidden;
}

#featured::before, #portfolio::before, #about::before, #contact::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

#featured::before {
  background: radial-gradient(ellipse 60% 40% at 20% 50%, rgba(232, 201, 106, 0.05) 0%, transparent 50%);
}

#portfolio::before {
  background: radial-gradient(ellipse 50% 50% at 80% 30%, rgba(107, 78, 30, 0.05) 0%, transparent 50%);
}

#about::before {
  background: radial-gradient(ellipse 50% 40% at 30% 50%, rgba(232, 201, 106, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse 30% 50% at 70% 80%, rgba(107, 78, 30, 0.03) 0%, transparent 50%);
}

#contact::before {
  background: radial-gradient(ellipse 40% 50% at 50% 90%, rgba(107, 78, 30, 0.05) 0%, transparent 50%),
              radial-gradient(ellipse 30% 30% at 20% 20%, rgba(232, 201, 106, 0.03) 0%, transparent 50%);
}

/* Ensure section content sits above the glow */
.project-grid, .about-grid, .contact-grid,
.filter-bar, .section-header {
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: rgba(201, 168, 76, 0.07);
  color: #c9a84c;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  border: 1px solid rgba(201, 168, 76, 0.18);
  box-shadow: 0 0 20px var(--accent-glow-soft);
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-weight: 300;
  font-size: 1rem;
}

/* Section accent line */
.section-accent {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ============================================
   PROJECT CARDS (enhanced glow)
   ============================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: #0d1625;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #12192a;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
  transition:
    transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  will-change: transform;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), transparent 50%, rgba(201, 168, 76, 0.15));
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 168, 76, 0.22);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(201, 168, 76, 0.08),
    0 0 30px rgba(201, 168, 76, 0.06);
}

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

.project-card > * { position: relative; z-index: 1; }

.project-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.85;
}

.project-card:hover .project-thumb img {
  transform: translateY(-3px) scale(1.03);
  opacity: 1;
}

.project-thumb .play-icon {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #c9a84c;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.30);
}

.play-icon {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.project-thumb .play-icon svg {
  width: 20px;
  height: 20px;
  fill: #07090e;
  margin-left: 3px;
}

.project-card:hover .play-icon {
  transform: scale(1.10);
  box-shadow:
    0 0 20px rgba(201, 168, 76, 0.50),
    0 0 40px rgba(201, 168, 76, 0.20);
}

.project-body {
  padding: 20px 24px 24px;
}

.project-body .project-category {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.project-body .project-category span {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c9a84c;
  font-weight: 600;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.2);
  text-shadow: 0 0 20px var(--accent-glow-soft);
}

.project-body h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: #c9d0e0;
  transition: color 0.2s ease;
}

.project-card:hover .project-body h3 {
  color: #c9a84c;
}

.project-body p {
  font-size: 1rem;
  color: #3a4a60;
  font-weight: 300;
  margin-bottom: 14px;
  line-height: 1.5;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tools span {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  background: #07090e;
  color: #7d8898;
  border: 1px solid #1a2535;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  margin-bottom: 40px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid #1a2535;
  background: transparent;
  color: #3a4a60;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.filter-btn i,
.filter-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
  flex-shrink: 0;
  color: inherit;
}

.filter-btn:hover {
  border-color: rgba(201, 168, 76, 0.35);
  color: #c9a84c;
  background: rgba(201, 168, 76, 0.06);
}

.filter-btn.active {
  background: #c9a84c;
  border-color: #c9a84c;
  color: #07090e;
  font-weight: 700;
  box-shadow:
    0 2px 12px rgba(201, 168, 76, 0.25),
    0 0 25px rgba(201, 168, 76, 0.15);
  transform: translateY(-1px);
}

.filter-btn.active i,
.filter-btn.active svg {
  color: #07090e;
}

.filter-btn.active:hover {
  background: #e8c96a;
  border-color: #e8c96a;
  box-shadow:
    0 4px 20px rgba(201, 168, 76, 0.35),
    0 0 35px rgba(201, 168, 76, 0.20);
}

/* ============================================
   PROJECT MODAL
   ============================================ */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.project-modal.open {
  opacity: 1;
  pointer-events: all;
}

.project-modal-content {
  max-width: 800px;
  width: 100%;
  background: #0d1625;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid #1a2535;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-slow);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.06);
}

.project-modal.open .project-modal-content {
  transform: scale(1) translateY(0);
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(18, 25, 42, 0.80);
  border: 1px solid #1a2535;
  color: #7d8898;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.project-modal-close:hover {
  background: rgba(201, 168, 76, 0.10);
  color: #c9a84c;
  border-color: rgba(201, 168, 76, 0.30);
}

.project-modal-video {
  aspect-ratio: 16 / 9;
  background: #000;
}

.project-modal-video iframe,
.project-modal-video video {
  width: 100%;
  height: 100%;
  border: none;
}

.project-modal-info {
  padding: 32px;
}

.project-modal-info h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.project-modal-info .project-category {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-modal-info .project-category span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c9a84c;
  font-weight: 600;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.project-modal-info .description {
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* ============================================
   ABOUT PAGE (glass with glow)
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 40px;
  align-items: start;
}

.glass-card {
  background: #0d1625;
  border: 1px solid #12192a;
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  border-color: rgba(201, 168, 76, 0.3);
  box-shadow: 0 0 30px var(--accent-glow-soft);
}

.glass-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.glass-card h3 .gradient-text { display: inline; }

.glass-card p {
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.8;
  font-size: 0.95rem;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-grid span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #7d8898;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  cursor: default;
}

.skills-grid span:hover {
  border-color: rgba(201, 168, 76, 0.35);
  color: #c9a84c;
  background: rgba(201, 168, 76, 0.06);
}

.skills-grid span svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.8;
  color: inherit;
}

/* ===== HERO STATS STRIP ===== */
.hero-stats {
  position: relative;
  z-index: 3;
  padding: 40px 0 64px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)) padding-box,
    linear-gradient(180deg, rgba(201, 168, 76, 0.40), rgba(255, 255, 255, 0.07) 40%, rgba(255, 255, 255, 0.04)) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(8px);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(201, 168, 76, 0.12);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, rgba(232, 201, 106, 0.20), rgba(201, 168, 76, 0.06));
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: #c9a84c;
  box-shadow: inset 0 0 14px rgba(201, 168, 76, 0.15);
  transition: box-shadow var(--transition);
}

.stat-card:hover .stat-icon {
  box-shadow: inset 0 0 16px rgba(201, 168, 76, 0.22), 0 0 12px rgba(201, 168, 76, 0.18);
}

.stat-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.stat-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stat-num {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #c9a84c;
  text-shadow: 0 0 14px rgba(201, 168, 76, 0.35);
}

.stat-label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7d8898;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cta-section {
  position: relative;
  padding: 120px 24px;
  text-align: center;
  overflow: hidden;
}

/* Cinematic background glow */
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(
    ellipse at center,
    rgba(201, 168, 76, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-eyebrow {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c9a84c;
}

.cta-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #eaedf5;
}

.cta-sub {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  color: #7d8898;
  line-height: 1.65;
  max-width: 480px;
}

.cta-btn {
  margin-top: 8px;
  padding: 14px 36px;
  font-size: 0.92rem;
  font-weight: 700;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.form-card h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.form-card > .subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 28px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #1a2535;
  background: #0d1625;
  color: #eaedf5;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #3a4a60;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(201, 168, 76, 0.50);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.07);
}

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

.form-group .error-text {
  color: #f87171;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form-group.has-error input,
.form-group.has-error textarea { border-color: #f87171; }
.form-group.has-error .error-text { display: block; }

.form-error-banner {
  display: none;
  color: #f87171;
  font-size: 0.9rem;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
}

/* Success state */
.success-state { display: none; text-align: center; padding: 40px 20px; }

.success-state .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-state .icon svg { width: 30px; height: 30px; stroke: #10b981; }

.success-state h3 { font-size: 1.3rem; margin-bottom: 8px; }
.success-state p { color: var(--text-secondary); font-weight: 300; max-width: 360px; margin: 0 auto; }

/* Contact Card */
.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 30px var(--accent-glow-soft);
}

.contact-card h3 { font-size: 1.15rem; margin-bottom: 24px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.contact-item:last-child { margin-bottom: 0; }

.contact-item .icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(201, 168, 76, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
  border: 1px solid rgba(201, 168, 76, 0.18);
}

.contact-item:hover .icon-box {
  background: rgba(201, 168, 76, 0.14);
}

.contact-item .icon-box svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-light);
}

.contact-item .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: 2px;
}

.contact-item a {
  font-size: 0.92rem;
  word-break: break-all;
}

.contact-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  color: #3a4a60;
  margin-top: 16px;
  font-weight: 400;
}

.contact-trust svg {
  stroke: #c9a84c;
  flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: #07090e;
  border-top: 1px solid #12192a;
  padding: 40px 0;
  text-align: center;
  margin-top: auto;
}

footer .social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

footer .social-links a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #0d1625;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid #1a2535;
  transition: all 0.2s ease;
}

footer .social-links a:hover {
  border-color: rgba(201, 168, 76, 0.35);
  background: rgba(201, 168, 76, 0.07);
  color: var(--accent-light);
  transform: translateY(-2px);
  opacity: 1;
}

footer .social-links svg { width: 17px; height: 17px; }
footer p { color: var(--text-muted); font-size: 0.82rem; }

.footer-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 24px 48px;
  text-align: center;
}

.footer-cta-text {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  font-style: italic;
  color: #eaedf5;
  letter-spacing: -0.02em;
}

.footer-cta-btn {
  padding: 11px 28px;
  font-size: 0.85rem;
  font-weight: 700;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: #12192a;
  margin-bottom: 32px;
}

/* ============================================
   SCROLL-TO-TOP BUTTON
   ============================================ */
#scroll-top-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #c9a84c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none;
  transition: all 0.2s ease;
}

#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

#scroll-top-btn:hover {
  background: #c9a84c;
  color: #07090e;
  transform: translateY(-3px) scale(1.05);
}

#scroll-top-btn svg {
  width: 20px;
  height: 20px;
}

/* Section scroll offset for fixed nav */
section[id] {
  scroll-margin-top: 80px;
}

/* ============================================
   SECTION DIVIDERS (cinematic glow lines)
   ============================================ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #c9a84c 40%, #6b4e1e 65%, transparent 100%);
  position: relative;
  animation: dividerPulse 4s ease-in-out infinite;
}

.section-divider::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #c9a84c;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.5);
  animation: dividerGlow 4s ease-in-out infinite;
}

@keyframes dividerPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes dividerGlow {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow), 0 0 60px var(--accent-glow-soft); width: 60px; }
  50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 100px var(--accent-glow-soft); width: 100px; }
}

/* ============================================
   LIKE BUTTON (animated heart)
   ============================================ */
.like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  transition: all var(--transition);
  position: relative;
  width: 30px;
  height: 30px;
}

.like-btn svg {
  width: 14px;
  height: 14px;
  transition: all var(--transition);
}

.like-btn:hover {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.like-btn.liked {
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.like-btn.liked:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Like button positioned on thumbnail top-left */
.like-btn-thumb {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.1);
}

.like-btn-thumb:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.like-btn-thumb.liked {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
}

.like-btn-thumb.liked:hover {
  background: rgba(239, 68, 68, 0.35);
}

/* Like pop animation */
@keyframes likePop {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.like-pop svg {
  animation: likePop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Large like button for modal (bottom of info panel) */
.like-btn-lg {
  font-size: 0.9rem;
  margin-top: 20px;
  width: 38px;
  height: 38px;
}

.like-btn-lg svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
#cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: #c9a84c;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s ease;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.6);
}

#cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.15s ease;
}

#cursor-ring.hover {
  width: 48px; height: 48px;
  border-color: rgba(201, 168, 76, 0.6);
  background: rgba(201, 168, 76, 0.04);
}

@media (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ============================================
   LOADER
   ============================================ */
/* ============================================
   LOADER — cinematic premium loading screen
   ============================================ */

/* === OVERLAY === */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* Same gradient as main site background */
  background: linear-gradient(
    180deg,
    #07090e 0%,
    #0b111d 50%,
    #07090e 100%
  );

  /* Transition out — fade + slight scale */
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hidden state */
.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* === AMBIENT GLOW behind logo === */
.loader-ambient {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  width: 70vw;
  height: 70vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(
    ellipse at center,
    rgba(201, 168, 76, 0.07) 0%,
    rgba(201, 168, 76, 0.03) 40%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: loaderAmbientIn 1.2s ease 0.3s forwards;
}

/* === GRID OVERLAY === */
.loader-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* === NOISE TEXTURE === */
.loader-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

/* === INNER WRAPPER === */
.loader-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* === TAGLINE === */
.loader-tagline {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #3a4a60;
  opacity: 0;
  transform: translateY(6px);
  animation: loaderFadeUp 0.6s ease 0.1s forwards;
  margin-bottom: 4px;
}

/* === LOGO === */
.loader-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(3.5rem, 12vw, 5.5rem); /* 30–40% bigger than before */
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  animation: loaderLogoIn 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.25s forwards;
}

/* "Shin" — gold with glow */
.loader-logo .logo-shin {
  color: #c9a84c;
  text-shadow:
    0 0 30px rgba(201, 168, 76, 0.70),
    0 0 60px rgba(201, 168, 76, 0.35),
    0 0 100px rgba(201, 168, 76, 0.15);
}

/* "kai" — frost white with soft glow */
.loader-logo .logo-kai {
  color: #eaedf5;
  text-shadow:
    0 0 30px rgba(234, 237, 245, 0.50),
    0 0 60px rgba(234, 237, 245, 0.20);
}

/* === GOLD UNDERLINE that draws itself === */
.loader-line-track {
  width: 140px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: loaderFadeUp 0.4s ease 0.6s forwards;
}

.loader-line-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    #8a6a20 0%,
    #c9a84c 50%,
    #e8c96a 100%
  );
  border-radius: 2px;
  animation: loaderLineDraw 0.85s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.5);
}

/* ============================================
   LOADER KEYFRAMES
   ============================================ */

/* Logo entrance — fade + rise + scale */
@keyframes loaderLogoIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0px) scale(1.00);
  }
}

/* Tagline and line track — fade + rise */
@keyframes loaderFadeUp {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

/* Gold line draws left to right */
@keyframes loaderLineDraw {
  0%   { width: 0%; }
  60%  { width: 80%; }
  100% { width: 100%; }
}

/* Ambient glow fades in */
@keyframes loaderAmbientIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* ============================================
   MOBILE LOADER
   ============================================ */
@media (max-width: 768px) {
  .loader-logo {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .loader-line-track {
    width: 100px;
  }

  .loader-ambient {
    width: 90vw;
    height: 90vw;
  }
}

/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */
@keyframes glowShift {
  0%, 100% { opacity: 0.3; transform: translate(0, 0); }
  33%      { opacity: 0.6; transform: translate(20px, -15px); }
  66%      { opacity: 0.4; transform: translate(-10px, 10px); }
}

@keyframes shimmerFlow {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes cursorPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50%      { transform: translate(-50%, -50%) scale(1.4); opacity: 0.1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 24px;
}

.admin-login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  animation: fadeInUp 0.5s ease-out;
}

.admin-login-card h1 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.admin-login-card p {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 28px;
}

/* Admin Layout */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.admin-sidebar nav {
  position: static;
  padding: 0;
  backdrop-filter: none;
  background: none;
  border: none;
}

.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 2px;
  transition: all var(--transition);
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: var(--accent-subtle);
  color: var(--accent-light);
  opacity: 1;
}

.admin-sidebar nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.admin-sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.admin-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  max-width: 100%;
}

.admin-main h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.admin-main .page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

/* Stats Boxes */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--transition);
}

.stat-box:hover {
  border-color: var(--border-accent);
}

.stat-box .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-box .stat-icon svg { width: 22px; height: 22px; }

.stat-box .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.stat-box .stat-label { font-size: 0.8rem; color: var(--text-secondary); }

/* Admin Table */
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
}

.admin-table tr:hover td { background: rgba(255, 255, 255, 0.015); }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}

.pill-green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.pill-gray { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }

.admin-actions { display: flex; gap: 6px; }

.admin-actions button {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.btn-admin-edit { background: var(--accent-subtle); color: var(--accent-light); }
.btn-admin-edit:hover { background: var(--accent-subtle); }
.btn-admin-delete { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.btn-admin-delete:hover { background: rgba(239, 68, 68, 0.2); }
.btn-admin-move {
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all var(--transition);
  font-family: var(--font-body);
  background: rgba(201, 168, 76, 0.10);
  color: #c9a84c;
}
.btn-admin-move:hover:not(:disabled) { background: rgba(201, 168, 76, 0.22); }
.btn-admin-move:disabled { opacity: 0.30; cursor: default; }

/* Admin Form */
.admin-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 16px;
}

.admin-form h3 { font-size: 1.15rem; margin-bottom: 20px; }

/* Category toggle buttons in admin form */
.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.category-picker label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  transition: all var(--transition);
  user-select: none;
  color: var(--text-secondary);
}

.category-picker label:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-subtle);
  box-shadow: 0 0 16px var(--accent-glow-soft);
}

.category-picker label.checked {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow-soft);
}

.category-picker input[type="checkbox"] {
  display: none;
}

/* ============================================
   LOADING / 404 / UTILITY
   ============================================ */
.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid #1a2535;
  border-top-color: #c9a84c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.text-center { text-align: center; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar       { width: 6px; background: #07090e; }
::-webkit-scrollbar-thumb { background: #1a2535; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c9a84c; }

/* ============================================
   SELECTION
   ============================================ */
::selection { background: #e8c96a; color: #07090e; }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  section { padding: 56px 0; }

  nav { padding: 14px 16px; }

  nav .logo .nav-logo-img { height: 26px; }

  .hero {
    padding: 100px 20px 96px;
    min-height: 90vh;
  }

  /* Hero buttons — refined mobile size */
  .hero-actions { flex-direction: column; align-items: center; gap: 12px; }
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    height: 48px;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  /* Filter bar — single scrollable row, no wrap */
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
    padding: 0 16px 8px 16px;
    justify-content: flex-start;
    margin-bottom: 24px;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-btn {
    flex-shrink: 0;
    height: 36px;
    padding: 0 14px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  /* Project cards — single column, tighter */
  .project-grid { grid-template-columns: 1fr; gap: 16px; }
  .project-body { padding: 14px 16px 16px; }
  .project-body h3 { font-size: 1rem; margin-bottom: 6px; }
  .project-body p {
    font-size: 0.85rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .project-body .project-category { gap: 6px; margin-bottom: 8px; }
  .project-body .project-category span { font-size: 0.68rem; padding: 3px 8px; }
  .project-tools span { font-size: 0.72rem; padding: 3px 10px; }

  /* About — single column, tighter cards */
  .about-grid { grid-template-columns: 1fr; gap: 16px; }
  .glass-card { padding: 20px; }
  .skills-grid { gap: 6px; }
  .skills-grid span { font-size: 0.78rem; padding: 5px 12px; }

  /* Contact — stacked, compact */
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-card { padding: 20px 16px; }
  .form-group input,
  .form-group textarea,
  .form-group select {
    height: 46px;
    font-size: 0.95rem;
    padding: 0 14px;
  }
  .form-group textarea { height: 120px; padding: 12px 14px; }
  #submit-btn { width: 100%; height: 48px; border-radius: 10px; font-size: 0.95rem; }
  .contact-card { padding: 20px 16px; }
  .contact-item { padding: 10px 0; }
  .contact-item .icon-box { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; }

  /* CTA section — fits small screens */
  .cta-section { padding: 64px 24px; }
  .cta-title { font-size: clamp(1.8rem, 8vw, 2.5rem); line-height: 1.15; }
  .cta-sub { font-size: 0.9rem; padding: 0 8px; }
  .cta-btn { width: 100%; max-width: 260px; height: 50px; border-radius: 12px; font-size: 0.95rem; }

  /* Scroll-to-top — compact, clear of content */
  #scroll-top-btn { width: 40px; height: 40px; bottom: 16px; right: 16px; }
  #scroll-top-btn svg { width: 16px; height: 16px; }

  /* General mobile spacing */
  .container { padding: 0 16px; }
  .section-header h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .section-title { padding: 0 16px; }
  .section-description { font-size: 0.9rem; padding: 0 24px; line-height: 1.6; }
  .section-tag { font-size: 0.68rem; padding: 4px 12px; }
  footer { padding: 32px 16px; text-align: center; }
  .footer-copy,
  footer p { font-size: 0.78rem; color: #3a4a60; }

  /* Stars — dimmer on mobile for performance */
  #stars-canvas { opacity: 0.7; }

  /* Hero stats — horizontal scrollable strip, same pattern as filter bar */
  .hero-stats { padding: 32px 0 48px; }
  .stats-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    padding: 2px 2px 10px 2px;
  }
  .stats-grid::-webkit-scrollbar { display: none; }
  .stat-card { flex: 0 0 240px; }

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

  .admin-wrapper { flex-direction: column; }

  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .admin-sidebar nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .admin-sidebar nav a { white-space: nowrap; font-size: 0.82rem; padding: 8px 14px; }
  .admin-sidebar nav a span { display: inline; }
  .admin-sidebar .logo { display: none; }
  .admin-sidebar-divider { display: none; }
  .admin-main { padding: 20px 16px; }

  .project-modal-content { max-height: 95vh; }
  .project-modal-info { padding: 20px; }
  .section-header { margin-bottom: 36px; }
}

/* Small phones */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .project-modal { padding: 12px; }
  .glass-card, .contact-card, .form-card { padding: 24px 20px; }
  .admin-form { padding: 20px; }
}
