/* ════════════════════════════════════════════
   Fahad Waseem Portfolio — Global Stylesheet
   ════════════════════════════════════════════ */

/* ─── Custom Properties ──────────────────────── */
:root {
  --bg:        #0C0F1A;
  --surface:   #111827;
  --surface-2: #1A2437;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.13);
  --blue:      #4B8EF7;
  --blue-dim:  rgba(75,142,247,0.13);
  --blue-dark: #3A7EF5;
  --purple:    #8B5CF6;
  --green:     #10B981;
  --text:      #E2E8F0;
  --muted:     #8B9CB6;
  --muted-2:   #4A5568;
  --tag-bg:    rgba(255,255,255,0.06);
  --tag-text:  #94A3B8;
  --nav-h:     70px;
  --max-w:     1280px;
  --r:         12px;
  --r-sm:      8px;
  --shadow:    0 4px 24px rgba(0,0,0,0.45);
}

/* ─── Reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { cursor: pointer; font: inherit; }

/* ─── Scroll progress bar ─────────────────────── */
.scroll-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--blue); z-index: 200; transition: width .1s linear;
  pointer-events: none;
}

/* ─── Maintenance banner ──────────────────────── */
.maintenance-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 20px;
  background: #1e1700;
  border-bottom: 1px solid #4a3a00;
  color: #d4a82a;
  font-size: 13px; font-weight: 500; line-height: 1.4;
  text-align: center;
}
.maintenance-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  color: #d4a82a;
}

