/* Tokens */
:root {
  --ink: #0A192F;
  --surface: #0c1f38;
  --surface-2: #112240;
  --line: #233554;
  --mist: #8892B0;
  --text: #E6F1FF;
  --accent: #64FFDA;
  --accent-2: #FF6B9D;
  --on-accent: #0A192F;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* Light theme overrides. Accent hues shift slightly darker/more saturated versions
   of the same mint/coral family — the exact given hex values are too pale (mint) or
   low-contrast (coral) to use as text/borders against a white background. */
[data-theme="light"] {
  --ink: #F8F9FA;
  --surface: #FFFFFF;
  --surface-2: #F1F3F5;
  --line: #E2E8F0;
  --mist: #718096;
  --text: #2D3748;
  --accent: #0D9488;
  --accent-2: #DB2777;
  --on-accent: #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.5;
  transition: background-color 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--on-accent); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

.font-display { font-family: var(--font-display); }

.text-gradient {
  background-image: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-card {
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  border-radius: 1rem;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.35);
}

.section-shell {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 640px) {
  .section-shell { padding-inline: 2rem; }
}

section { position: relative; padding-block: 7rem; }

.eyebrow {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

h2.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--text);
  margin: 0 0 3rem;
}

/* Animated background */
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--ink);
}

.bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.blob-layer {
  position: absolute;
  inset: 0;
  transition: transform 0.2s ease-out;
  will-change: transform;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(110px);
  opacity: 0.25;
  animation: float 28s ease-in-out infinite;
}
.blob-1 { width: 36rem; height: 36rem; top: -10rem; left: -10rem; background: var(--accent); }
.blob-2 { width: 30rem; height: 30rem; top: 33%; right: -8rem; background: var(--accent-2); animation-duration: 34s; animation-delay: -6s; }
.blob-3 { width: 26rem; height: 26rem; bottom: 0; left: 25%; background: color-mix(in srgb, var(--accent) 50%, var(--accent-2) 50%); animation-duration: 24s; animation-delay: -12s; }
[data-theme="light"] .blob { opacity: 0.12; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(3rem, -2rem); }
  66% { transform: translate(-2rem, 2rem); }
}

.bg-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--ink));
}

/* Cursor glow */
#cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  pointer-events: none;
  z-index: 80;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s, opacity 0.2s, border-color 0.2s;
  opacity: 0;
}
#cursor-glow.active { opacity: 1; }
#cursor-glow.hover {
  width: 52px; height: 52px;
  border-color: color-mix(in srgb, var(--accent-2) 60%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%);
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 60;
  transition: width 0.1s linear;
}

/* Navbar */
header.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s ease;
}
header.navbar.scrolled {
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
header.navbar.nav-hidden { transform: translateY(-100%); }

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  background: none;
  border: none;
}
.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}
[data-theme="light"] .brand-logo { filter: invert(1); }

.nav-right { display: flex; align-items: center; gap: 0.5rem; }

.nav-links { position: relative; display: none; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative;
  z-index: 1;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  border-radius: 999px;
  color: var(--mist);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { background: var(--surface-2); border: 1px solid var(--line); }
.nav-links.has-pill a.active { background: transparent; border-color: transparent; }
.nav-pill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  z-index: 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

.theme-toggle {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--mist);
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.nav-toggle {
  width: 2.25rem; height: 2.25rem;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  background: none; border: none;
  flex-shrink: 0;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--text); display: block;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  background: color-mix(in srgb, var(--surface-2) 95%, transparent);
  border-top: 1px solid var(--line);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu a { padding: 0.65rem 0.75rem; border-radius: 0.5rem; font-size: 0.9rem; color: var(--mist); }
.mobile-menu a.active { background: var(--surface-2); color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.875rem; font-weight: 500;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 50%, transparent); }
.btn-ghost { background: color-mix(in srgb, var(--surface-2) 82%, transparent); border: 1px solid var(--line); color: var(--text); }
.btn-outline { border: 1px solid var(--line); color: var(--mist); background: transparent; }
.btn-outline:hover { color: var(--text); border-color: var(--accent); }
.btn-danger:hover { color: var(--accent-2); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 7rem; padding-bottom: 5rem; }
.hero-kicker { font-family: ui-monospace, Consolas, monospace; font-size: 0.875rem; color: var(--accent); margin-bottom: 1rem; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 1.05; letter-spacing: -0.02em;
  color: var(--text); margin: 0;
}
.hero-role-wrap { height: 3rem; margin-top: 0.75rem; overflow: hidden; }
.hero-role {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  margin: 0px;
}
.hero-role .typed-cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink-cursor 0.9s step-end infinite;
  color: var(--accent);
}
@keyframes blink-cursor { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.hero-tagline { margin-top: 1.5rem; max-width: 42rem; color: var(--mist); font-size: 1.125rem; line-height: 1.7; }
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

/* Pre-hidden state for the GSAP hero entrance; gsap-effects.js animates these in.
   If the GSAP CDN fails, gsap-effects.js removes this class so content still shows. */
.hero-anim-hide { opacity: 0; transform: translateY(16px); }

/* Portfolio page hero */
.portfolio-hero { padding-top: 10rem; padding-bottom: 3rem; }
.portfolio-hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  color: var(--text); margin: 0.5rem 0 0; letter-spacing: -0.02em;
}

