﻿/* ============================================================
   MUHAMMAD IRFAN â€” PORTFOLIO STYLES
   ============================================================
   Table of contents:
   1. Custom properties (theme)
   2. Reset & base
   3. Utilities & shared components
   4. Header / navigation
   5. Hero
   6. Work / projects
   7. Showreel
   8. About
   9. Services
   10. Contact
   11. Footer
   12. Modal
   13. Project detail page
   14. Animations & reveals
   15. Responsive
   16. Reduced motion
   ============================================================ */

/* ---------- 1. CUSTOM PROPERTIES ---------- */
:root {
  /* Accent - one bold color used throughout */
  --accent: #c7f000;
  --accent-rgb: 199, 240, 0;
  --accent-ink: #111400;

  /* Dark theme (default) */
  --bg: #0b0b0f;
  --bg-elev: #141419;
  --bg-elev-2: #1c1c24;
  --bg-alt: #101016;
  --text: #f5f5f7;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.2);
  --header-bg: rgba(11, 11, 15, 0.72);
  --overlay: rgba(11, 11, 15, 0.72);
  --grid-line: rgba(255, 255, 255, 0.03);

  /* Typography */
  --font-display: 'Sora', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container: 1200px;
  --header-h: 88px;
  --header-h-scrolled: 72px;
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg: #f7f7f5;
  --bg-elev: #ffffff;
  --bg-elev-2: #efefeb;
  --bg-alt: #efefeb;
  --text: #18181b;
  --text-muted: #52525b;
  --text-dim: #71717a;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.06);
  --header-bg: rgba(247, 247, 245, 0.78);
  --overlay: rgba(255, 255, 255, 0.7);
  --grid-line: rgba(0, 0, 0, 0.035);
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}
body.nav-open { overflow: hidden; }
body.modal-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
strong { font-weight: 600; }

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Focus visible for keyboard accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: 8px;
  z-index: 10000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---------- 3. UTILITIES & SHARED ---------- */
.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}
.section {
  padding: 120px 0;
  position: relative;
}
.section-alt {
  background: var(--bg-alt);
}
.accent { color: var(--accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.eyebrow-line {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-head { margin-bottom: 56px; max-width: 680px; }
.section-head-center { text-align: center; margin-inline: auto; }
.section-head-center .eyebrow { justify-content: center; }
.section-head-center .section-desc { margin-inline: auto; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 20px;
  text-wrap: balance;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
}
.subsection-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform var(--transition), background-color var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 11px 22px; font-size: 0.88rem; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.25);
}
.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(var(--accent-rgb), 0.35);
  filter: brightness(1.02);
}
.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- 4. HEADER ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0;
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
.site-header.scrolled {
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(20px);
  -webkit-backdrop-filter: saturate(140%) blur(20px);
  box-shadow: inset 0 -1px 0 var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  transition: height 0.4s ease;
}
.site-header.scrolled .nav-wrap { height: var(--header-h-scrolled); }

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  z-index: 2;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 12px;
  letter-spacing: -0.03em;
  transition: transform var(--transition);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.04); }
.brand-name .accent { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: inline-block;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.nav-link:hover,
.nav-link.active { color: var(--text); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.theme-toggle:hover {
  background: var(--bg-elev-2);
  border-color: var(--border-strong);
  color: var(--accent);
}
.theme-toggle svg { width: 20px; height: 20px; }
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  z-index: 2;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.25s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 5. HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 80px;
  overflow: clip;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
}
.hero-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.55;
}
.shape-1 {
  width: 420px;
  height: 420px;
  top: -100px;
  right: -60px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.22), transparent 70%);
  animation: float 10s ease-in-out infinite;
}
.shape-2 {
  width: 280px;
  height: 280px;
  bottom: 10%;
  left: -80px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: transparent;
  animation: float 12s ease-in-out infinite reverse;
}
.shape-3 {
  width: 140px;
  height: 140px;
  top: 25%;
  left: 45%;
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 32px;
  transform: rotate(25deg);
  animation: float 8s ease-in-out infinite 1s;
}