[data-theme="light"] .maintenance-banner {
  background: #fefce8;
  border-bottom: 1px solid #fde047;
  color: #854d0e;
}
[data-theme="light"] .maintenance-icon { color: #ca8a04; }

/* toggle warning variant */
.toggle--warning .toggle-track { background: rgba(212, 168, 42, 0.15); border-color: rgba(212, 168, 42, 0.3); }
.toggle--warning input:checked ~ .toggle-track { background: rgba(212, 168, 42, 0.35); border-color: #d4a82a; }
.toggle--warning input:checked ~ .toggle-track .toggle-thumb { background: #d4a82a; }

/* ─── Skip link ───────────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--blue); color: #fff; padding: 8px 16px;
  border-radius: var(--r-sm); font-size: 13px; transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ─── Container ───────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ════════════════════════════════════════════
   NAVIGATION
   ════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(12,15,26,.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.nav.scrolled { background: rgba(12,15,26,.96); }

.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 8px;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 700; font-size: 17px; flex-shrink: 0;
}
.nav-brand-icon {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border-2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  font-size: 12px; color: var(--blue);
  font-family: 'Courier New', monospace; font-weight: 700;
}
.nav-brand-name { letter-spacing: -.01em; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: center;
}
.nav-links a {
  padding: 9px 18px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: color .15s, background .15s; white-space: nowrap;
  touch-action: manipulation;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-links a.active { color: #fff; background: var(--blue); }

.nav-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.nav-icon-btn {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none;
  transition: color .15s, background .15s;
  border: none; background: transparent; flex-shrink: 0;
  touch-action: manipulation;
}
.nav-icon-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-icon-btn svg { width: 22px; height: 22px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 6px; width: 36px; flex-shrink: 0;
}
.nav-toggle span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--muted); transition: all .25s;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-brand-name { display: none; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(12,15,26,.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start;
    padding: 10px 24px 20px; gap: 2px;
    backdrop-filter: blur(20px);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { width: 100%; padding: 11px 14px; font-size: 15px; }
  .nav-right .nav-icon-btn { display: none; }
}

/* ════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; text-decoration: none;
  border: none; transition: all .2s; cursor: pointer; white-space: nowrap;
  touch-action: manipulation;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover {
  background: var(--blue-dark); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(75,142,247,.3);
}
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.05); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ════════════════════════════════════════════
   TAGS
   ════════════════════════════════════════════ */
.tags, .stack-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag, .tags span, .stack-tags span {
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  background: var(--tag-bg); color: var(--tag-text); white-space: nowrap;
}

/* ════════════════════════════════════════════
   SHARED LAYOUT
   ════════════════════════════════════════════ */
.section { padding: 80px 0; }
.section-head { margin-bottom: 48px; }
.section-label {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(75,142,247,.3);
}
.section-head h2 { font-size: 2rem; font-weight: 700; }
.section-head p { margin-top: 10px; color: var(--muted); max-width: 540px; line-height: 1.7; }

.page-wrap { padding-top: calc(var(--nav-h) + 52px); padding-bottom: 80px; min-height: 100vh; }
.page-hero { padding-bottom: 48px; border-bottom: 1px solid var(--border); margin-bottom: 56px; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; margin-bottom: 10px; }
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 520px; line-height: 1.7; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .38s cubic-bezier(0.16,1,0.3,1), transform .38s cubic-bezier(0.16,1,0.3,1); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .07s; }
.reveal-d2 { transition-delay: .14s; }
.reveal-d3 { transition-delay: .21s; }
.reveal-d4 { transition-delay: .28s; }
.content-loader { color: var(--muted); font-size: 14px; padding: 24px 0; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); color: var(--text);
  padding: 10px 22px; border-radius: var(--r-sm); font-size: 14px;
  border: 1px solid var(--border-2); box-shadow: var(--shadow);
  z-index: 999; animation: toastIn .3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

.footer {
  border-top: 1px solid var(--border); padding: 28px 0;
  color: var(--muted-2); font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.back-top { color: var(--muted); text-decoration: none; font-size: 13px; transition: color .15s; }
.back-top:hover { color: var(--blue); }

/* ════════════════════════════════════════════
   HOME PAGE
   ════════════════════════════════════════════ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; padding-top: var(--nav-h);
}
.hero-layout {
  display: grid; grid-template-columns: 1fr auto;
  gap: 56px; align-items: center; padding: 72px 0 56px;
}
.hero-text { max-width: 560px; }

.avail-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16,185,129,.1); color: var(--green);
  border: 1px solid rgba(16,185,129,.22);
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500; margin-bottom: 24px;
}
.dot-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
  50% { opacity:.8; box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}
.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800;
  line-height: 1.08; margin-bottom: 16px; letter-spacing: -.02em;
}
.grad-text {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-role { font-size: 1.1rem; color: var(--muted); margin-bottom: 18px; font-weight: 500; }
.hero-bio { font-size: 1rem; color: var(--muted); line-height: 1.75; margin-bottom: 32px; max-width: 480px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-socials { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.hero-socials a { color: var(--muted); text-decoration: none; transition: color .15s; }
.hero-socials a:hover { color: var(--blue); }
.hero-socials span { color: var(--muted-2); }

.hero-visual { display: flex; align-items: center; justify-content: center; }
.avatar-float { animation: float 4.5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.avatar-img {
  width: 260px; height: 260px; border-radius: 50%;
  object-fit: contain; object-position: center;
  border: 2px solid var(--border-2); background: transparent;
  filter: drop-shadow(0 0 48px rgba(75,142,247,.22));
}

.stats-row {
  display: grid; grid-template-columns: repeat(4,1fr);
  border-top: 1px solid var(--border); padding-top: 32px;
}
.stat strong { display: block; font-size: 1.5rem; font-weight: 700; }
.stat span { font-size: 13px; color: var(--muted); }

/* ════════════════════════════════════════════
   SKILLS BAND — replaces scrolling marquee
   ════════════════════════════════════════════ */
.stack-band {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 32px 0; background: var(--surface);
}
.stack-clusters { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.stack-cluster { display: flex; flex-direction: column; gap: 10px; }
.stack-cluster-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--blue);
}
.stack-cluster-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-cluster-chips span {
  font-size: 12.5px; color: var(--muted); font-weight: 500;
  padding: 5px 12px; border-radius: 6px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  white-space: nowrap; cursor: default;
  transition: color .15s, border-color .15s, background .15s;
}
.stack-cluster-chips span:hover {
  color: var(--text); border-color: var(--blue); background: var(--blue-dim);
}
@media (max-width: 640px) {
  .stack-clusters { gap: 24px; }
  .stack-cluster-chips span { font-size: 12px; padding: 4px 10px; }
}

.featured-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 32px; }
.view-all-row { margin-top: 36px; text-align: center; }

/* ════════════════════════════════════════════
   WORK / EXPERIENCE
   ════════════════════════════════════════════ */
.timeline { display: flex; flex-direction: column; gap: 14px; }
.exp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 24px 28px;
  position: relative; overflow: hidden;
  transition: border-color .22s, transform .22s cubic-bezier(0.16,1,0.3,1);
  touch-action: manipulation; will-change: transform;
}
.exp-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--muted-2); border-radius: 2px 0 0 2px; opacity: .4;
}
.exp-card.is-current::before { background: var(--blue); opacity: 1; }
.exp-card:hover { border-color: var(--border-2); transform: translateX(2px); }
.exp-current {
  position: absolute; top: 18px; right: 18px;
  font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--green); background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.2); padding: 3px 9px; border-radius: 20px;
}
.exp-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.exp-header > div { flex: 1; min-width: 0; }
.exp-role { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 1px; }
.exp-company { font-size: .9rem; font-weight: 600; color: var(--blue); margin-bottom: 3px; }
.exp-location { font-size: 12px; color: var(--muted); }
.exp-period { font-size: 12px; color: var(--muted); white-space: nowrap; padding-right: 80px; }
.exp-desc { font-size: 13.5px; color: var(--muted); line-height: 1.75; margin-bottom: 14px; }