/* Filters */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem;
  padding: 1.25rem; margin-bottom: 2.5rem; border-radius: 1rem;
  background: color-mix(in srgb, var(--surface-2) 60%, transparent); border: 1px solid var(--line);
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.filter-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mist); margin-right: 0.25rem; }
.filter-pill {
  padding: 0.4rem 0.9rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--mist); font-size: 0.8rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.filter-pill:hover { color: var(--text); border-color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter-clear {
  margin-left: auto; background: none; border: none;
  color: var(--mist); font-size: 0.8rem;
}
.filter-clear:hover { color: var(--accent-2); }

.scroll-cue {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  color: var(--mist); background: none; border: none;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

/* Hero decorative 3D cube */
.hero-3d {
  display: none;
  position: absolute;
  top: 6rem; right: 4vw;
  width: 11rem; height: 11rem;
  perspective: 700px;
  opacity: 0.85;
}
@media (min-width: 1024px) { .hero-3d { display: block; } }

.cube-scene { width: 100%; height: 100%; transform-style: preserve-3d; }
.cube {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: spin-cube 16s linear infinite;
}
@keyframes spin-cube {
  from { transform: rotateX(0deg) rotateY(0deg); }
  to { transform: rotateX(360deg) rotateY(360deg); }
}
.cube-face {
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent));
  backdrop-filter: blur(2px);
}
.cube-front  { transform: translateZ(5.5rem); }
.cube-back   { transform: translateZ(-5.5rem) rotateY(180deg); }
.cube-right  { transform: rotateY(90deg) translateZ(5.5rem); }
.cube-left   { transform: rotateY(-90deg) translateZ(5.5rem); }
.cube-top    { transform: rotateX(90deg) translateZ(5.5rem); }
.cube-bottom { transform: rotateX(-90deg) translateZ(5.5rem); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.dir-right { transform: translateX(28px); }
.reveal.dir-right.in-view { transform: translateX(0); }

.reveal.tilt {
  transform: perspective(1000px) translateY(36px) rotateX(-10deg);
  transform-origin: bottom center;
}
.reveal.tilt.in-view { transform: perspective(1000px) translateY(0) rotateX(0deg); }

/* 3D tilt + glare (JS-driven via .tilt elements) */
.tilt {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.tilt-glare.visible { opacity: 1; }

/* About */
.about-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 3fr 2fr; } }
.about-summary { color: var(--mist); font-size: 1.125rem; line-height: 1.75; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card { padding: 1.25rem; text-align: center; transition: border-color 0.2s; }
.stat-card:hover { border-color: var(--accent); }
.stat-value { font-family: var(--font-display); font-size: 1.875rem; font-weight: 600; }
.stat-label { color: var(--mist); font-size: 0.875rem; margin-top: 0.25rem; }
@media (min-width: 1024px) { .stat-card { text-align: left; } }

/* Skills */
.skills-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .skills-grid { grid-template-columns: 1fr 1fr; } }
.skill-group { padding: 1.5rem; height: 100%; }
.skill-group h3 { font-family: var(--font-display); color: var(--text); font-weight: 500; margin: 0 0 1rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--mist); font-size: 0.875rem; transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.tag:hover { color: var(--text); border-color: var(--accent-2); transform: scale(1.06); }

