/* ============================================================
   FAHIM AHMAD PORTFOLIO v2 — CSS
   Design: Liquid Glass · Black dominant · Charcoal · White
   Fonts: Archivo (headings) + Space Grotesk (body)
============================================================ */

/* ── 1. RESET & BASE ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:       #060606;
  --black-2:     #0d0d0d;
  --charcoal:    #1a1a1a;
  --charcoal-2:  #252525;
  --charcoal-3:  #333333;
  --white:       #ffffff;
  --white-80:    rgba(255,255,255,0.80);
  --white-60:    rgba(255,255,255,0.60);
  --white-40:    rgba(255,255,255,0.40);
  --white-20:    rgba(255,255,255,0.20);
  --white-12:    rgba(255,255,255,0.12);
  --white-08:    rgba(255,255,255,0.08);
  --white-04:    rgba(255,255,255,0.04);

  --glass-bg:      rgba(255,255,255,0.05);
  --glass-bg-hover:rgba(255,255,255,0.09);
  --glass-border:  rgba(255,255,255,0.10);
  --glass-border-hover: rgba(255,255,255,0.22);
  --glass-blur:    24px;
  --glass-blur-sm: 16px;

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --font-head:  'Archivo', sans-serif;
  --font-body:  'Space Grotesk', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --section-gap: 120px;
  --container:   1200px;
}

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; background-color: var(--black); }

body {
  background-color: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── FULL-PAGE CINEMATIC BACKGROUND ──────────────────────── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.page-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.06) saturate(0.3);
}

/* grid children must be able to shrink below content size */
.stats-grid > *,
.js-metrics > *,
.projects-grid > *,
.skills-grid > *,
.certs-grid > *,
.edu-research-grid > *,
.contact-grid > *,
.about-grid > *,
.js-two-col > *,
.js-gallery > * { min-width: 0; }

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

::selection { background: var(--white-20); color: var(--white); }

/* prevent any child from causing horizontal scroll */
body { overflow-x: hidden; }

/* ── 2. SCROLLBAR ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--charcoal-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--white-40); }

/* ── 3. LAYOUT UTILITIES ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.section-header {
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-bottom: 12px;
}

.section-label.light { color: rgba(255,255,255,0.75); }

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

.section-title.light { color: var(--white); }

.section-subtitle {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--white-60);
  max-width: 560px;
}

/* ── 4. GLASS CARD (core reusable) ───────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

/* ── 5. GLASS CHIP ───────────────────────────────────────── */
.glass-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur-sm));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white-80);
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
}

.glass-chip:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.glass-chip.small {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* ── 6. BUTTONS ──────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--white);
  color: var(--black);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none;
  text-align: center;
  justify-content: center;
}

.btn-primary:hover {
  background: var(--white-80);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255,255,255,0.15);
}

.btn-primary.full-width { width: 100%; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--white);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(var(--glass-blur-sm));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  text-align: center;
  justify-content: center;
}

.btn-ghost:hover {
  background: var(--white-08);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

.btn-ghost.full-width { width: 100%; }

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--glass-bg);
  color: var(--white-80);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(var(--glass-blur-sm));
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--white);
}

.btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--white);
  color: var(--black);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
  justify-content: center;
}

.btn-demo:hover {
  background: var(--white-80);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,255,255,0.18);
}

/* ── 7. NAVBAR ───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition-slow), backdrop-filter var(--transition-slow), border-color var(--transition-slow);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(6, 6, 6, 0.70);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom-color: var(--glass-border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--white);
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: background var(--transition), border-color var(--transition);
}

.nav-logo:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white-60);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: var(--white-08);
}

.nav-cta { margin-left: auto; flex-shrink: 0; }

/* CV Dropdown (shared) */
.cv-dropdown-wrap {
  position: relative;
}

.cv-arrow {
  transition: transform var(--transition);
  font-size: 0.7em;
}

.cv-dropdown-wrap.open .cv-arrow {
  transform: rotate(180deg);
}

.cv-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: rgba(18,18,18,0.96);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 200;
}

.cv-dropdown-wrap.open .cv-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cv-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white-80);
  transition: background var(--transition), color var(--transition);
}

.cv-option i { width: 16px; text-align: center; color: var(--white-40); }

