/* ═══════════════════════════════════════════════════════════
   SAIF ANES — PORTFOLIO STYLESHEET
   Aesthetic: Dark Luxury · Editorial · Precision
   Fonts: Cormorant Garamond + Outfit + DM Mono
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --bg:          #080b10;
  --bg-2:        #0d1117;
  --bg-3:        #111720;
  --surface:     #141b26;
  --surface-2:   #1a2333;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);

  --text:        #e8eaf0;
  --text-2:      #8a93a6;
  --text-3:      #5a6478;

  --accent:      #c8a96e;        /* gold */
  --accent-2:    #e8c98a;        /* lighter gold */
  --accent-glow: rgba(200,169,110,0.18);
  --accent-rgb:  200,169,110;

  --blue:        #3b7fd4;
  --teal:        #2dd4bf;
  --error:       #e05555;
  --success:     #4caf74;

  --radius:      12px;
  --radius-lg:   20px;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --nav-h:       72px;
  --transition:  0.4s cubic-bezier(0.16,1,0.3,1);
  --transition-fast: 0.2s ease;
}

/* Light theme */
[data-theme="light"] {
  --bg:        #f5f3ee;
  --bg-2:      #edeae3;
  --bg-3:      #e3dfd6;
  --surface:   #ffffff;
  --surface-2: #f8f6f0;
  --border:    rgba(0,0,0,0.08);
  --border-2:  rgba(0,0,0,0.14);
  --text:      #1a1c22;
  --text-2:    #4a5068;
  --text-3:    #8a93a6;
  --accent-glow: rgba(200,169,110,0.12);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* Selection */
::selection { background: var(--accent); color: #000; }


/* ════════════════════════════════════════
   LOADER
════════════════════════════════════════ */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s, visibility 0.6s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.loader__ring {
  width: 44px; height: 44px;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loader__text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: 0.08em;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ════════════════════════════════════════
   CUSTOM CURSOR
════════════════════════════════════════ */
@media (pointer: fine) {
  * { cursor: none; }
  .cursor {
    position: fixed;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
  }
  .cursor-follower {
    position: fixed;
    width: 32px; height: 32px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    transition: transform 0.15s ease, width 0.3s, height 0.3s, opacity 0.3s;
  }
  .cursor.hovering { transform: translate(-50%, -50%) scale(2); }
  .cursor-follower.hovering { width: 48px; height: 48px; opacity: 0.25; }
}


/* ════════════════════════════════════════
   NAVBAR
════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 60px);
  z-index: 900;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.navbar.scrolled {
  background: rgba(8,11,16,0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="light"] .navbar.scrolled {
  background: rgba(245,243,238,0.85);
}

/* Logo */
.nav__logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.logo__mark {
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.logo__mark:hover { background: var(--accent); color: #000; }
.logo__dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }

/* Nav Links */
.nav__links {
  display: flex; align-items: center; gap: 36px;
}
.nav__link {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.04em;
  position: relative;
  transition: color var(--transition-fast);
}
.nav__link::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav__link:hover, .nav__link.active { color: var(--text); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

/* Nav Actions */
.nav__actions { display: flex; align-items: center; gap: 16px; }
.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  color: var(--text-2);
  font-size: 14px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 28px; padding: 4px;
}
.hamburger span {
  display: block; height: 1.5px; background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  z-index: 800;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 32px; text-align: center; }
.mobile-link {
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 56px);
  font-weight: 300;
  color: var(--text-2);
  transition: color var(--transition-fast);
}
.mobile-link:hover { color: var(--accent); }


/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  padding: 13px 28px;
  border-radius: 8px;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  position: relative; overflow: hidden;
  white-space: nowrap;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn:hover::before { opacity: 1; }

.btn--primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  box-shadow: 0 4px 24px rgba(var(--accent-rgb),0.3);
}
.btn--primary:hover {
  box-shadow: 0 6px 32px rgba(var(--accent-rgb),0.5);
  transform: translateY(-2px);
}
.btn--outline {
  border: 1.5px solid var(--border-2);
  color: var(--text);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  color: var(--text-2);
}
.btn--ghost:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.btn--sm { padding: 9px 20px; font-size: 13px; }
.btn--full { width: 100%; justify-content: center; }


/* ════════════════════════════════════════
   CONTAINER & SECTION BASE
════════════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.section {
  padding: clamp(80px, 12vw, 140px) 0;
  position: relative;
}
.section + .section {
  border-top: 1px solid var(--border);
}

.section__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}
.section__heading em {
  font-style: italic;
  color: var(--accent);
}

.section__sub {
  font-size: 16px;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 60px;
}


/* ════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
════════════════════════════════════════ */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1),
              transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0,0);
}

