/* ============================================
   JASWANT SINGH — Portfolio
   ============================================ */

/* --- CSS Variables --- */
:root {
  --designer-warm: #DFC8B3;
  --designer-accent: #DCAC51;
  --designer-dark: #60514A;
  --designer-bg: #f5e6d3;
  --designer-shirt: #D4956A;

  --coder-bg: #0a0a0f;
  --coder-accent: #00d4aa;
  --coder-surface: #1a1a2e;
  --coder-text: #a0a0b0;

  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-light: #f0f0f0;
  --bg-light: #fafafa;
  --bg-white: #ffffff;
  --border: #e0e0e0;
  --turban: #6B1D3A;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --nav-height: 70px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
  --max-width: 1200px;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--coder-bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-initials {
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--designer-accent), var(--coder-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulseScale 1.2s ease-in-out infinite;
}
@keyframes pulseScale {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.7; }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
}
.nav.scrolled {
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}
.nav.dark {
  background: rgba(10,10,15,0.92);
  border-bottom-color: rgba(255,255,255,0.06);
}
.nav.dark .nav-logo { color: var(--text-light); }
.nav.dark .nav-link { color: var(--coder-text); }
.nav.dark .nav-link:hover { color: var(--coder-accent); }
.nav.dark .hamburger span { background: var(--text-light); }

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.nav-logo span {
  background: linear-gradient(135deg, var(--designer-accent), var(--turban));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--designer-accent);
  transition: var(--transition);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.nav-link:hover { color: var(--text-primary); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 5px;
  z-index: 1001;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  z-index: 999;
}
.nav-mobile.dark { background: rgba(10,10,15,0.98); }
.nav-mobile.active { display: flex; }
.nav-mobile .nav-link { font-size: 1.5rem; }

/* --- Hero Split Section --- */
/* ═══════════════════════════════════════════════════════════
   HERO SPLIT — Adham Dannaway–style split-screen animation
   ═══════════════════════════════════════════════════════════ */
.hero-split {
  display: flex;
  flex-direction: row;          /* always side-by-side — never stacks */
  /* Height scales with viewport WIDTH so it shrinks on small screens */
  height: clamp(320px, 56vw, 100vh);
  position: relative;
  overflow: hidden;
  background: #f5ece0;          /* shared warm-cream fallback */
  isolation: isolate;
}

/* ── Two halves ───────────────────────────────────────── */
.hero-half {
  flex: 1;
  position: relative;
  cursor: pointer;
  /* Adham's signature snap easing */
  transition: flex 0.65s cubic-bezier(0.76, 0, 0.24, 1);
  overflow: hidden;
  display: flex;
  align-items: center;
  will-change: flex;
}

/* Both halves share the SAME warm-cream background — exactly like Adham */
.hero-half.designer {
  background: #f5ece0;
  justify-content: flex-start;
  padding-left: clamp(2rem, 5vw, 6rem);
}
.hero-half.coder {
  background: #f5ece0;
  justify-content: flex-end;
  padding-right: clamp(2rem, 5vw, 6rem);
}

/* ── Hover expand / contract (JS adds these classes) ─── */
.hero-split.hover-designer .hero-half.coder    { flex: 0.52; }
.hero-split.hover-designer .hero-half.designer { flex: 1.48; }
.hero-split.hover-coder    .hero-half.designer { flex: 0.52; }
.hero-split.hover-coder    .hero-half.coder    { flex: 1.48; }

/* ── Centre divider line (thin, softly visible, hides on hover) ── */
.hero-divider {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(96,81,74,0.18) 15%,
    rgba(96,81,74,0.28) 50%,
    rgba(96,81,74,0.18) 85%,
    transparent 100%
  );
  z-index: 22;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.50s ease;
}
.hero-split.hover-designer .hero-divider,
.hero-split.hover-coder    .hero-divider { opacity: 0; }

/* ── Adham-style decorative accent panels ─────────────
   Mirrors #designer-bg / #coder-bg from adhamdannaway.com.
   They live at the inner edge of each half and slide away
   when hovering the opposite side.
   ────────────────────────────────────────────────────── */