.cv-option:hover {
  background: var(--white-08);
  color: var(--white);
}

.cv-option:hover i { color: var(--white-60); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 8. HERO ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 120px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-glass {
  padding: 48px;
}

.hero-badge {
  margin-bottom: 24px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  white-space: normal;
  max-width: 100%;
}

.badge-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #5fff5f;
  border-radius: 50%;
  box-shadow: 0 0 8px #5fff5f;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 20px;
}

.hero-highlight {
  color: #4fc3f7;
  animation: un-pulse 2.4s ease-in-out infinite;
}

@keyframes un-pulse {
  0%, 100% {
    color: #4fc3f7;
    text-shadow:
      0 0 8px rgba(79, 195, 247, 0.9),
      0 0 24px rgba(79, 195, 247, 0.5),
      0 0 48px rgba(79, 195, 247, 0.2);
  }
  50% {
    color: #b3e5fc;
    text-shadow:
      0 0 4px rgba(79, 195, 247, 0.3),
      0 0 12px rgba(79, 195, 247, 0.15);
  }
}

.hero-sub {
  font-size: 1rem;
  color: var(--white-60);
  margin-bottom: 36px;
  line-height: 1.7;
  max-width: 440px;
  word-break: break-word;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

/* Hero CV dropdown positioned upward on small screens */
.hero-cv-wrap { position: relative; }
.hero-cv-dropdown { right: auto; left: 0; }

.hero-links {
  display: flex;
  gap: 10px;
}

.icon-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--white-60);
  font-size: 0.9rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.icon-link:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--white);
  transform: translateY(-2px);
}

.hero-image-block {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo {
  width: 100%;
  max-width: 520px;
  height: 480px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  filter: brightness(0.9) contrast(1.05);
}

.hero-photo-badge {
  position: absolute;
  bottom: 24px;
  right: -16px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.badge-num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.badge-label {
  font-size: 0.75rem;
  color: var(--white-60);
  line-height: 1.4;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--white-60);
  font-size: 0.8rem;
  animation: bounce-cue 2.5s ease-in-out infinite;
  transition: background var(--transition), color var(--transition);
}

.scroll-cue:hover { background: var(--glass-bg-hover); color: var(--white); }

@keyframes bounce-cue {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── 9. STATS BAR ────────────────────────────────────────── */
.stats-bar {
  padding: 0 0 80px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-tile {
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--white-60);
  font-weight: 500;
}

/* ── 10. ABOUT ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}

.about-photo-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-photo-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.about-photo {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.92) contrast(1.04);
  transition: transform 0.6s ease;
}

.about-photo-wrap:hover .about-photo { transform: scale(1.03); }

.about-meta {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--white-60);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-row i { color: var(--white-40); width: 14px; text-align: center; flex-shrink: 0; }

.about-text-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--white-80);
  line-height: 1.7;
  text-align: justify;
  hyphens: auto;
}

.about-body {
  font-size: 0.97rem;
  color: var(--white-60);
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* ── 11. JONTRO SOINIK ───────────────────────────────────── */
.js-section {
  position: relative;
  padding: var(--section-gap) 0;
  overflow: hidden;
}

.js-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.js-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.3) saturate(0.4);
}

.js-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6,6,6,0.85) 0%,
    rgba(6,6,6,0.65) 40%,
    rgba(6,6,6,0.85) 100%
  );
}

.js-section .container { position: relative; z-index: 1; }

.js-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 32px;
}

.js-narrative {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.js-narrative p {
  font-size: 1.0rem;
  color: var(--white-70, rgba(255,255,255,0.7));
  line-height: 1.75;
  text-align: justify;
  hyphens: auto;
}

.js-narrative p strong { color: var(--white); font-weight: 600; }

.demo-link {
  align-self: flex-start;
  margin-top: 8px;
}

.js-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
  margin-top: 8px;
}

.js-metric {
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
}

.metric-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white-80);
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--white-40);
  line-height: 1.5;
}