/* Staggered delay for cards */
[style*="--delay:0"] { transition-delay: 0ms; }
[style*="--delay:1"] { transition-delay: 80ms; }
[style*="--delay:2"] { transition-delay: 160ms; }
[style*="--delay:3"] { transition-delay: 240ms; }
[style*="--delay:4"] { transition-delay: 320ms; }
[style*="--delay:5"] { transition-delay: 400ms; }
[style*="--delay:6"] { transition-delay: 480ms; }
[style*="--delay:7"] { transition-delay: 560ms; }


/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: var(--nav-h) clamp(20px, 5vw, 60px) 0;
  overflow: hidden;
}

.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.hero__noise {
  position: absolute; inset: 0;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
  background-size: 160px;
  pointer-events: none;
}

.hero__content {
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 99px;
  padding: 8px 18px;
  margin-bottom: 32px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(8px);
}
.badge__dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px var(--success); }
  50% { box-shadow: 0 0 20px var(--success); }
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(64px, 14vw, 140px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  display: block;
}
.name__line { display: block; }
.name__line--accent {
  -webkit-text-stroke: 1.5px var(--accent);
  color: transparent;
  font-style: italic;
}

.hero__title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: clamp(14px, 2vw, 18px);
  color: var(--text-2);
  margin-bottom: 28px;
}
.title__prefix { color: var(--accent); font-size: 1.3em; }
.title__cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__tagline {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 44px;
  max-width: 540px;
}
.hero__tagline em { color: var(--text); font-style: normal; font-weight: 500; }

.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 60px; }

.hero__scroll {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.12em;
}
.scroll__line {
  width: 40px; height: 1px;
  background: var(--text-3);
  position: relative;
  overflow: hidden;
}
.scroll__line::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollLine 2s ease infinite;
}
@keyframes scrollLine {
  to { left: 200%; }
}

/* Hero stats */
.hero__stats {
  position: absolute; right: clamp(20px, 5vw, 80px); bottom: clamp(40px, 8vw, 100px);
  display: flex; flex-direction: column; gap: 0;
  z-index: 2;
  align-items: center;
}
.stat { text-align: center; padding: 20px 28px; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
}
.stat__num::after { content: '+'; font-size: 0.6em; color: var(--accent); }
.stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}
.stat__divider {
  width: 1px; height: 40px;
  background: var(--border-2);
}


/* ════════════════════════════════════════
   ABOUT — Single column, no photo
════════════════════════════════════════ */
.about { background: var(--bg-2); }

.about__solo {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.about__bio-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 28px;
  border-left: 2px solid var(--accent);
}

.about__bio {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-2);
}
.about__bio strong { color: var(--text); font-weight: 500; }
.about__bio em { color: var(--accent); font-style: normal; }

.about__bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.about__tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  border-radius: 99px;
  color: var(--text-2);
  transition: all var(--transition-fast);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

.about__location {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
}
.about__location i { color: var(--accent); }


/* ════════════════════════════════════════
   SKILLS
════════════════════════════════════════ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.skill-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px var(--border-2);
}
.skill-card:hover::before { opacity: 1; }

.skill-card__icon {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 16px;
}
.skill-card__name {
  font-size: 16px; font-weight: 600;
  margin-bottom: 8px;
}
.skill-card__desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 20px;
}
.skill-card__bar {
  height: 3px;
  background: var(--border-2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.skill-card__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
}
.skill-card__pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}


/* ════════════════════════════════════════
   PROJECTS
════════════════════════════════════════ */
.projects { background: var(--bg-2); }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  border-color: var(--border-2);
}

.project-card__img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface-2);
}

