/* ── Tokens ── */
:root {
  --bg:       #08090d;
  --surface:  #0e1118;
  --card:     #131922;
  --border:   #1e2a3a;
  --border2:  #253040;
  --text:     #eef2f7;
  --muted:    #7a8fa8;
  --gold:     #4c8dff;
  --gold-dim: rgba(76,141,255, 0.12);
  --gold-glow:rgba(76,141,255, 0.25);
  --gold-gradient: linear-gradient(115deg, #1840c4 0%, #3d74f2 42%, #4c8dff 68%, #7ec2ff 100%);
  --radius:   8px;
  --pad:      clamp(1.25rem, 4vw, 3rem);
  --maxw:     1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: rgba(76,141,255, 0.35); color: var(--text); }

/* ── Noise overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ── Typography ── */
.display {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
  line-height: 0.9;
}

/* ── Plus decorators ── */
.plus {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: var(--gold);
  margin-right: 0.15em;
}

/* ── Tag ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
}
.tag.gold { color: var(--gold); border-color: rgba(76,141,255,0.3); }

/* ── Section label ── */
.section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

/* ══════════════════════════════════
   NAV
══════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}
nav.scrolled {
  background: rgba(8, 9, 13, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: var(--gold-gradient);
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(76,141,255,0.3); }

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  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-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,9,13,0.97);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-drawer.open { opacity: 1; pointer-events: all; }
.mobile-drawer a {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.mobile-drawer a:hover { color: var(--gold); }

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(ellipse 60% 50% at 80% 40%, rgba(76,141,255,0.05) 0%, transparent 60%),
    radial-gradient(circle, rgba(76,141,255,0.14) 1px, transparent 1px);
  background-size: cover, 44px 44px;
  background-position: center, 0 0;
}

/* Left hero panel */
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 9rem var(--pad) 5rem;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--gold);
}

.hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 10vw, 9.5rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 2rem;
}
.hero-name .gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-desc {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 420px;
  margin-bottom: 2.5rem;
  text-align: justify;
}
.hero-desc strong { color: var(--text); font-weight: 500; }

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: var(--gold-gradient);
  padding: 0.75rem 1.75rem;
  border-radius: 99px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(76,141,255,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
  background: none;
  padding: 0.75rem 1.75rem;
  border-radius: 99px;
  text-decoration: none;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Feature pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.hero-pill {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(76,141,255,0.05);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.hero-pill::before {
  content: '·';
  color: var(--gold);
  margin-right: 0.45em;
  font-weight: 400;
  font-size: 1rem;
  line-height: 0;
  vertical-align: middle;
}
.hero-pill:hover { border-color: rgba(76,141,255,0.4); background: rgba(76,141,255,0.09); transform: translateY(-2px); }

/* Corner markers on hero panels */
.corner-mark {
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--border2);
  border-style: solid;
}
.corner-mark.tl { top: 1rem; left: 1rem; border-width: 1px 0 0 1px; }
.corner-mark.tr { top: 1rem; right: 1rem; border-width: 1px 1px 0 0; }
.corner-mark.bl { bottom: 1rem; left: 1rem; border-width: 0 0 1px 1px; }
.corner-mark.br { bottom: 1rem; right: 1rem; border-width: 0 1px 1px 0; }

/* Extra clearance for the first section on inner pages (no hero above it,
   so the fixed 64px nav needs room before content starts) */
.subpage-section {
  padding-top: calc(64px + clamp(4rem, 8vw, 7rem)) !important;
}

/* ══════════════════════════════════
   SCROLL PROGRESS
══════════════════════════════════ */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--gold);
  z-index: 9998;
  transition: width 0.1s linear;
}

/* ══════════════════════════════════
   ABOUT / STATS STRIP
══════════════════════════════════ */
.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-cell {
  padding: 2.5rem var(--pad);
  border-right: 1px solid var(--border);
  position: relative;
  cursor: default;
  transition: background 0.25s ease;
}
.stat-cell:hover { background: rgba(76,141,255,0.03); }
.stat-cell:last-child { border-right: none; }
.stat-cell::before {
  content: '+';
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  font-size: 0.9rem;
  color: var(--gold);
  opacity: 0.5;
}
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1;
  color: var(--gold);
  transition: text-shadow 0.25s ease;
}
.stat-cell:hover .stat-num { text-shadow: 0 0 30px rgba(76,141,255,0.4); }
.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* ══════════════════════════════════
   ABOUT SECTION