/* ─── FYP Badge ───────────────────────────────── */
.fyp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--purple); background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.25); padding: 3px 10px; border-radius: 20px;
}
.fyp-badge-overlay {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--purple); background: rgba(12,15,26,.82);
  border: 1px solid rgba(139,92,246,.35); padding: 3px 10px; border-radius: 20px;
  backdrop-filter: blur(6px);
}

/* ════════════════════════════════════════════
   PROJECTS GRID
   ════════════════════════════════════════════ */
.projects-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.projects-grid .project-card .project-img-wrap { height: 380px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: border-color .22s, transform .22s cubic-bezier(0.16,1,0.3,1), box-shadow .22s;
  cursor: pointer; touch-action: manipulation; will-change: transform;
}
.project-card:hover { border-color: var(--blue); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(75,142,247,.08); }
.project-card.hidden { display: none; }

.project-img-wrap { height: 180px; overflow: hidden; position: relative; background: var(--surface-2); }
.project-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.project-card:hover .project-img-wrap img { transform: scale(1.04); }
.project-placeholder {
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 25% 35%, rgba(75,142,247,0.18) 0%, transparent 52%),
    radial-gradient(ellipse at 75% 65%, rgba(139,92,246,0.13) 0%, transparent 52%),
    var(--surface-2);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.project-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.project-placeholder::after {
  content: '</>';
  position: absolute; z-index: 1;
  font-family: 'Courier New', monospace; font-size: 2.2rem; font-weight: 700;
  color: rgba(75,142,247,0.14); letter-spacing: -.03em; user-select: none;
}
.project-placeholder-icon { display: none; }
.project-placeholder img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 2; display: block; transition: transform .35s;
}
.project-card:hover .project-placeholder img { transform: scale(1.04); }
.project-img-links { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 5px; }
.project-img-links a {
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  background: rgba(12,15,26,.85); border-radius: 6px;
  color: var(--text); text-decoration: none; backdrop-filter: blur(6px);
  border: 1px solid var(--border-2); transition: background .15s, border-color .15s;
}
.project-img-links a:hover { background: var(--blue); border-color: var(--blue); }