/* Real screenshot images */
.project-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.project-card:hover .project-card__img img {
  transform: scale(1.05);
}

.project-card__preview {
  width: 100%; height: 100%;
  background: var(--surface-2);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px; color: var(--text-3);
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  position: relative;
}
.project-card__preview::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%,
    rgba(var(--accent-rgb),0.12) 0%, transparent 70%);
}
.project-card__preview i {
  font-size: 36px;
  color: var(--accent);
  opacity: 0.7;
}

.project-card__overlay {
  position: absolute; inset: 0;
  background: rgba(8,11,16,0.88);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-card__overlay { opacity: 1; }

.project-link {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--text);
  padding: 10px 20px;
  border: 1.5px solid var(--border-2);
  border-radius: 8px;
  transition: all var(--transition-fast);
}
.project-link:hover { border-color: var(--accent); color: var(--accent); }

.project-card__body { padding: 24px; }
.project-card__title {
  font-size: 18px; font-weight: 600;
  margin-bottom: 10px;
}
.project-card__desc {
  font-size: 14px; color: var(--text-2);
  line-height: 1.7; margin-bottom: 16px;
}
.project-card__tech {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.project-card__tech span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-3);
}


/* ════════════════════════════════════════
   EXPERIENCE / TIMELINE
════════════════════════════════════════ */
.timeline {
  position: relative;
  max-width: 800px;
  padding-left: 40px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline__item {
  position: relative;
  padding-bottom: 60px;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -44px; top: 8px;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: border-color var(--transition);
}
.timeline__card:hover { border-color: var(--border-2); }
.timeline__card--dashed { border-style: dashed; }

.timeline__role {
  font-size: 20px; font-weight: 600;
  margin-bottom: 8px;
}
.timeline__company {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--accent);
  margin-bottom: 16px;
}
.timeline__desc {
  font-size: 15px; color: var(--text-2);
  line-height: 1.75; margin-bottom: 16px;
}
.timeline__list {
  list-style: none; display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}
.timeline__list li {
  font-size: 14px; color: var(--text-2);
  padding-left: 18px; position: relative;
  line-height: 1.6;
}
.timeline__list li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--accent); font-size: 12px;
}
.timeline__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline__tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(var(--accent-rgb),0.25);
  border-radius: 4px;
  color: var(--accent-2);
}


/* ════════════════════════════════════════
   SERVICES
════════════════════════════════════════ */
.services { background: var(--bg-2); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.service-card__num {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 300;
  color: var(--border);
  line-height: 1;
  position: absolute; top: 16px; right: 24px;
  transition: color var(--transition);
}
.service-card:hover .service-card__num { color: var(--border-2); }

.service-card__icon {
  font-size: 30px; color: var(--accent);
  margin-bottom: 20px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow);
  border-radius: 12px;
  transition: transform var(--transition);
}
.service-card:hover .service-card__icon { transform: scale(1.1) rotate(-5deg); }

.service-card__title {
  font-size: 18px; font-weight: 600;
  margin-bottom: 12px;
}
.service-card__desc {
  font-size: 14px; color: var(--text-2);
  line-height: 1.75;
}


/* ════════════════════════════════════════
   CONTACT
════════════════════════════════════════ */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 8vw, 100px);
  align-items: start;
}

.contact__info { display: flex; flex-direction: column; gap: 32px; }

.contact__info-title {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 300;
  color: var(--text);
}

.contact__item {
  display: flex; align-items: flex-start; gap: 16px;
}
.contact__item-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px; color: var(--accent);
}
.contact__item-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.contact__item-val {
  font-size: 15px;
  color: var(--text-2);
  transition: color var(--transition-fast);
}
.contact__item-val:hover { color: var(--accent); }

.contact__social { display: flex; gap: 12px; }
.social-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  font-size: 16px; color: var(--text-2);
  transition: all var(--transition-fast);
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* Form */
.contact__form { display: flex; flex-direction: column; gap: 28px; }

.form-group {
  position: relative;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 18px 20px 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition-fast);
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group label {
  position: absolute;
  top: 16px; left: 20px;
  font-size: 14px; color: var(--text-3);
  pointer-events: none;
  transition: all var(--transition-fast);
}
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: 6px;
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.form-line {
  position: absolute; bottom: 0; left: 0;
  height: 2px; width: 0;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s;
}
.form-group:focus-within .form-line { width: 100%; }