.hero-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
}
.hero-content { max-width: 640px; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin-bottom: 28px;
  text-wrap: balance;
}
.reveal-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.reveal-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.loaded .reveal-inner { transform: translateY(0); }
.reveal-line:nth-child(2) .reveal-inner { transition-delay: 0.12s; }

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.hero-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.specialty-pill {
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  letter-spacing: 0.01em;
}
[data-theme="light"] .specialty-pill { background: rgba(0,0,0,0.02); }

/* Hero visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-card {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 4 / 4.5;
}
.hero-card-inner {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  border: 1px solid var(--border);
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12), transparent 65%);
  pointer-events: none;
}
.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.05));
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  display: grid;
  place-items: center;
  position: relative;
  margin-bottom: 32px;
}
.avatar-initials {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.avatar-ring {
  position: absolute;
  inset: -10px;
  border: 1px dashed rgba(var(--accent-rgb), 0.3);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}
.hero-card-badge {
  position: absolute;
  padding: 12px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}
.badge-top {
  top: 28px;
  right: -12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
  animation: pulse-dot 2s ease-in-out infinite;
}
.badge-bottom {
  bottom: 100px;
  left: -12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.badge-bottom strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  line-height: 1;
}
.badge-bottom span { color: var(--text-muted); font-size: 0.78rem; }
.hero-card-stats {
  display: flex;
  gap: 40px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  width: 100%;
  justify-content: center;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.02em; }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

/* ---------- 6. WORK / PROJECTS ---------- */
/* Screen-reader only utility */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Work controls: search + filters */
.work-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.project-search-wrap {
  position: relative;
  width: min(100%, 320px);
  flex-shrink: 0;
}
.project-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}
.project-search {
  width: 100%;
  padding: 12px 16px 12px 42px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}
.project-search::placeholder { color: var(--text-dim); }
.project-search:focus {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}
.project-search::-webkit-search-cancel-button { cursor: pointer; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
.filter-btn {
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
  background: transparent;
}
.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.filter-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.projects-empty {
  grid-column: 1 / -1;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font-size: 0.95rem;
}
.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.25);
  box-shadow: var(--shadow-soft);
}
.project-card.is-hidden { display: none; }

.project-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-elev-2);
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.project-card:hover .project-thumb img { transform: scale(1.06); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 11, 15, 0.88) 0%, rgba(11, 11, 15, 0.15) 45%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.project-card:hover .project-overlay,
.project-card:focus-within .project-overlay { opacity: 1; }

.project-overlay-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.project-overlay-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.project-overlay-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}
.project-overlay-cta svg { width: 16px; height: 16px; transition: transform 0.3s ease; }
.project-card:hover .project-overlay-cta svg { transform: translate(3px, -3px); }

.project-info {
  padding: 20px 24px 24px;
}
.project-info-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  display: block;
}
.project-info-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.project-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.project-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ---------- 7. SHOWREEL ---------- */
.showreel {
  max-width: 960px;
  margin: 0 auto;
}
.showreel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.showreel-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, opacity 0.4s ease;
}
.showreel-frame:hover .showreel-poster { transform: scale(1.02); }
.showreel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.2) 100%);
}
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  transition: transform var(--transition-spring), box-shadow var(--transition);
  box-shadow: 0 12px 40px rgba(var(--accent-rgb), 0.35);
  z-index: 2;
}
.play-btn:hover { transform: scale(1.08); }
.play-btn svg { width: 28px; height: 28px; margin-left: 3px; }
.play-btn-pulse {
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}
.showreel-caption {
  position: absolute;
  bottom: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 2;
}
.showreel-duration { color: rgba(255,255,255,0.7); font-size: 0.8rem; }
.showreel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.showreel-frame.playing .showreel-poster,
.showreel-frame.playing .showreel-overlay,
.showreel-frame.playing .play-btn,
.showreel-frame.playing .showreel-caption { display: none; }