.js-two-col {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

.js-tech {
  padding: 32px 36px;
}

.card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.tech-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tech-list li {
  display: flex;
  gap: 12px;
  font-size: 0.88rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.tech-list li:last-child { border-bottom: none; padding-bottom: 0; }

.tech-label {
  flex-shrink: 0;
  width: 72px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white-40);
  padding-top: 2px;
}

.tech-list li span:last-child { color: var(--white-80); line-height: 1.5; }

.js-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.3s ease;
  filter: brightness(0.9);
}

.gallery-item:hover img { transform: scale(1.04); filter: brightness(1); }

.gallery-wide {
  grid-column: 1 / -1;
}

.gallery-wide img { height: 240px; }

.js-video {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  flex: 1;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.video-caption {
  padding: 16px 24px;
  font-size: 0.82rem;
  color: var(--white-40);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

/* ── 12. PROJECTS ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.project-img-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}

.project-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.3s ease;
  filter: brightness(0.85) saturate(0.8);
}

.project-card:hover .project-img { transform: scale(1.04); filter: brightness(0.95) saturate(1); }

.project-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.project-client {
  font-size: 0.78rem;
  color: var(--white-40);
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--white-60);
  line-height: 1.65;
  flex: 1;
  text-align: justify;
  hyphens: auto;
}

.project-metric { margin-top: 4px; }

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white-60);
  margin-top: 8px;
  transition: color var(--transition);
}

.project-link:hover { color: var(--white); }

.project-link i { font-size: 0.75rem; }

/* ── 13. EXPERIENCE TIMELINE ─────────────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 20px;
  bottom: 20px;
  width: 1px;
  background: var(--glass-border);
}

.timeline-entry {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 24px;
}

.timeline-marker {
  flex-shrink: 0;
  width: 23px;
  height: 23px;
  background: var(--charcoal);
  border: 2px solid var(--white-40);
  border-radius: 50%;
  margin-top: 20px;
  z-index: 1;
  transition: border-color var(--transition), background var(--transition);
}

.timeline-entry:hover .timeline-marker {
  border-color: var(--white);
  background: var(--white-12);
}

.timeline-card {
  flex: 1;
  padding: 28px 32px;
}

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tl-role {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.tl-company {
  font-size: 0.85rem;
  color: var(--white-60);
  font-weight: 500;
}

.tl-date { flex-shrink: 0; }

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-list li {
  font-size: 0.88rem;
  color: var(--white-60);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
  text-align: justify;
  hyphens: auto;
}

.tl-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 1px;
  background: var(--white-40);
}

/* ── 14. SKILLS ──────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-group {
  padding: 28px 32px;
}

.skill-group-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white-80);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.skill-group-title i { color: var(--white-40); font-size: 0.85rem; }

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── 15. CERTIFICATIONS ──────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cert-card {
  padding: 24px 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.cert-card:hover { transform: translateY(-2px); }

.cert-card.cert-featured {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.07);
  border-color: var(--white-20);
}

.cert-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white-08);
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  color: var(--white-60);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.cert-body { display: flex; flex-direction: column; gap: 4px; }

.cert-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 4px;
  width: fit-content;
}

.cert-status.active {
  background: rgba(100, 255, 120, 0.1);
  color: #7dff7d;
  border: 1px solid rgba(100,255,120,0.2);
}

.cert-status.pending {
  background: rgba(255,200,80,0.1);
  color: #ffd166;
  border: 1px solid rgba(255,200,80,0.2);
}

.cert-name {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.cert-issuer {
  font-size: 0.8rem;
  color: var(--white-60);
  font-weight: 500;
}

.cert-date {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--white-40);
}

/* ── 16. EDUCATION & RESEARCH ────────────────────────────── */
.edu-research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}

.edu-col {
  display: flex;
  flex-direction: column;
}

.edu-card {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.edu-courses {
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
}

.edu-courses-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-40);
  margin-bottom: 12px;
}

.edu-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.edu-icon {
  width: 40px;
  height: 40px;
  background: var(--white-08);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-40);
  flex-shrink: 0;
}

.edu-degree {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.edu-school {
  font-size: 0.88rem;
  color: var(--white-60);
  font-weight: 500;
  margin-bottom: 2px;
}

.edu-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white-40);
}

.edu-clubs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--glass-border);
}