.project-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.project-num { font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: 1.2px; }
.project-title { font-size: .97rem; font-weight: 700; line-height: 1.3; }
.project-desc { font-size: 13px; color: var(--muted); line-height: 1.65; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.project-tags span { font-size: 11px; padding: 3px 8px; border-radius: 20px; background: var(--tag-bg); color: var(--tag-text); }
/* Minimal project card footer (home + photography) */
.project-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 18px; border-top: 1px solid var(--border);
  min-width: 0;
}
.project-foot-title {
  font-size: .88rem; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.project-foot-arrow {
  color: var(--muted); flex-shrink: 0; margin-left: 12px;
  transition: color .15s, transform .2s;
}
.project-card:hover .project-foot-arrow { color: var(--blue); transform: translateX(4px); }

/* Project page: inline links in card body */
.project-links { display: flex; gap: 12px; margin-top: 10px; }
.card-link { font-size: 12px; font-weight: 600; color: var(--blue); text-decoration: none; transition: opacity .15s; }
.card-link:hover { opacity: .72; }

/* Section head with inline action (right-aligned View All button) */
.section-head-flex {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px;
}
.section-head-flex > div { flex: 1; min-width: 0; }

/* Home photography — staggered equal grid */
.photo-home-magazine {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
.photo-home-card {
  border-radius: var(--r); overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .22s cubic-bezier(0.16,1,0.3,1), border-color .22s;
  position: relative; aspect-ratio: 3/4;
  touch-action: manipulation; will-change: transform;
}
.photo-home-card:hover { transform: translateY(-4px); border-color: var(--border-2); }
.photo-home-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-home-magazine .photo-home-card:nth-child(2) { margin-top: 52px; }
.photo-home-magazine .photo-home-card:nth-child(3) { margin-top: 22px; }
@media (max-width: 900px) {
  .photo-home-magazine { grid-template-columns: repeat(2, 1fr); }
  .photo-home-magazine .photo-home-card:nth-child(2) { margin-top: 40px; }
  .photo-home-magazine .photo-home-card:nth-child(3) { margin-top: 0; }
}
@media (max-width: 600px) {
  .photo-home-magazine { grid-template-columns: 1fr; }
  .photo-home-magazine .photo-home-card { aspect-ratio: 4/3; }
  .photo-home-magazine .photo-home-card:nth-child(2),
  .photo-home-magazine .photo-home-card:nth-child(3) { margin-top: 0; }
}

.see-all-row { margin-top: 36px; text-align: center; }

/* ════════════════════════════════════════════
   HOME FEATURED PROJECTS — offset 2-col layout
   ════════════════════════════════════════════ */
.home-projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.home-projects-grid .project-card .project-img-wrap { height: 300px; }
.home-projects-grid .project-card:nth-child(2) { margin-top: 160px; }
@media (max-width: 768px) {
  .home-projects-grid { grid-template-columns: 1fr; }
  .home-projects-grid .project-card .project-img-wrap { height: 220px; }
  .home-projects-grid .project-card:nth-child(2) { margin-top: 0; }
}

/* ════════════════════════════════════════════
   PROJECT DETAIL — editorial layout
   ════════════════════════════════════════════ */
.back-btn {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); text-decoration: none; font-size: 14px;
  margin-bottom: 48px; transition: color .15s;
}
.back-btn:hover { color: var(--blue); }

/* pj = project detail page layout */
.pj-top-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.pj-num {
  font-size: 11px; font-weight: 700; color: var(--blue);
  letter-spacing: 1.6px; text-transform: uppercase;
}
.pj-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.06;
  letter-spacing: -.03em; margin-bottom: 28px;
}
.pj-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap; margin-bottom: 40px;
}
.pj-btns { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.pj-hero {
  width: 100%; border-radius: var(--r);
  overflow: hidden; border: 1px solid var(--border);
  margin-bottom: 56px;
}
.pj-hero-img {
  width: 100%; height: 540px; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.pj-hero-img:hover { transform: scale(1.015); }
.pj-hero-empty {
  width: 100%; height: 540px;
  background: var(--surface-2);
  background-image: radial-gradient(var(--border-2) 1px, transparent 1px);
  background-size: 22px 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(75,142,247,.12);
  font-family: 'Courier New', monospace; font-weight: 700;
}
.pj-divider { border: none; border-top: 1px solid var(--border); margin-bottom: 48px; }
.pj-body { max-width: 760px; }
.pj-body p {
  font-size: 1.05rem; line-height: 1.9;
  color: var(--muted); margin-bottom: 22px;
}
.pj-body p:last-child { margin-bottom: 0; }
.pj-nav {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 72px; padding-top: 32px;
  border-top: 1px solid var(--border);
}
.pj-nav-link {
  text-decoration: none; color: var(--muted);
  font-size: 14px; transition: color .15s;
  display: flex; flex-direction: column; gap: 4px;
}
.pj-nav-link:hover { color: var(--text); }
.pj-nav-link span:first-child { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.pj-nav-link.next { text-align: right; }
.project-not-found { padding: 80px 0; text-align: center; color: var(--muted); }

@media (max-width: 768px) {
  .pj-title { font-size: 2rem; }
  .pj-hero-img, .pj-hero-empty { height: 280px; }
  .pj-meta { flex-direction: column; align-items: flex-start; }
}

/* ════════════════════════════════════════════
   PHOTOGRAPHY
   ════════════════════════════════════════════ */
.photo-grid { columns: 3; column-gap: 16px; }
.photo-item {
  break-inside: avoid; margin-bottom: 16px;
  border-radius: var(--r); overflow: hidden;
  background: var(--surface); position: relative; cursor: pointer;
  transition: transform .22s cubic-bezier(0.16,1,0.3,1);
  touch-action: manipulation; will-change: transform;
}
.photo-item:hover { transform: scale(1.012); }
.photo-item img { width: 100%; display: block; }
.photo-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(12,15,26,.9), transparent);
  padding: 24px 14px 12px; font-size: 13px; color: var(--text);
  opacity: 0; transition: opacity .2s;
}
.photo-item:hover .photo-caption { opacity: 1; }
.photo-empty { text-align: center; padding: 80px 0; color: var(--muted); }
.photo-empty-icon { font-size: 3rem; opacity: .18; margin: 0 auto 16px; }

.lightbox {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.93); align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: var(--r-sm); object-fit: contain; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 18px; cursor: pointer; transition: background .15s;
}
.lightbox-close:hover { background: var(--surface-2); }