══════════════════════════════════ */
#about {
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
  max-width: var(--maxw);
  margin: 0 auto;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin-bottom: 1.75rem;
}
.about-heading .gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.about-text {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  text-align: justify;
}

.current-work {
  margin-top: 2rem;
  padding: 1.35rem 1.5rem;
  background: linear-gradient(135deg, rgba(76,141,255,0.05) 0%, rgba(76,141,255,0.02) 100%);
  border: 1px solid rgba(76,141,255,0.15);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.current-work::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 100%;
  background: linear-gradient(to left, rgba(76,141,255,0.04), transparent);
  pointer-events: none;
}
.current-work-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.current-work-label::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.current-work p { font-size: 0.9rem; color: var(--text); line-height: 1.65; text-align: justify; }

/* ══════════════════════════════════
   EXPERTISE / SKILLS
══════════════════════════════════ */
#expertise {
  border-top: 1px solid var(--border);
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
}
.expertise-inner { max-width: var(--maxw); margin: 0 auto; }

.expertise-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.expertise-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.9;
}
.expertise-heading .gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.expertise-sub { font-size: 0.9rem; color: var(--muted); max-width: 300px; line-height: 1.6; text-align: justify; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.skill-card {
  background: var(--card);
  padding: 2rem;
  position: relative;
  border-left: 2px solid transparent;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.skill-card:hover {
  background: var(--surface);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 0 transparent;
  border-left-color: var(--gold);
}

.skill-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.skill-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: rgba(76,141,255,0.07);
  transition: background 0.2s ease;
}
.skill-card:hover .skill-icon-wrap { background: rgba(76,141,255,0.13); }
.skill-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  opacity: 0.3;
}
.skill-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.skill-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  text-align: justify;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.skill-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* ══════════════════════════════════
   PROJECTS
══════════════════════════════════ */
#projects {
  border-top: 1px solid var(--border);
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
}
.projects-inner { max-width: var(--maxw); margin: 0 auto; }

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.projects-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.9;
}
.projects-heading .gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}
.project-card {
  background: var(--card);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 0.25s ease;
  overflow: hidden;
}
.project-card:hover { background: var(--surface); }
.project-card:hover .proj-view { opacity: 1; transform: translateY(0); }