.pub-card {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.pub-badge { align-self: flex-start; }

.pub-title {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.pub-authors {
  font-size: 0.82rem;
  color: var(--white-60);
  line-height: 1.6;
  text-align: justify;
  hyphens: auto;
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--white-40);
  line-height: 1.6;
  text-align: justify;
  hyphens: auto;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--glass-border);
}

/* ── 16b. RESEARCH INTERESTS ─────────────────────────────── */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.interest-card {
  padding: 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.interest-card:hover {
  transform: translateY(-3px);
}

.interest-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white-08);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--white-60);
  font-size: 1rem;
  flex-shrink: 0;
}

.interest-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.interest-desc {
  font-size: 0.83rem;
  color: var(--white-60);
  line-height: 1.65;
  text-align: justify;
  hyphens: auto;
}

/* ── 17. AWARDS ──────────────────────────────────────────── */
.awards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.award-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.award-item:hover { transform: translateX(4px); }

.award-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white-08);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--white-60);
  flex-shrink: 0;
  font-size: 0.9rem;
}

.award-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.award-org {
  font-size: 0.78rem;
  color: var(--white-40);
  font-family: var(--font-mono);
}

/* ── 18. CONTACT ─────────────────────────────────────────── */
.contact-section .section-subtitle {
  max-width: 500px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-card {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--glass-border);
  transition: color var(--transition);
}

.contact-item:last-child { border-bottom: none; padding-bottom: 0; }
.contact-item.no-link { cursor: default; }

.contact-item:not(.no-link):hover .contact-value { color: var(--white); }

.contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white-08);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: var(--white-40);
  flex-shrink: 0;
  font-size: 0.9rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.contact-item:not(.no-link):hover .contact-icon {
  background: var(--white-12);
  border-color: var(--glass-border-hover);
  color: var(--white-60);
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--white-40);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.contact-value {
  font-size: 0.88rem;
  color: var(--white-60);
  font-weight: 500;
  transition: color var(--transition);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-cv {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-cv-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.contact-cv-sub {
  font-size: 0.88rem;
  color: var(--white-60);
  margin-bottom: 8px;
}

.cv-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

/* ── 19. FOOTER ──────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--white-40);
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--white-30, rgba(255,255,255,0.3));
  letter-spacing: 0.05em;
  flex: 1;
}

.footer-links {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.footer-links a {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--white-40);
  font-size: 0.8rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.footer-links a:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  color: var(--white);
}

/* ── 20. SCROLL REVEAL ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 21. RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-card.cert-featured { grid-column: 1 / -1; }
  .js-two-col { grid-template-columns: 1fr; }
  .js-tech { max-width: 100%; }
  .interests-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --section-gap: 80px; }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(6,6,6,0.97);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    z-index: 998;
    padding: 80px 24px 40px;
  }

  .nav-links.open { display: flex; }

  .nav-link {
    font-size: 1.2rem;
    padding: 14px 28px;
    width: 100%;
    text-align: center;
    color: var(--white-60);
  }

  .nav-cta { display: none; }
  .hamburger { display: flex; z-index: 999; }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 100px 24px 60px;
  }

  .hero-image-block { order: -1; }
  .hero-photo { height: 320px; max-width: 100%; }
  .hero-photo-badge { right: 12px; bottom: 12px; }

  .hero-glass { padding: 32px 28px; max-width: 100%; overflow: hidden; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .js-metrics { grid-template-columns: repeat(2, 1fr); }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { height: 300px; }

  .projects-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }

  .edu-research-grid { grid-template-columns: 1fr; align-items: start; }
  .edu-card, .pub-card { height: auto; }
  .interests-grid { grid-template-columns: 1fr; }
  .js-top-row { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .skills-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .cert-card.cert-featured { grid-column: auto; }
}

@media (max-width: 600px) {
  :root { --section-gap: 64px; }

  .hero-headline { font-size: 1.5rem; }
  .section-title { font-size: 1.6rem; }

  .hero-glass { padding: 24px 20px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .js-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }

  .timeline-card { padding: 20px 20px; }
  .tl-header { flex-direction: column; }

  .js-narrative { padding: 24px 24px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { margin-left: 0; }
  .footer-tagline { display: none; }

  .contact-card, .contact-cv { padding: 24px 24px; }
}

/* ── 22. REDUCED MOTION ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