/* Experience */
.timeline { position: relative; display: flex; flex-direction: column; gap: 2.5rem; }
.timeline-item { position: relative; }
@media (min-width: 640px) { .timeline-item { padding-left: 2.5rem; } }
.timeline-dot {
  display: none;
  position: absolute; left: 0; top: 0.4rem;
  width: 1rem; height: 1rem; border-radius: 999px;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
@media (min-width: 640px) { .timeline-dot { display: block; } }
.timeline-line, .timeline-line-progress {
  display: none;
  position: absolute;
  left: 0.5rem; top: 0.4rem; bottom: 0.4rem;
  width: 1px;
}
.timeline-line { background: var(--line); }
.timeline-line-progress {
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  transform: scaleY(0);
  transform-origin: top;
}
@media (min-width: 640px) { .timeline-line, .timeline-line-progress { display: block; } }
.job-card { padding: 1.5rem; transition: border-color 0.2s; }
.job-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.job-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; }
.job-header h3 { font-family: var(--font-display); font-size: 1.125rem; font-weight: 500; color: var(--text); margin: 0; }
.job-period { font-family: ui-monospace, Consolas, monospace; font-size: 0.75rem; color: var(--mist); white-space: nowrap; }
.job-points { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.job-points li { display: flex; gap: 0.5rem; color: var(--mist); font-size: 0.9rem; line-height: 1.6; }
.job-points li::before { content: "▹"; color: var(--accent); flex-shrink: 0; }
.job-skills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.job-skills span { font-size: 0.75rem; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--mist); }

/* Education */
.edu-grid { display: grid; gap: 3.5rem; }
@media (min-width: 768px) { .edu-grid { grid-template-columns: 1fr 1fr; } }
.edu-item { display: flex; gap: 1rem; padding: 1.25rem; margin-bottom: 1rem; }
.edu-icon {
  flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.edu-item:nth-child(even) .edu-icon,
.volunteer-item .edu-icon { color: var(--accent-2); }
.edu-item h3 { margin: 0; color: var(--text); font-weight: 500; font-size: 1rem; }
.edu-item p { margin: 0.15rem 0 0; color: var(--mist); font-size: 0.875rem; }
.edu-item .edu-desc { font-size: 0.75rem; color: color-mix(in srgb, var(--mist) 80%, transparent); }
.edu-item .edu-period { font-family: ui-monospace, Consolas, monospace; font-size: 0.75rem; color: var(--accent); margin-top: 0.5rem; }

/* Portfolio */
.projects-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .projects-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .projects-grid { grid-template-columns: 1fr 1fr 1fr; } }