/* ════════════════════════════════════════════
   ABOUT
   ════════════════════════════════════════════ */
.about-layout { display: grid; grid-template-columns: 1fr 240px; gap: 64px; align-items: start; }
.about-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); text-align: center; }
.about-avatar {
  width: 170px; height: 170px; border-radius: 50%;
  object-fit: contain; background: transparent;
  border: 2px solid var(--border-2); margin: 0 auto 18px;
  filter: drop-shadow(0 0 24px rgba(75,142,247,.18));
}
.about-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 3px; }
.about-role { font-size: 13px; color: var(--blue); font-weight: 600; margin-bottom: 16px; }
.about-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.about-section { margin-bottom: 44px; }
.about-section h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.about-section p { color: var(--muted); line-height: 1.8; margin-bottom: 12px; }
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 16px; }
.skill-group h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--blue); margin-bottom: 10px; }
.skill-group ul { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; }
.skill-group li { font-size: 12px; color: var(--tag-text); background: var(--tag-bg); padding: 3px 8px; border-radius: 20px; }

/* ════════════════════════════════════════════
   STACK (shared)
   ════════════════════════════════════════════ */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 14px; }
.stack-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.stack-group h3 { font-size: 13px; font-weight: 700; margin-bottom: 12px; }

/* ════════════════════════════════════════════
   CONTACT + CERTS
   ════════════════════════════════════════════ */
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 60px 48px; text-align: center;
}
.contact-card h2 { font-size: 1.8rem; font-weight: 700; margin: 12px 0 16px; line-height: 1.2; }
.contact-card p { color: var(--muted); max-width: 480px; margin: 0 auto 32px; line-height: 1.75; }
.contact-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hide-sm { display: inline; }

.certs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.cert-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; }
.cert-year { display: block; font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.cert-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.cert-card p { font-size: 13px; color: var(--muted); }

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: repeat(2,1fr); }
  .projects-grid { grid-template-columns: repeat(2,1fr); }
  .certs-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .hero-layout { grid-template-columns: 1fr; text-align: center; padding: 56px 0 40px; }
  .hero-visual { order: -1; }
  .hero-text { max-width: 100%; }
  .hero-actions, .hero-socials { justify-content: center; }
  .avail-badge { margin: 0 auto 24px; }
  .avatar-img { width: 180px; height: 180px; }
  .about-layout { grid-template-columns: 1fr; }
  .about-sidebar { position: static; display: flex; flex-direction: column; align-items: center; }
  .photo-grid { columns: 2; }
}
@media (max-width: 640px) {
  .stats-row { grid-template-columns: repeat(2,1fr); gap: 20px 0; padding-top: 24px; }
  .featured-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .projects-grid .project-card .project-img-wrap { height: 260px; }
  .skills-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .contact-card { padding: 40px 24px; }
  .hide-sm { display: none; }
  .photo-grid { columns: 1; }
  .section { padding: 56px 0; }
}