.form__feedback {
  font-size: 14px; text-align: center;
  min-height: 20px; transition: color 0.3s;
}
.form__feedback.success { color: var(--success); }
.form__feedback.error { color: var(--error); }


/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.footer__name { color: var(--text-2); }

.footer__copy {
  font-size: 13px; color: var(--text-3);
  text-align: center;
}
.heart { color: var(--accent); }

.footer__top {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--text-2);
  font-size: 14px;
  transition: all var(--transition-fast);
}
.footer__top:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-3px);
}


/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero__stats {
    flex-direction: row;
    position: static;
    margin-top: 48px;
    border-top: 1px solid var(--border);
    padding-top: 28px;
    width: 100%;
    justify-content: flex-start;
  }
  .stat__divider { width: 40px; height: 1px; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .hamburger { display: flex; }
  .btn--outline.btn--sm { display: none; }

  .hero__name { font-size: clamp(52px, 18vw, 80px); }

  .skills__grid,
  .projects__grid,
  .services__grid { grid-template-columns: 1fr; }

  .timeline { padding-left: 24px; }
  .timeline__dot { left: -28px; }
  .timeline__card { padding: 20px; }

  .footer__inner { justify-content: center; text-align: center; }
  .footer__top { margin-left: auto; }
}

@media (max-width: 480px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}

/* ════════════════════════════════════════
   UTILITY — Noise overlay on bg-2 sections
════════════════════════════════════════ */
.about::before,
.projects::before,
.services::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
}


/* ════════════════════════════════════════
   PROMPT LIBRARY — Premium v2
════════════════════════════════════════ */

/* ── Section header ── */
.prompts { background: var(--bg); }

/* ── Toolbar ── */
.prompts__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 44px;
}

.prompts__search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 380px;
}
.prompts__search i {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 14px;
  pointer-events: none;
  transition: color var(--transition-fast);
}
.prompts__search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 13px 18px 13px 44px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.prompts__search input::placeholder { color: var(--text-3); }
.prompts__search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.prompts__search:focus-within i { color: var(--accent); }

.prompts__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prompt-filter-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border: 1px solid var(--border-2);
  border-radius: 99px;
  color: var(--text-2);
  background: transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}
.prompt-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.prompt-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}

/* ── Stats bar ── */
.prompts__stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
.prompts__count strong { color: var(--accent); font-size: 14px; }

/* ── Grid ── */
.prompts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ── Card ── */
.prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.prompt-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-2);
  box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 0 0 1px var(--border-2);
}
.prompt-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Thumbnail */
.prompt-card__thumb {
  width: 100%;
  aspect-ratio: 16/7;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.prompt-card__thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.prompt-card:hover .prompt-card__thumb-img { transform: scale(1.05); }

/* SVG-generated thumbnail fallback (rendered via JS canvas) */
.prompt-card__thumb-canvas {
  width: 100%; height: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.prompt-card:hover .prompt-card__thumb-canvas { transform: scale(1.05); }

/* Thumb overlay gradient */
.prompt-card__thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20,27,38,0.7) 100%);
  pointer-events: none;
}

/* Category badge on thumb */
.prompt-card__badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(8,11,16,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--accent);
  font-weight: 500;
}

/* Quick-copy on thumb */
.prompt-card__quick-copy {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,11,16,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  transition: all var(--transition-fast);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
}
.prompt-card:hover .prompt-card__quick-copy {
  opacity: 1;
  transform: scale(1);
}
.prompt-card__quick-copy:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.prompt-card__quick-copy.copied {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* Card body */
.prompt-card__body {
  padding: 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prompt-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin: 0;
}

.prompt-card__desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Standard property for compatibility */
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card footer */
.prompt-card__footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.prompt-card__meta-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.prompt-card__chars {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}
.prompt-card__view-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  padding: 8px 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 8px;
  background: var(--accent-glow);
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}
.prompt-card__view-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.prompt-card__view-btn i { font-size: 11px; }