.project-card { overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.project-thumb {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2);
  background-image: linear-gradient(100deg, transparent 40%, color-mix(in srgb, var(--text) 6%, transparent) 50%, transparent 60%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}
.project-thumb.loaded { animation: none; background-image: none; }
@keyframes skeleton-shimmer {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}
.project-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: transform 0.5s, opacity 0.4s;
}
.project-thumb img.loaded { opacity: 1; }
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-thumb .no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--mist); }
.project-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--ink) 75%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover .project-thumb::after { opacity: 1; }
.project-thumb-hint {
  position: absolute; left: 0.9rem; bottom: 0.9rem; z-index: 1;
  font-size: 0.75rem; font-weight: 500; color: var(--text);
  display: inline-flex; align-items: center; gap: 0.35rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
}
.project-card:hover .project-thumb-hint { opacity: 1; transform: translateY(0); }
.featured-badge {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 1;
  font-size: 0.75rem; padding: 0.3rem 0.7rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 500;
}
.project-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { font-family: var(--font-display); color: var(--text); font-weight: 500; font-size: 1.125rem; margin: 0; }
.project-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.meta-badge {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.01em;
  padding: 0.25rem 0.6rem; border-radius: 999px;
}
.meta-type { background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.meta-involvement { background: color-mix(in srgb, var(--accent-2) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent); color: var(--accent-2); }
.modal-meta.project-meta { margin-top: 0.5rem; }
.project-desc { color: var(--mist); font-size: 0.875rem; margin-top: 0.5rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.project-tags span { font-size: 0.75rem; padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--mist); }
.project-links { display: flex; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.project-links a { font-size: 0.875rem; color: var(--mist); display: inline-flex; align-items: center; gap: 0.4rem; transition: color 0.2s, transform 0.2s; }
.project-links a:hover { color: var(--accent); transform: translateX(2px); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }
.modal-box { position: relative; max-width: 42rem; width: 100%; max-height: 85vh; overflow-y: auto; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 2.25rem; height: 2.25rem; border-radius: 999px;
  background: rgba(5, 6, 10, 0.7); border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.modal-image { aspect-ratio: 16/9; background: var(--surface-2); }
.modal-image img { width: 100%; height: 100%; object-fit: cover; }
.modal-image .no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--mist); }
.modal-video { aspect-ratio: 16/9; background: #000; }
.modal-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-content { padding: 2rem; }
.modal-content h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--text); margin: 0; }
.modal-content p { color: var(--mist); margin-top: 0.75rem; line-height: 1.7; white-space: pre-line; }
.modal-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* Contact */
.contact-inner { text-align: center; max-width: 42rem; margin-inline: auto; }
.contact-inner h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
.contact-inner > p.lead { color: var(--mist); font-size: 1.125rem; }
.contact-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; }
.social-row { margin-top: 2rem; display: flex; align-items: center; justify-content: center; gap: 1.25rem; }
.social-row a { color: var(--mist); transition: color 0.2s, transform 0.2s; }
.social-row a:hover { color: var(--accent); transform: translateY(-3px); }

.contact-form {
  margin-top: 3rem;
  text-align: left;
  max-width: 32rem;
  margin-inline: auto;
  padding: 2rem;
}
.contact-form .field input,
.contact-form .field textarea {
  color: var(--text);
}
.contact-form .field-error {
  display: none;
  color: var(--accent-2);
  font-size: 0.8rem;
  margin-top: 0.375rem;
}
.contact-form .field.invalid input,
.contact-form .field.invalid textarea { border-color: var(--accent-2); }
.contact-form .field.invalid .field-error { display: block; }
.contact-form .hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.contact-form-status {
  display: none;
  padding: 0.85rem 1.1rem;
  border-radius: 0.6rem;
  font-size: 0.875rem;
  margin-top: 1rem;
}
.contact-form-status.visible { display: block; }
.contact-form-status.success { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.contact-form-status.error { background: color-mix(in srgb, var(--accent-2) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent); color: var(--accent-2); }

/* Testimonials */
.testimonials-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  margin: 0 -1.5rem;
  padding-inline: 1.5rem;
}
.testimonials-track::-webkit-scrollbar { height: 8px; }
.testimonial-card {
  scroll-snap-align: start;
  flex: 0 0 min(22rem, 85vw);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.testimonial-quote {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  flex: 1;
}
.testimonial-quote::before { content: "“"; color: var(--accent); font-size: 1.5rem; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
.testimonial-avatar {
  width: 2.75rem; height: 2.75rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 600; font-family: var(--font-display);
  overflow: hidden; flex-shrink: 0;
}
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-author h4 { margin: 0; font-size: 0.9rem; color: var(--text); font-weight: 500; }
.testimonial-author p { margin: 0.1rem 0 0; font-size: 0.8rem; color: var(--mist); }

/* Back to top */
#back-to-top {
  position: fixed;
  right: 1.5rem; bottom: 1.5rem;
  z-index: 55;
  width: 2.75rem; height: 2.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, border-color 0.2s, color 0.2s;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-to-top:hover { color: var(--accent); border-color: var(--accent); }

/* Page transition overlay */
#page-transition {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
}

/* Footer */
footer.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  font-size: 0.875rem; color: var(--mist);
}
footer.site-footer a:hover { color: var(--text); }