/* Project image placeholder */
.proj-thumb {
  aspect-ratio: 16/9;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.proj-thumb-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(76,141,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,141,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.proj-thumb-icon {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.proj-thumb-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(76,141,255,0.4);
}

.proj-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.proj-num {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.proj-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.6rem;
}
.proj-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  text-align: justify;
}
.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
  flex-wrap: wrap;
}
.proj-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.proj-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}
.proj-view {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

/* Featured project — full width */
.proj-featured {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: border-color 0.25s ease;
}
.proj-featured:hover { border-color: var(--gold); }
.proj-featured-thumb {
  background: var(--surface);
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-featured-thumb-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(76,141,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,141,255,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── Lightbox trigger affordance ── */
.lightbox-trigger { cursor: zoom-in; }
.lightbox-trigger:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.lightbox-expand {
  position: absolute;
  bottom: 1.1rem;
  right: 1.1rem;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(8,9,13,0.7);
  border: 1px solid rgba(76,141,255,0.3);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.22,1,0.36,1), border-color 0.2s ease;
  pointer-events: none;
}
.lightbox-trigger:hover .lightbox-expand,
.lightbox-trigger:focus-visible .lightbox-expand {
  opacity: 1;
  transform: scale(1);
}

/* ── Lightbox modal ── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: rgba(8,9,13,0.88);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-panel {
  position: relative;
  width: min(1200px, 100%);
  max-height: 100%;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(76,141,255,0.06);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
#lightbox.open .lightbox-panel { transform: scale(1) translateY(0); }
.lightbox-content {
  position: relative;
  height: min(80vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox-content video,
.lightbox-content img { width: 100%; height: 100%; object-fit: contain; background: #000; }
#lightbox-close {
  position: absolute;
  top: 0.85rem; right: 0.85rem;
  z-index: 10;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(8,9,13,0.75);
  border: 1px solid var(--border2);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
#lightbox-close:hover { border-color: var(--gold); color: var(--gold); transform: rotate(90deg); }
#lightbox-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* Glowing orb inside featured thumb */
.proj-orb {
  width: 140px; height: 140px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 38%, rgba(76,141,255,0.35) 0%, transparent 55%),
    radial-gradient(circle, rgba(76,141,255,0.12) 0%, transparent 70%);
  box-shadow: 0 0 80px 30px rgba(76,141,255,0.12), 0 0 160px 60px rgba(76,141,255,0.05);
  position: relative;
  z-index: 1;
  animation: orb-pulse 3s ease-in-out infinite alternate;
}
@keyframes orb-pulse {
  from { box-shadow: 0 0 80px 30px rgba(76,141,255,0.12), 0 0 160px 60px rgba(76,141,255,0.05); }
  to   { box-shadow: 0 0 120px 50px rgba(76,141,255,0.2), 0 0 220px 80px rgba(76,141,255,0.08); }
}
.proj-featured-body {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.proj-featured-body .proj-num { font-size: 0.68rem; }
.proj-featured-body .proj-title { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; letter-spacing: 0.03em; line-height: 1; margin-bottom: 1rem; font-weight: 400; }
.proj-featured-body .proj-desc { font-size: 0.88rem; margin-bottom: 1.5rem; text-align: justify; }

/* ══════════════════════════════════
   PUBLICATIONS
══════════════════════════════════ */
#publications {
  border-top: 1px solid var(--border);
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
}
.pubs-inner { max-width: var(--maxw); margin: 0 auto; }

.pubs-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.pubs-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.9;
}
.pubs-heading .gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.pubs-metrics {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.pubs-metric {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 1.1rem;
}
.pubs-metric-num { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; color: var(--gold); letter-spacing: 0.02em; }
.pubs-metric-label { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pubs-scholar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 1.1rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.pubs-scholar-link:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.pubs-scholar-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.pubs-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pub-card {
  background: var(--card);
  padding: 1.35rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: background 0.2s ease;
}
.pub-card:hover { background: var(--surface); }
.pub-main { min-width: 0; }
.pub-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.35rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.pub-title svg { flex-shrink: 0; opacity: 0.55; transition: opacity 0.2s ease, transform 0.2s ease; }
.pub-title:hover, .pub-title:focus-visible { color: var(--gold); }
.pub-title:hover svg, .pub-title:focus-visible svg { opacity: 1; transform: translate(1px, -1px); }
.pub-title:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pub-meta { font-size: 0.76rem; color: var(--muted); line-height: 1.6; }
.pub-venue { color: var(--gold); font-weight: 600; }
.pub-scholar-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.6rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.76rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.pub-scholar-mini:hover, .pub-scholar-mini:focus-visible { color: var(--gold); }
.pub-scholar-mini:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pub-cite {
  flex-shrink: 0;
  text-align: center;
  min-width: 64px;
}
.pub-cite-num { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; color: var(--text); line-height: 1; }
.pub-cite-label { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.2rem; }

/* ══════════════════════════════════
   CONTACT
══════════════════════════════════ */
#contact {
  border-top: 1px solid var(--border);
  padding: clamp(4rem, 8vw, 7rem) var(--pad);
}
.contact-inner { max-width: var(--maxw); margin: 0 auto; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.9;
  margin-bottom: 1.5rem;
}
.contact-heading .gold { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.contact-text { font-size: 0.9rem; color: var(--muted); line-height: 1.8; margin-bottom: 2rem; text-align: justify; }

.contact-links { display: flex; flex-direction: column; gap: 0.6rem; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.9rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.contact-link:hover { border-color: var(--gold); color: var(--text); background: var(--gold-dim); }
.contact-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Form */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted); opacity: 0.6; }
.form-input:focus, .form-textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(76,141,255,0.1); }
.form-textarea { resize: vertical; min-height: 120px; }