/* ---------- 8. ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: start;
}
.about-image-wrap {
  position: relative;
  border-radius: 24px;
  overflow: visible;
}
.about-image-wrap img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
}
.about-experience {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 24px 28px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 12px 40px rgba(var(--accent-rgb), 0.3);
}
.exp-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.exp-text {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}
.about-content .section-title { margin-bottom: 24px; }
.about-text {
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.8;
  max-width: 62ch;
}

/* Counters */
.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 36px 0;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.counter-card { text-align: left; }
.counter-num, .counter-suffix {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
}
.counter-suffix { color: var(--accent); }
.counter-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* Skills */
.skills-wrap { margin-bottom: 32px; }
.skill-bars { display: flex; flex-direction: column; gap: 18px; }
.skill-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.skill-meta span:last-child { color: var(--text-muted); }
.skill-track {
  width: 100%;
  height: 6px;
  background: var(--bg-elev-2);
  border-radius: 999px;
  overflow: hidden;
}
[data-theme="light"] .skill-track { background: #dddcd7; }
.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), 0.7));
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tools */
.tool-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-tag {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* ---------- 9. SERVICES ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  position: relative;
  padding: 36px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow-soft);
}
.service-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  margin-bottom: 28px;
  transition: background-color var(--transition), transform var(--transition);
}
.service-card:hover .service-icon {
  background: var(--accent);
  color: var(--accent-ink);
  transform: scale(1.05);
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.service-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.service-num {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ---------- 10. CONTACT ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-content .section-desc { margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-detail { display: flex; flex-direction: column; gap: 4px; }
.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.detail-value {
  font-size: 0.95rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  position: relative;
}
.contact-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--bg-elev-2);
  box-shadow: var(--shadow-soft);
}
.contact-card-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  transition: background-color var(--transition), color var(--transition);
}
.contact-card:hover .contact-card-icon {
  background: var(--accent);
  color: var(--accent-ink);
}
.contact-card-icon svg { width: 24px; height: 24px; }
.contact-card-body { flex: 1; min-width: 0; }
.contact-card-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.contact-card-value {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}
.contact-card-arrow {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.contact-card-arrow svg { width: 18px; height: 18px; }
.contact-card:hover .contact-card-arrow {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: translate(2px, -2px);
}

/* ---------- 11. FOOTER ---------- */
.site-footer {
  padding: 72px 0 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-brand p {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.7;
  max-width: 34ch;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  color: var(--text);
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  display: inline-block;
}
.footer-col a:hover { color: var(--accent); transform: translateX(2px); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- 12. MODAL ---------- */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.project-modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.35s ease;
}
.modal-panel {
  position: relative;
  width: min(100%, 920px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  overscroll-behavior: contain;
}
.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px -56px 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  z-index: 5;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.modal-close svg { width: 20px; height: 20px; }
.modal-content { padding: 0; }
.modal-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}
.modal-body { padding: 40px; }
.modal-cat {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.modal-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 28px;
  max-width: 65ch;
}
.modal-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.meta-item span { display: block; }
.meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.meta-value { font-size: 0.94rem; color: var(--text); font-weight: 500; }
.modal-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}
.modal-detail h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.modal-detail p { font-size: 0.94rem; color: var(--text-muted); line-height: 1.75; }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 13. PROJECT DETAIL PAGE ---------- */
.project-page .site-header { background: var(--header-bg); backdrop-filter: saturate(140%) blur(20px); -webkit-backdrop-filter: saturate(140%) blur(20px); box-shadow: inset 0 -1px 0 var(--border); }
.project-detail-main { padding-top: var(--header-h); }
.project-detail-section { padding-top: 56px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 32px;
  transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 18px; height: 18px; transition: transform var(--transition); }
.back-link:hover svg { transform: translateX(-4px); }
.project-detail { max-width: 960px; }
.project-detail-media {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 40px;
  background: var(--bg-elev);
  max-width: 860px;
  margin-inline: auto;
  box-shadow: var(--shadow-soft);
}
.project-detail-media img {
  width: 100%;
  height: clamp(240px, 42vw, 420px);
  object-fit: cover;
  object-position: center;
  display: block;
}
.project-detail .modal-cat { margin-bottom: 14px; }
.project-detail .modal-title { margin-bottom: 24px; }
.project-detail .modal-desc { max-width: 70ch; margin-bottom: 32px; }
.project-not-found {
  padding: 80px 0;
  text-align: center;
}
.project-not-found h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 16px;
}
.project-not-found p { color: var(--text-muted); margin-bottom: 24px; }