.hero-deco-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(50px, 7vw, 100px);
  z-index: 3;
  pointer-events: none;
  transition:
    transform 0.65s cubic-bezier(0.76, 0, 0.24, 1),
    opacity   0.55s ease;
}
.designer-deco-bg {
  right: 0;
  background: linear-gradient(to left, rgba(96,81,74,0.12) 0%, transparent 100%);
}
.coder-deco-bg {
  left: 0;
  background: linear-gradient(to right, rgba(96,81,74,0.12) 0%, transparent 100%);
}
/* Slide away on opposite-side hover */
.hero-split.hover-coder    .designer-deco-bg { transform: translateX(-120%); opacity: 0; }
.hero-split.hover-designer .coder-deco-bg    { transform: translateX(120%);  opacity: 0; }

/* ── Centered portrait — two PNGs clipped to each half ─ */
.hero-portrait-centered {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  /* Width drives sizing — portrait fills section height naturally via object-fit */
  height: 100%;
  width: clamp(260px, 38vw, 560px);
  pointer-events: none;
  z-index: 14;
}

/* Both images stacked, each clipped to its own half */
.portrait-half {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  transition:
    clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1),
    opacity   0.50s ease;
}
.portrait-designer { clip-path: inset(0 50% 0 0); }   /* left half  */
.portrait-coder    { clip-path: inset(0 0 0 50%); }   /* right half */

/* Hover designer → expand designer photo, hide coder */
.hero-split.hover-designer .portrait-designer { clip-path: inset(0 0 0 0); }
.hero-split.hover-designer .portrait-coder    { clip-path: inset(0 0 0 100%); opacity: 0; }

/* Hover coder → expand coder photo, hide designer */
.hero-split.hover-coder .portrait-coder    { clip-path: inset(0 0 0 0); }
.hero-split.hover-coder .portrait-designer { clip-path: inset(0 100% 0 0); opacity: 0; }

/* ── Inactive side content fades ──────────────────────── */
.hero-split.hover-designer .hero-half.coder    .hero-half-content,
.hero-split.hover-coder    .hero-half.designer .hero-half-content {
  opacity: 0;
  pointer-events: none;
}

/* ── Content block ──────────────────────────────────────── */
.hero-half-content {
  position: relative;
  z-index: 8;
  max-width: 340px;
  /* No vertical padding — flexbox centres it */
  transition: opacity 0.50s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}
.designer .hero-half-content { text-align: left; }
.coder    .hero-half-content { text-align: right; }

/* ── Hero label — "DESIGNER" / "<CODER />" ── */
.hero-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7a6a60;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.hero-label::before,
.hero-label::after {
  content: '';
  display: block;
  height: 1px;
  width: 22px;
  background: currentColor;
  opacity: 0.6;
}
.coder .hero-label {
  color: #00d4aa;
  justify-content: flex-end;
}