/* ════════════════════════════════════════════
   PHOTOGRAPHY PREVIEW — POLAROID (home)
   ════════════════════════════════════════════ */
.photo-scatter {
  display: flex; justify-content: center; align-items: center;
  padding: 32px 0 16px; gap: 0; position: relative;
}
/* Override reveal so the scatter just fades in, keeping child rotations intact */
.photo-scatter.reveal { transform: none; transition: opacity .7s ease .1s; }
.photo-scatter.reveal.visible { transform: none; }

.photo-polaroid {
  display: block; background: #f4f0ea;
  padding: 10px 10px 38px;
  box-shadow: 0 4px 8px rgba(0,0,0,.28), 0 14px 44px rgba(0,0,0,.52);
  border-radius: 1px;
  text-decoration: none;
  width: 215px; flex-shrink: 0;
  position: relative; z-index: 1;
  transition: transform .38s cubic-bezier(.22,.68,0,1.15), box-shadow .38s ease;
  touch-action: manipulation; will-change: transform;
  cursor: pointer;
}
.photo-polaroid:nth-child(1) { transform: rotate(-6deg) translateX(30px) translateY(10px); z-index: 1; }
.photo-polaroid:nth-child(2) { transform: rotate(1.5deg); z-index: 3; }
.photo-polaroid:nth-child(3) { transform: rotate(-3.5deg) translateX(-30px) translateY(6px); z-index: 2; }
.photo-polaroid:hover {
  transform: rotate(0deg) translateY(-18px) scale(1.07) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.7);
  z-index: 10;
}

.photo-polaroid img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.photo-polaroid-caption {
  display: block; margin-top: 10px; text-align: center;
  font-size: 12px; color: #5a4a3a;
  font-style: italic; font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px;
}

/* Empty state polaroid shells */
.photo-polaroid--empty { cursor: default; }
.photo-polaroid--empty::before {
  content: ''; display: block; width: 100%; aspect-ratio: 1;
  background:
    radial-gradient(ellipse at 30% 35%, rgba(75,142,247,.08), transparent 65%),
    #e4ddd4;
}

.photo-empty-home { text-align: center; padding: 8px 0 20px; }
.photo-empty-home p { font-size: 14px; color: var(--muted); margin-top: 16px; }
.photo-empty-home a { color: var(--blue); text-decoration: none; }
.photo-empty-home a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .photo-polaroid { width: 170px; padding: 8px 8px 32px; }
  .photo-polaroid:nth-child(1) { transform: rotate(-5deg) translateX(22px) translateY(7px); }
  .photo-polaroid:nth-child(3) { transform: rotate(-3deg) translateX(-22px) translateY(4px); }
}
@media (max-width: 480px) {
  .photo-scatter { padding: 20px 0 12px; }
  .photo-polaroid { width: 130px; padding: 6px 6px 26px; }
  .photo-polaroid-caption { font-size: 10px; }
  .photo-polaroid:nth-child(1) { transform: rotate(-4deg) translateX(15px) translateY(5px); }
  .photo-polaroid:nth-child(3) { transform: rotate(-2.5deg) translateX(-15px) translateY(3px); }
}

/* ════════════════════════════════════════════
   EXPERIENCE — bullet list in cards
   ════════════════════════════════════════════ */
.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: 7px; margin: 14px 0 16px; }
.exp-bullets li {
  position: relative; padding-left: 18px;
  font-size: 13.5px; color: var(--muted); line-height: 1.7;
}
.exp-bullets li::before { content: '→'; position: absolute; left: 0; top: 2px; color: var(--blue); font-size: 11px; }
.exp-card { cursor: pointer; }
.exp-card:hover { border-color: var(--blue-dim); }

/* ════════════════════════════════════════════
   EXPERIENCE MODAL
   ════════════════════════════════════════════ */