.contact-form { display: flex; flex-direction: column; gap: 1.15rem; }

/* Back to top */
#back-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  z-index: 300;
  width: 44px; height: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.2s ease, color 0.2s ease;
  pointer-events: none;
}
#back-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; box-shadow: 0 4px 20px rgba(76,141,255,0.15); }
#back-top:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 4px 24px rgba(76,141,255,0.25); }

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-logo:hover { color: var(--gold); }
.footer-logo span { color: var(--gold); }
.footer-copy { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--gold); }

/* ══════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ══════════════════════════════════
   HERO ANIMATIONS
══════════════════════════════════ */
@keyframes scan-line {
  0%   { top: 0%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes trap-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 0.8s ease both; }
.d1 { animation-delay: 0.1s; }
.d2 { animation-delay: 0.25s; }
.d3 { animation-delay: 0.4s; }
.d4 { animation-delay: 0.55s; }
.d5 { animation-delay: 0.7s; }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: 1fr; }

  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-featured { grid-template-columns: 1fr; }
  .proj-featured-thumb { min-height: 200px; }
}

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

  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-cell:nth-child(2) { border-right: none; }
  .stat-cell:nth-child(3) { border-top: 1px solid var(--border); }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .projects-grid { grid-template-columns: 1fr; }

  .pub-card { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
  .pub-cite { text-align: left; }

  footer { flex-direction: column; align-items: flex-start; gap: 1rem; }
  #back-top { bottom: 1.25rem; right: 1.25rem; }
}

/* ══════════════════════════════════
   CHAT WIDGET
══════════════════════════════════ */
#chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#chat-toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gold-gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(76,141,255,0.35);
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), box-shadow 0.2s ease;
  flex-shrink: 0;
}
#chat-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 32px rgba(76,141,255,0.45); }
#chat-toggle svg { transition: transform 0.3s cubic-bezier(0.22,1,0.36,1); }
#chat-toggle.open svg { transform: rotate(45deg); }

#chat-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 355px;
  height: 510px;
  background: #0c1118;
  border: 1px solid rgba(76,141,255,0.14);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03);
  transform: scale(0.94) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), opacity 0.22s ease;
  transform-origin: bottom right;
}
#chat-panel.open { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: #101720;
  border-bottom: 1px solid rgba(76,141,255,0.1);
  flex-shrink: 0;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  color: #08090d;
  flex-shrink: 0;
}
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name { font-size: 0.82rem; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
.chat-header-sub { font-size: 0.68rem; color: var(--muted); margin-top: 1px; display: flex; align-items: center; gap: 0.35rem; }
.chat-header-sub::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
.chat-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}
.chat-close:hover { color: var(--text); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(76,141,255,0.15) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(76,141,255,0.15); border-radius: 2px; }

.chat-msg { display: flex; flex-direction: column; max-width: 88%; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }

.chat-bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text);
}
.chat-msg.bot .chat-bubble {
  background: #161f2e;
  border: 1px solid rgba(255,255,255,0.05);
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: rgba(76,141,255,0.12);
  border: 1px solid rgba(76,141,255,0.18);
  border-bottom-right-radius: 4px;
  color: #e8d98a;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.chat-suggestion {
  font-size: 0.7rem;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  border: 1px solid rgba(76,141,255,0.25);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.chat-suggestion:hover { background: rgba(76,141,255,0.08); border-color: rgba(76,141,255,0.45); }

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.65rem 0.9rem;
  background: #161f2e;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.chat-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-dot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: #0e151e;
  flex-shrink: 0;
}
#chat-input {
  flex: 1;
  background: #161f2e;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text);
  outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#chat-input::placeholder { color: var(--muted); }
#chat-input:focus { border-color: rgba(76,141,255,0.35); box-shadow: 0 0 0 3px rgba(76,141,255,0.07); }
#chat-send {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gold-gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
#chat-send:hover { background: #6fa8ff; transform: scale(1.05); }
#chat-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

@media (max-width: 480px) {
  #chat-panel { width: calc(100vw - 32px); right: -8px; }
  #chat-widget { bottom: 20px; right: 16px; }
}