/* ── Main title ── */
.hero-title {
  font-size: clamp(3rem, 5.5vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 0;
  color: #3d3028;
}

/* ── Hero title float/bounce animation ─── */
@keyframes heroFloat {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.designer .hero-title {
  animation: heroFloat 3.2s ease-in-out infinite;
}
.coder .hero-title {
  animation: heroFloat 3.2s ease-in-out infinite;
  animation-delay: 0.8s;
}

/* ── Subtitle — sits below the title, visible always ─── */
.hero-subtitle {
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  line-height: 1.6;
  color: #555;
  margin-top: 1rem;
  transition: opacity 0.4s ease;
}
.designer .hero-subtitle { margin-right: 0; }
.coder    .hero-subtitle { margin-left: auto; }

/* ── Hero CTA Buttons ───────────────────────────────────── */
.hero-btn {
  display: inline-block;
  margin-top: 1.6rem;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  font-size: clamp(0.75rem, 1.1vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Filled — designer side (gold) */
.hero-btn--filled {
  background: #DCAC51;
  color: #fff;
  border: 2px solid #DCAC51;
}
.hero-btn--filled:hover {
  background: #c9972e;
  border-color: #c9972e;
}

/* Outline — coder side */
.hero-btn--outline {
  background: transparent;
  color: #444;
  border: 2px solid #888;
}
.hero-btn--outline:hover {
  background: rgba(0,0,0,0.05);
  border-color: #555;
}

/* Hide buttons on very small screens */
@media (max-width: 600px) {
  .hero-btn { display: none; }
}

/* Background decoration particles */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Scroll indicator — pointer-events:none so it never blocks half hover */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: bounce 2s infinite;
  pointer-events: none;
}
.scroll-indicator span {
  font-size: 0.68rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  mix-blend-mode: difference;
}
.scroll-indicator .arrow {
  width: 18px;
  height: 18px;
  border-right: 1.5px solid rgba(255,255,255,0.4);
  border-bottom: 1.5px solid rgba(255,255,255,0.4);
  transform: rotate(45deg);
  mix-blend-mode: difference;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Section Commons --- */
.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 4vw, 3rem);
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-label {
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--designer-accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* --- Selected Works Grid --- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.work-card {
  background: var(--bg-white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.work-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.11);
  border-color: transparent;
}

/* ── Browser-frame chrome on work card thumbnails ── */
.work-card-thumb {
  height: 240px;
  overflow: hidden;
  position: relative;
  background: #0f0f1a;
}

/* Chrome bar */
.work-card-thumb::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 32px;
  background: linear-gradient(180deg, #1c1c2e 0%, #15152a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 3;
  pointer-events: none;
}

/* Traffic-light dots */
.work-card-thumb::after {
  content: '';
  position: absolute;
  top: 11px; left: 14px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
  z-index: 4;
  pointer-events: none;
}

/* URL bar suggestion in center of chrome */
.work-card-thumb .url-bar {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 16px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
  z-index: 4;
  pointer-events: none;
}

/* Screenshot sits below chrome bar */
.work-card-thumb img {
  position: absolute;
  top: 32px; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: calc(100% - 32px);
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s ease;
}
.work-card:hover .work-card-thumb img {
  transform: scale(1.04);
}

/* Screen reflection on hover */
.work-card-thumb .screen-glare {
  position: absolute;
  top: 32px; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 50%);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.work-card:hover .work-card-thumb .screen-glare { opacity: 1; }

.work-card-thumb .placeholder-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}
.work-card-body {
  padding: 1.5rem;
}
.work-card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.work-card-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
}
.work-card-tag.design { background: #fef3e2; color: #b8860b; }
.work-card-tag.code { background: #e8faf5; color: #0a8a6a; }
.work-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.work-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.work-card-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.work-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--designer-accent);
  transition: var(--transition-fast);
  text-decoration: none;
}
.work-card-link:hover { gap: 0.7rem; }
.work-card-link svg { transition: var(--transition-fast); }
.work-card-live {
  color: var(--coder-accent);
  opacity: 0.85;
}
.work-card-live:hover { opacity: 1; gap: 0.7rem; }

/* --- About Section --- */
.about-section { background: var(--bg-light); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}
.about-photo {
  width: 100%;
  max-width: 320px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

/* About Info Panel */
.about-info-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-self: start;
}
.about-info-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 18px;
  padding: 1.5rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.about-info-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.about-info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.about-info-icon svg {
  width: 48px;
  height: 48px;
}
.about-info-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #999);
  margin-bottom: 0.25rem;
}
.about-info-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.about-info-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.about-status-available {
  color: #22c55e;
}

/* About Social Links */
.about-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.about-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.25s ease;
}
.about-social-link:hover {
  background: var(--designer-accent);
  border-color: var(--designer-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220,172,81,0.35);
}
.about-social-link svg { flex-shrink: 0; }

.about-text h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.about-text .highlight {
  color: var(--designer-accent);
  font-weight: 600;
}