/* ---------- CUSTOM CURSOR ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
}
.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin: -4px 0 0 -4px;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, opacity 0.3s ease, background-color 0.3s ease;
}
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(var(--accent-rgb), 0.5);
  margin: -18px 0 0 -18px;
  transition: width 0.35s ease, height 0.35s ease, margin 0.35s ease, opacity 0.3s ease, background-color 0.35s ease, border-color 0.35s ease;
}
body.cursor-visible .cursor-dot,
body.cursor-visible .cursor-ring { opacity: 1; }
body.cursor-hover .cursor-ring {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.3);
}
body.cursor-hover .cursor-dot {
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
}
body.cursor-down .cursor-ring {
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
}

/* Hide custom cursor on touch / coarse pointers */
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ---------- PAGE TRANSITION ---------- */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.page-transition.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 14. ANIMATIONS & REVEALS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children when parent gets .is-visible */
.projects-grid .project-card.reveal { transition-delay: var(--delay, 0ms); }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(2deg); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15); }
  50% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0.08); }
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scaleY(1); transform-origin: top; opacity: 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero-grid-layout { grid-template-columns: 1fr; gap: 48px; }
  .hero-content { max-width: 680px; }
  .hero-visual { justify-content: flex-start; }
  .hero-card { width: min(100%, 400px); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 56px; }
  .about-visual { max-width: 560px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 860px) {
  :root { --header-h: 76px; --header-h-scrolled: 68px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 100vw);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-elev);
    border-left: 1px solid var(--border);
    padding: 100px 28px 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
    visibility: hidden;
    overflow-y: auto;
    box-shadow: none;
  }
  .site-nav.open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: -20px 0 60px rgba(0,0,0,0.25);
  }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 14px 0; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav-link::after { display: none; }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .nav-actions .btn { width: 100%; }
  .theme-toggle { width: 100%; border-radius: 12px; }
}

@media (max-width: 680px) {
  .section { padding: 88px 0; }
  .container { width: min(100% - 32px, var(--container)); }
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 32px); padding-bottom: 72px; }
  .hero-title { font-size: clamp(2.5rem, 11vw, 3.6rem); }
  .hero-sub { font-size: 1rem; }
  .hero-visual { justify-content: center; }
  .hero-card { width: min(100%, 340px); }
  .badge-top { right: -4px; top: 20px; }
  .badge-bottom { left: -4px; bottom: 90px; }
  .scroll-hint { display: none; }
  .work-controls { flex-direction: column; align-items: stretch; gap: 16px; }
  .project-search-wrap { width: 100%; max-width: none; }
  .filter-bar { width: 100%; }
  .projects-grid { grid-template-columns: 1fr; gap: 24px; }
  .project-overlay { opacity: 1; background: linear-gradient(to top, rgba(11,11,15,0.82) 0%, rgba(11,11,15,0.0) 50%, transparent 100%); }
  .counters { grid-template-columns: 1fr; gap: 24px; text-align: left; }
  .about-experience { right: 16px; bottom: -16px; padding: 18px 22px; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .modal-body { padding: 28px 24px; }
  .modal-meta { grid-template-columns: 1fr; gap: 16px; }
  .modal-detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .play-btn { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  .play-btn svg { width: 24px; height: 24px; }
}

/* ---------- 16. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .reveal-inner { transform: none; }
  .skill-fill { transition: none; }
  .page-transition { display: none !important; }
}