.exp-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.72); align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.exp-modal-overlay.open { display: flex; animation: expFadeIn .22s ease; }
@keyframes expFadeIn { from { opacity: 0; } }
.exp-modal {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r); max-width: 540px; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 32px; position: relative;
  animation: expSlideUp .28s cubic-bezier(.22,.68,0,1.2);
}
@keyframes expSlideUp { from { transform: translateY(16px); opacity: 0; } }
.exp-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s;
}
.exp-modal-close:hover { background: rgba(255,255,255,.12); color: var(--text); }
.exp-modal-meta { font-size: 13px; color: var(--muted); margin: 6px 0 20px; }
.exp-modal-bullets { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.exp-modal-bullets li {
  position: relative; padding-left: 20px;
  font-size: 14px; color: var(--muted); line-height: 1.75;
}
.exp-modal-bullets li::before { content: '→'; position: absolute; left: 0; top: 3px; color: var(--blue); font-size: 12px; }

/* Hero email button reset */
.hero-socials button {
  background: none; border: none; padding: 0;
  color: var(--muted); font-size: 14px; cursor: pointer;
  transition: color .15s;
}
.hero-socials button:hover { color: var(--blue); }

/* ════════════════════════════════════════════
   LIGHT THEME
   ════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:        #F8FAFC;
  --surface:   #FFFFFF;
  --surface-2: #F1F5F9;
  --border:    rgba(0,0,0,0.08);
  --border-2:  rgba(0,0,0,0.15);
  --text:      #1E293B;
  --muted:     #64748B;
  --muted-2:   #CBD5E1;
  --tag-bg:    rgba(0,0,0,0.05);
  --tag-text:  #475569;
  --shadow:    0 4px 24px rgba(0,0,0,0.1);
}
[data-theme="light"] .nav { background: rgba(248,250,252,.9); }
[data-theme="light"] .nav.scrolled { background: rgba(248,250,252,.98); }
[data-theme="light"] .stack-cluster-chips span { background: rgba(0,0,0,.04); }
[data-theme="light"] .stack-cluster-chips span:hover { background: var(--blue-dim); }
[data-theme="light"] .exp-modal-close { background: rgba(0,0,0,.06); }
[data-theme="light"] .exp-modal-close:hover { background: rgba(0,0,0,.12); }

/* ════════════════════════════════════════════
   THEME TOGGLE PILL
   ════════════════════════════════════════════ */
.theme-toggle-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 20px; padding: 0 12px;
  cursor: pointer; height: 36px; flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
}
.theme-toggle-pill:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-dim);
}
.t-sun {
  width: 14px; height: 14px; flex-shrink: 0;
  color: var(--muted-2); transition: color .25s;
}
.t-moon {
  width: 14px; height: 14px; flex-shrink: 0;
  color: var(--muted-2); transition: color .25s;
}
[data-theme="dark"] .t-moon { color: #818CF8; }
[data-theme="light"] .t-sun { color: #F59E0B; }
.theme-toggle-track {
  width: 30px; height: 16px; border-radius: 8px;
  background: var(--muted-2); position: relative;
  transition: background .3s; flex-shrink: 0;
}
[data-theme="dark"] .theme-toggle-track {
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
}
[data-theme="light"] .theme-toggle-track {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
}
.theme-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3);
  transition: transform .3s cubic-bezier(.22,.68,0,1.2);
}
[data-theme="dark"] .theme-toggle-thumb { transform: translateX(14px); }
@media (max-width: 768px) { .theme-toggle-pill { display: none; } }

/* ════════════════════════════════════════════
   FOCUS VISIBLE — keyboard navigation
   ════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 4px; }
.project-card:focus-visible { outline-offset: 2px; }
.nav-links a:focus-visible { outline-offset: 2px; }
.nav-icon-btn:focus-visible { outline-offset: 2px; }
.photo-item:focus-visible { outline-offset: 2px; }

/* ════════════════════════════════════════════
   SKELETON LOADER — shimmer effect
   ════════════════════════════════════════════ */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.skel {
  background: linear-gradient(90deg,
    var(--surface) 25%,
    var(--surface-2) 50%,
    var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
  color: transparent; pointer-events: none;
}
.skel-line { height: 14px; border-radius: 6px; }
.skel-card { height: 220px; border-radius: var(--r); }

/* ════════════════════════════════════════════
   REDUCED MOTION — accessibility (CRITICAL)
   ════════════════════════════════════════════ */
@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; }
  .avatar-float { animation: none; }
  .dot-pulse { animation: none; }
  .photo-polaroid { transition: none !important; }
  html { scroll-behavior: auto; }
}