/* Pie Chart */
.charts-section {
  margin-top: 3rem;
}
.charts-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 2rem;
}
.pie-chart-container {
  position: relative;
  width: 220px;
  height: 220px;
}
.pie-chart-container svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.pie-chart-container .pie-center-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}
.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Bar Chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.bar-track {
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 10px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.bar-fill.animated { will-change: width; }

/* --- Footer --- */
/* --- Coming Soon Modal --- */
#coming-soon-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#coming-soon-modal.active { display: flex; }
.coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.coming-soon-box {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.coming-soon-icon { font-size: 3rem; margin-bottom: 1rem; }
.coming-soon-box h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }
.coming-soon-box p  { color: var(--text-secondary); margin-bottom: 1.5rem; line-height: 1.6; }
.coming-soon-box p a { color: var(--designer-accent); font-weight: 600; }

.footer {
  padding: 3rem clamp(1.5rem, 4vw, 3rem);
  background: var(--coder-bg);
  color: var(--coder-text);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-text {
  font-size: 0.85rem;
  opacity: 0.7;
}
.footer-socials {
  display: flex;
  gap: 1rem;
}
.footer-social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  transition: var(--transition);
  color: var(--coder-text);
}
.footer-social:hover {
  background: var(--coder-accent);
  color: var(--coder-bg);
  transform: translateY(-3px);
}
.footer-social svg { width: 18px; height: 18px; }

/* --- Design Portfolio Page --- */
.portfolio-hero {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 4rem;
  text-align: center;
  background: linear-gradient(135deg, #f5e6d3, #e8d5c0);
}
.portfolio-hero .section-title { color: var(--designer-dark); }
.portfolio-hero .section-subtitle { color: var(--designer-dark); opacity: 0.7; margin: 0 auto; }

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(255,255,255,0.5);
  color: var(--designer-dark);
  transition: var(--transition-fast);
  border: 1px solid transparent;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--designer-accent);
  color: #fff;
}

/* --- Code Portfolio Page --- */
.code-hero {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
}
.code-hero .section-label { color: var(--coder-accent); }
.code-hero .section-title { color: var(--text-primary); }
.code-hero .section-subtitle { color: var(--text-secondary); margin: 0 auto; }

/* Code projects - sliding text animation */
.code-project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
  align-items: center;
  overflow: hidden;
}
.code-project:nth-child(even) { direction: rtl; }
.code-project:nth-child(even) > * { direction: ltr; }
.code-project-image {
  width: 100%;
  height: 100%;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: radial-gradient(ellipse at 40% 50%, rgba(180,200,255,0.15) 0%, var(--bg-light) 100%);
}

/* Floating browser mockup frame */
.screen-mockup {
  width: 100%;
  max-width: 540px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.08),
    0 20px 60px rgba(0,0,0,0.12),
    0 0 40px rgba(180,200,255,0.12);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  position: relative;
  z-index: 2;
}
.code-project:hover .screen-mockup {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.1),
    0 30px 80px rgba(0,0,0,0.18),
    0 0 60px rgba(180,200,255,0.2);
}