/* ── Empty state ── */
.prompts__empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-3);
}
.prompts__empty i { font-size: 36px; margin-bottom: 16px; display: block; opacity: 0.4; }

/* ══════════════════════════════════════
   PROMPT MODAL — Premium Split Panel
══════════════════════════════════════ */
.prompt-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}
.prompt-modal.open { opacity: 1; visibility: visible; }

.prompt-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 8, 14, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="light"] .prompt-modal__backdrop {
  background: rgba(230, 226, 218, 0.88);
}

/* Modal box */
.prompt-modal__box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 960px;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 48px 120px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  transform: translateY(28px) scale(0.97);
  transition: transform 0.38s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.prompt-modal.open .prompt-modal__box {
  transform: translateY(0) scale(1);
}

/* Modal header */
.prompt-modal__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.prompt-modal__header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.prompt-modal__header-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  color: #000;
}
.prompt-modal__header-text { min-width: 0; }
.prompt-modal__category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  display: block;
}
.prompt-modal__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prompt-modal__close {
  width: 38px; height: 38px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  color: var(--text-2);
  font-size: 17px;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.prompt-modal__close:hover { border-color: var(--accent); color: var(--accent); }

/* Modal body — split layout */
.prompt-modal__body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Left panel — image */
.prompt-modal__image-panel {
  position: relative;
  background: var(--bg-3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prompt-modal__image-panel::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.2) 100%);
  pointer-events: none;
}
.prompt-modal__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.prompt-modal__canvas {
  width: 100%; height: 100%;
  display: block;
}

/* Right panel — content */
.prompt-modal__content-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--border);
}
.prompt-modal__content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.prompt-modal__content-scroll::-webkit-scrollbar { width: 5px; }
.prompt-modal__content-scroll::-webkit-scrollbar-track { background: transparent; }
.prompt-modal__content-scroll::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }

.prompt-modal__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.prompt-modal__content {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0;
}

/* Modal footer */
.prompt-modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  background: var(--surface);
}

/* Copy success toast inside modal */
.copy-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--success);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.copy-toast.show { opacity: 1; transform: translateX(0); }

/* ── Card inline copy toast ── */
.card-copy-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--success);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}
.card-copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════
   RESPONSIVE — Prompt Library
══════════════════════════════════════ */

@media (max-width: 860px) {
  /* Modal goes full split -> stacked */
  .prompt-modal__body {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
  }
  .prompt-modal__image-panel { height: 220px; }
  .prompt-modal__content-panel { border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .prompts__grid {
    grid-template-columns: 1fr;
  }
  .prompt-modal { padding: 0; align-items: flex-end; }
  .prompt-modal__box {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92dvh;
    transform: translateY(100%);
  }
  .prompt-modal.open .prompt-modal__box { transform: translateY(0); }
  .prompt-modal__body { grid-template-rows: 180px 1fr; }
  .prompt-modal__image-panel { height: 180px; }
  .prompt-modal__header { padding: 16px 18px; }
  .prompt-modal__title { font-size: 16px; }
  .prompt-modal__content-scroll { padding: 16px 18px; }
  .prompt-modal__footer { padding: 12px 18px; }
  .prompt-filter-btn { font-size: 10px; padding: 7px 12px; }
  .prompts__toolbar { gap: 10px; }
  .prompts__search { max-width: 100%; }
  /* Quick copy always visible on touch */
  .prompt-card__quick-copy { opacity: 1; transform: scale(1); }
}

/* ── Modal header icon (colored by JS) ── */
.prompt-modal__header-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  color: #fff;
  background: var(--surface-2);
  transition: background var(--transition);
}

/* ── Mobile global improvements ── */
@media (max-width: 768px) {
  .hero__name { letter-spacing: -0.015em; }
  .section__heading { letter-spacing: -0.01em; }
  .about__bottom { flex-direction: column; align-items: flex-start; }
  .services__grid { grid-template-columns: 1fr; }
  .prompts__stats { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .btn { padding: 12px 22px; font-size: 14px; }
  .skill-card { padding: 22px; }
  .project-card__body { padding: 18px; }
  .prompt-card__footer { flex-wrap: wrap; }
  .nav__links { gap: 20px; }
}