/* Loader */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  transition: opacity 0.5s;
}
#loader.hidden { opacity: 0; pointer-events: none; }
#loader span { font-family: var(--font-display); font-size: 1.5rem; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ===== Admin (always dark — a utility area, not tied to the public theme toggle) ===== */
.admin-shell { min-height: 100vh; display: flex; background: #0A192F; color: #E6F1FF; }
.admin-shell, .admin-shell * {
  --ink: #0A192F; --surface: #0c1f38; --surface-2: #112240; --line: #233554;
  --mist: #8892B0; --text: #E6F1FF; --accent: #64FFDA; --accent-2: #FF6B9D; --on-accent: #0A192F;
}
.admin-sidebar { width: 15rem; flex-shrink: 0; border-right: 1px solid var(--line); padding: 1rem; display: none; flex-direction: column; }
@media (min-width: 640px) { .admin-sidebar { display: flex; } }
.admin-sidebar .brand { padding: 0.5rem; margin-bottom: 1rem; }
.admin-nav { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.admin-nav a { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; color: var(--mist); }
.admin-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.admin-nav a.active { background: var(--surface-2); color: var(--text); }
.admin-sidebar .bottom-link { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; color: var(--mist); background: none; border: none; width: 100%; text-align: left; }
.admin-sidebar .bottom-link:hover { color: var(--text); }

.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .admin-topbar { display: none; } }
.admin-tabs-mobile { display: flex; gap: 0.5rem; padding: 0.75rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
@media (min-width: 640px) { .admin-tabs-mobile { display: none; } }
.admin-tabs-mobile a { padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.875rem; color: var(--mist); white-space: nowrap; }
.admin-tabs-mobile a.active { background: var(--surface-2); color: var(--text); }

.admin-main { flex: 1; min-width: 0; padding: 1.5rem; max-width: 64rem; }
@media (min-width: 640px) { .admin-main { padding: 2rem; } }

.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.admin-login-card { width: 100%; max-width: 24rem; padding: 2rem; }
.admin-login-icon { width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 1.5rem; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin: 0; }
.page-head p { color: var(--mist); font-size: 0.875rem; margin: 0.25rem 0 0; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.875rem; color: var(--mist); margin-bottom: 0.375rem; }
.field input[type="text"],
.field input[type="url"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%; padding: 0.65rem 0.875rem; border-radius: 0.5rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font-size: 0.875rem; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; }
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--surface-2); color: var(--text); }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .field-row-2 { grid-template-columns: 1fr 1fr; } .field-row-3 { grid-template-columns: 1fr 1fr 1fr; } }

.checkbox-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; color: var(--mist); }
.checkbox-grid {
  display: grid; grid-template-columns: 1fr; gap: 0.6rem;
  padding: 0.9rem; border-radius: 0.5rem;
  background: var(--surface-2); border: 1px solid var(--line);
}
@media (min-width: 640px) { .checkbox-grid { grid-template-columns: 1fr 1fr; } }

.entry-card { padding: 1.25rem; position: relative; margin-bottom: 1rem; }
.entry-card .remove-btn { position: absolute; top: 1rem; right: 1rem; color: var(--mist); background: none; border: none; }
.entry-card .remove-btn:hover { color: var(--accent-2); }
.entry-card-inner { padding-right: 2rem; }

.list-row { display: flex; align-items: center; gap: 1rem; padding: 1rem; margin-bottom: 0.75rem; }
.list-row .thumb { width: 3.5rem; height: 3.5rem; border-radius: 0.5rem; background: var(--surface-2); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--mist); }
.list-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-row .info { min-width: 0; flex: 1; }
.list-row .info h3 { margin: 0; font-size: 1rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .info p { margin: 0; font-size: 0.875rem; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .row-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }
.icon-btn { width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; background: none; border: none; color: var(--mist); display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--accent-2); }

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; overflow-x: auto; padding-bottom: 0.25rem; }
.tabs a { padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.875rem; color: var(--mist); white-space: nowrap; }
.tabs a.active { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }

.flash { padding: 0.85rem 1.1rem; border-radius: 0.6rem; font-size: 0.875rem; margin-bottom: 1.5rem; }
.flash-success { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent); }
.flash-error { background: color-mix(in srgb, var(--accent-2) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent); color: var(--accent-2); }

.image-upload-row { display: flex; align-items: center; gap: 1rem; }
.image-preview { width: 5rem; height: 5rem; border-radius: 0.5rem; background: var(--surface-2); border: 1px solid var(--line); object-fit: cover; }
.upload-label { padding: 0.6rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; cursor: pointer; }
.upload-label input { display: none; }

.empty-state { color: var(--mist); font-size: 0.875rem; }