/* Browser chrome bar */
.screen-chrome {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 14px;
  height: 36px;
  background: linear-gradient(180deg, #1a1a2e 0%, #13131f 100%);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  position: relative;
}

.screen-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.screen-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.screen-dot-red   { background: #ff5f57; }
.screen-dot-yellow{ background: #febc2e; }
.screen-dot-green { background: #28c840; }

.screen-url-bar {
  flex: 1;
  height: 18px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  margin: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.03em;
  overflow: hidden;
  white-space: nowrap;
}

/* Screenshot body */
.screen-body {
  position: relative;
  overflow: hidden;
  max-height: 360px;
}
.screen-body .project-visual {
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.6s ease;
}
.code-project:hover .screen-body .project-visual {
  transform: scale(1.02);
}

/* Screen glare overlay */
.screen-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.code-project-image .project-visual-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255,255,255,0.1);
}
.code-project-text {
  padding: clamp(2rem, 5vw, 5rem);
  transform: translateX(-80px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s ease;
}
.code-project-text.visible {
  transform: translateX(0);
  opacity: 1;
}
.code-project:nth-child(even) .code-project-text {
  transform: translateX(80px);
}
.code-project:nth-child(even) .code-project-text.visible {
  transform: translateX(0);
}
.code-project-text .project-num {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--coder-accent);
  letter-spacing: 2px;
  margin-bottom: 1rem;
}
.code-project-text h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.code-project-text p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.code-project-text .tech-stack {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.tech-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  transition: var(--transition-fast);
  position: relative;
}
.tech-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.tech-icon img { width: 22px; height: 22px; }
.tech-icon-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.project-btn.primary {
  background: var(--designer-accent);
  color: #fff;
}
.project-btn.primary:hover {
  background: #c9982e;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220,172,81,0.3);
}
.project-btn.outline {
  border: 2px solid var(--border);
  color: var(--text-primary);
}
.project-btn.outline:hover {
  border-color: var(--designer-accent);
  color: var(--designer-accent);
}

.alt-bg { background: var(--bg-light); }

/* --- Contact Page --- */
.contact-hero {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 3rem;
  text-align: center;
  background: var(--bg-light);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--designer-accent), var(--turban));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.contact-info-item h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.contact-info-item p { font-size: 0.9rem; color: var(--text-secondary); }
.contact-info-item a { color: var(--designer-accent); font-weight: 500; }
.contact-info-item a:hover { text-decoration: underline; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  background: var(--bg-white);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--designer-accent);
  box-shadow: 0 0 0 3px rgba(220,172,81,0.1);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.submit-btn {
  padding: 0.9rem 2.5rem;
  background: linear-gradient(135deg, var(--designer-accent), var(--turban));
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  align-self: flex-start;
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(107,29,58,0.2);
}

/* --- Project Detail Page --- */
.project-detail-hero {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 3rem;
  background: var(--bg-light);
}
.project-detail-hero .breadcrumb {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.project-detail-hero .breadcrumb a { color: var(--designer-accent); }
.project-detail-hero .breadcrumb a:hover { text-decoration: underline; }
.project-detail-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.project-detail-hero .project-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.project-meta-item {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.project-meta-item strong { color: var(--text-primary); }
.project-detail-hero .project-tech-icons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.project-detail-hero .project-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-detail-body {
  padding: clamp(3rem, 5vw, 5rem) clamp(1.5rem, 4vw, 3rem);
}
.project-detail-body .section-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}
.project-description h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
}
.project-description h2:first-child { margin-top: 0; }
.project-description p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.project-description ul {
  margin-bottom: 1rem;
  padding-left: 1.2rem;
}
.project-description ul li {
  color: var(--text-secondary);
  line-height: 1.8;
  position: relative;
  padding-left: 0.5rem;
  list-style: disc;
}
.project-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  align-self: start;
}
.project-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.project-sidebar .sidebar-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.project-sidebar .sidebar-section:last-child { border-bottom: none; }
.project-sidebar .tech-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-light);
  color: var(--text-secondary);
}
.tech-badge svg, .tech-badge img { width: 16px; height: 16px; }

.project-gallery {
  margin-top: 3rem;
}
.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.project-gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-light);
  aspect-ratio: 16/10;
}
.project-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.45s; opacity: 1; transform: none; }

/* --- 3D Card Tilt --- */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* --- Magnetic Button Effect --- */
.magnetic-wrap {
  display: inline-block;
  position: relative;
}

/* --- Custom Cursor --- */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--designer-accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.15s ease, opacity 0.3s ease;
  mix-blend-mode: difference;
  display: none;
}
.custom-cursor.visible { display: block; }
.custom-cursor.hovering {
  transform: scale(2);
  background: rgba(220,172,81,0.1);
}

/* --- Gradient Backgrounds for Project Cards --- */
.gradient-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.gradient-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.gradient-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.gradient-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.gradient-5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.gradient-6 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.gradient-7 { background: linear-gradient(135deg, #fccb90, #d57eeb); }
.gradient-8 { background: linear-gradient(135deg, #e0c3fc, #8ec5fc); }
.gradient-9 { background: linear-gradient(135deg, #f5576c, #ff6a00); }
.gradient-10 { background: linear-gradient(135deg, #0c3483, #a2b6df); }
.gradient-11 { background: linear-gradient(135deg, #C06C84, #6C5B7B); }
.gradient-12 { background: linear-gradient(135deg, #2BC0E4, #EAECC6); }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-info-panel { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; justify-items: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .project-detail-body .section-inner { grid-template-columns: 1fr; }
  .project-sidebar { position: static; }
}

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

  /* ── Hero stays side-by-side, height shrinks with width ── */
  /* (height is already set by the clamp() on .hero-split base rule) */
  .hero-half {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    /* vertically centre text (no extra padding) */
    align-items: center;
  }

  /* Portrait: fill full section height, width scales with viewport */
  .hero-portrait-centered {
    height: 100%;
    width: clamp(180px, 52vw, 320px);
  }

  /* Text block narrower — stays out of the portrait zone */
  .hero-half-content { max-width: 140px; }

  /* Hide big title and subtitle on small screens — label only */
  .hero-title    { display: none; }
  .hero-subtitle { display: none; }
  .hero-btn      { display: none; }

  /* Make the label larger so it reads clearly when it's the only text */
  .hero-label {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }
  .hero-label::before,
  .hero-label::after { width: 14px; }

  /* Inactive side fades — mouse hover works on mobile browsers too */
  .hero-split.hover-designer .hero-half.coder    .hero-half-content,
  .hero-split.hover-coder    .hero-half.designer .hero-half-content {
    opacity: 0;
    pointer-events: none;
  }

  /* ── Rest of page ── */
  .works-grid { grid-template-columns: 1fr; }

  .code-project { grid-template-columns: 1fr; min-height: auto; }
  .code-project:nth-child(even) { direction: ltr; }
  .code-project-image { min-height: 300px; }
  .code-project-text { transform: translateY(40px); }
  .code-project:nth-child(even) .code-project-text { transform: translateY(40px); }
  .code-project-text.visible,
  .code-project:nth-child(even) .code-project-text.visible { transform: translateY(0); }

  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── Small phones (≤ 480px) ── */
@media (max-width: 480px) {
  :root { --nav-height: 56px; }

  /* Even shorter section on tiny screens */
  .hero-split {
    height: clamp(240px, 90vw, 420px);
  }

  .hero-portrait-centered {
    height: 100%;
    width: clamp(140px, 50vw, 220px);
  }

  .hero-title        { font-size: clamp(1.1rem, 4.5vw, 1.8rem); }
  .hero-half-content { max-width: 110px; }
  .hero-half {
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
  }

  .section { padding: 3rem 1rem; }
  .portfolio-filters { gap: 0.5rem; }
  .filter-btn { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
}

/* ── Tablet (769px – 1024px) ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-portrait-centered {
    height: 100%;
    width: clamp(300px, 42vw, 480px);
  }
  .hero-half-content { max-width: 260px; }
  .hero-title        { font-size: clamp(2.4rem, 3.8vw, 4.5rem); }
}

/* --- Page Transition --- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: var(--coder-bg);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}
.page-transition.entering {
  animation: wipeIn 0.5s cubic-bezier(0.86, 0, 0.07, 1) forwards;
}
@keyframes wipeIn {
  0% { transform: scaleY(0); transform-origin: bottom; }
  50% { transform: scaleY(1); transform-origin: bottom; }
  50.01% { transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: top; }
}

/* --- Text Scramble --- */
.scramble { display: inline-block; }

/* --- Floating shapes (surprise decoration) --- */
.floating-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.03;
  animation: floatShape 20s ease-in-out infinite;
}
.floating-shape:nth-child(1) {
  width: 300px; height: 300px;
  background: var(--designer-accent);
  top: 20%; left: -5%;
  animation-delay: 0s;
}
.floating-shape:nth-child(2) {
  width: 200px; height: 200px;
  background: var(--coder-accent);
  top: 60%; right: -3%;
  animation-delay: -7s;
}
.floating-shape:nth-child(3) {
  width: 150px; height: 150px;
  background: var(--turban);
  bottom: 10%; left: 30%;
  animation-delay: -14s;
}
@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -30px) rotate(5deg); }
  50% { transform: translate(-20px, 20px) rotate(-3deg); }
  75% { transform: translate(15px, -15px) rotate(2deg); }
}
