/* ===================================================================
   Md Shahed Uddin Emon — Portfolio
   Theme: near-black + golden amber
   =================================================================== */

:root {
  --bg:        #16161a;
  --bg-2:      #1c1c22;
  --surface:   #20212a;
  --surface-2: #262732;
  --border:    rgba(255, 255, 255, 0.08);
  --border-2:  rgba(255, 255, 255, 0.14);

  --accent:    #f5b301;
  --accent-2:  #ffcb45;
  --accent-3:  #ff9d2f;
  --accent-soft: rgba(245, 179, 1, 0.12);
  --accent-glow: rgba(245, 179, 1, 0.35);

  --text:      #f5f5f7;
  --text-dim:  #b4b4bf;
  --text-mute: #8d8e9c;

  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: 'Poppins', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

section[id] { scroll-margin-top: 84px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #16161a; }

/* Focus visibility (keyboard users) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.btn-primary:focus-visible, .filter-btn.active:focus-visible, .to-top:focus-visible { outline-color: #fff; outline-offset: 3px; }

/* Screen-reader-only utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #3a3a46; border-radius: 6px; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 0.95rem;
  padding: 13px 26px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn i { font-size: 0.9em; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #16161a; box-shadow: 0 8px 24px rgba(245, 179, 1, 0.28); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(245, 179, 1, 0.42); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 16px 38px; font-size: 1.05rem; }

/* ----------------------------- Nav ----------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: 70px; display: flex; align-items: center;
  background: rgba(22, 22, 26, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled { background: rgba(20, 20, 24, 0.9); border-bottom-color: var(--border); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.nav-inner { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); display: flex; align-items: center; justify-content: space-between; }

.logo { font-family: var(--mono); font-weight: 700; font-size: 1.3rem; color: var(--text); letter-spacing: -0.5px; }
.logo-bracket { color: var(--text-mute); }
.logo-slash { color: var(--accent); cursor: pointer; transition: transform 0.3s; display: inline-block; }
.logo-slash:hover { transform: rotate(20deg) scale(1.2); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--text-dim); padding: 8px 14px; border-radius: 8px; position: relative; transition: color 0.25s; }
.nav-links a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); border-radius: 2px; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent); }
.nav-links a.nav-cta { background: var(--accent-soft); color: var(--accent); margin-left: 6px; }
.nav-links a.nav-cta::after { display: none; }
.nav-links a.nav-cta:hover { background: var(--accent); color: #16161a; }

.nav-scrim { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease); }
.nav-scrim.open { opacity: 1; pointer-events: auto; }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 110; }
.hamburger span { width: 26px; height: 2.5px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ----------------------------- Hero ----------------------------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; background: radial-gradient(120% 90% at 80% 0%, #1f1f29 0%, var(--bg) 55%); }
.particles { position: absolute; inset: 0; z-index: 0; }
.hero-content { position: relative; z-index: 2; padding-top: 80px; }

.hero-greet { font-size: clamp(1rem, 2.4vw, 1.35rem); font-weight: 300; color: var(--text-dim); margin-bottom: 0.4rem; }
.wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 30% { transform: rotate(14deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }

.hero-name { font-size: clamp(2.8rem, 9vw, 6rem); font-weight: 700; line-height: 1.02; letter-spacing: -2px; margin-bottom: 0.5rem; }
.hero-name .ch { display: inline-block; transition: transform 0.25s var(--ease), color 0.25s, text-shadow 0.25s; }
.hero-name .ch:hover { color: var(--accent); transform: translateY(-8px) scale(1.12); text-shadow: 0 8px 24px var(--accent-glow); }
.hero-name .sp { width: 0.32em; }

.hero-role { font-size: clamp(1.2rem, 3.6vw, 2rem); font-weight: 500; color: var(--text); margin-bottom: 1.4rem; min-height: 1.4em; }
.hero-prefix { color: var(--text-dim); font-weight: 300; }
.typed { color: var(--accent); }
.typed-cursor { color: var(--accent); }

.hero-blurb { max-width: 620px; color: var(--text-dim); font-size: clamp(0.98rem, 1.6vw, 1.1rem); margin-bottom: 2rem; }
.hero-blurb strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 2.2rem; }

.hero-socials { display: flex; gap: 14px; }
.hero-socials a { width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.2rem; color: var(--text-dim); border: 1.5px solid var(--border-2); border-radius: 12px; transition: all 0.25s var(--ease); }
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 10px 24px rgba(0,0,0,0.4); }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid var(--text-mute); border-radius: 14px; z-index: 2; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: var(--accent); border-radius: 2px; animation: scrolldot 1.8s infinite; }
@keyframes scrolldot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 24px; } 100% { opacity: 0; } }

/* ----------------------------- Section frame ----------------------------- */
.section { padding: clamp(70px, 11vw, 120px) 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-title { font-size: clamp(1.7rem, 4.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 0.6rem; display: flex; align-items: baseline; gap: 14px; }
.section-title .title-index { font-family: var(--mono); font-size: 0.5em; color: var(--accent); font-weight: 500; }
.section-title::after { content: ''; display: inline-block; flex: 0 0 auto; width: 64px; height: 3px; background: var(--accent); border-radius: 3px; align-self: center; opacity: 0.6; }
.section-sub { color: var(--text-dim); max-width: 620px; margin-bottom: 2rem; }
.subhead { font-size: 1.15rem; font-weight: 600; margin: 2.6rem 0 1.2rem; color: var(--text); }

/* ----------------------------- About ----------------------------- */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; margin-top: 1.5rem; }
.about-photo { position: relative; justify-self: center; }
.photo-frame { width: clamp(220px, 60vw, 300px); aspect-ratio: 1; border-radius: 24px; overflow: hidden; border: 3px solid var(--accent); box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 8px var(--accent-soft); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-badge { position: absolute; bottom: -14px; right: -10px; background: var(--surface); border: 1px solid var(--border-2); color: var(--accent); font-weight: 600; font-size: 0.85rem; padding: 9px 16px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.about-text p { color: var(--text-dim); margin-bottom: 1rem; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-facts { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; margin: 1.4rem 0 1.6rem; }
.about-facts li { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 0.92rem; }
.about-facts i { color: var(--accent); width: 18px; text-align: center; }
.about-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.about-highlights { margin-top: clamp(32px, 5vw, 48px); display: grid; gap: 24px; }
.hl { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.hl-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 9px; line-height: 1; }
.hl-label i { font-size: 1em; width: 16px; text-align: center; }
.hl-items { display: flex; flex-wrap: wrap; gap: 9px; }
.hl-items span { font-size: 0.85rem; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); padding: 7px 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; transition: border-color 0.2s, color 0.2s; }
.hl-items span:hover { border-color: var(--accent); color: var(--text); }
.hl-items span i { color: var(--accent); }

.stats-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: clamp(40px, 6vw, 64px) auto 0; max-width: 780px; }
.stat { flex: 1 1 200px; max-width: 240px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 18px; transition: transform 0.3s var(--ease), border-color 0.3s; }
.stat:hover { transform: translateY(-5px); border-color: var(--accent); }
.stat-num { display: block; font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; color: var(--accent); line-height: 1; font-family: var(--mono); }
.stat-label { display: block; margin-top: 8px; font-size: 0.82rem; color: var(--text-dim); letter-spacing: 0.3px; }

/* ----------------------------- Skills ----------------------------- */
.skills-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.skill-cat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; transition: transform 0.3s var(--ease), border-color 0.3s; }
.skill-cat:hover { transform: translateY(-5px); border-color: var(--border-2); }
.skill-cat h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.skill-cat h3 i { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { font-size: 0.84rem; font-weight: 500; padding: 7px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); transition: all 0.2s; }
.chip:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.tech-carousel { display: flex; gap: 16px; overflow-x: auto; padding: 8px 2px 22px; scrollbar-width: none; }
.tech-carousel::-webkit-scrollbar { display: none; }
.tech-card { flex: 0 0 168px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 18px; text-align: center; transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; }
.tech-card:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.tech-icon { font-size: 2.4rem; margin-bottom: 12px; animation: floaty 3s ease-in-out infinite; display: flex; justify-content: center; align-items: center; height: 46px; }
.tech-card:nth-child(even) .tech-icon { animation-delay: 0.6s; }
.tech-img { width: 44px; height: 44px; object-fit: contain; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.tech-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 3px; }
.tech-card p { font-size: 0.78rem; color: var(--text-mute); }

/* ----------------------------- Projects ----------------------------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn { font-family: var(--font); font-size: 0.88rem; font-weight: 500; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); padding: 9px 20px; border-radius: 999px; cursor: pointer; transition: all 0.22s; }
.filter-btn:hover { color: var(--text); border-color: var(--border-2); }
.filter-btn.active { background: var(--accent); color: #16161a; border-color: var(--accent); font-weight: 600; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s; opacity: 1; }
.project-card:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: var(--shadow); }
.project-card.hide { display: none; }
.project-card.featured { grid-column: span 1; }

.card-media { position: relative; height: 280px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; cursor: pointer; background:
   radial-gradient(110% 90% at 50% 120%, var(--media-tint, var(--accent-soft)) 0%, transparent 60%), var(--bg-2); }
.card-media .shot { height: 90%; width: auto; max-width: 86%; object-fit: cover; object-position: top center; border-radius: 16px 16px 0 0; box-shadow: 0 14px 36px rgba(0,0,0,0.55); transition: transform 0.45s var(--ease); border: 1px solid rgba(255,255,255,0.06); border-bottom: none; }
/* Landscape web screenshots */
.card-media.wide .shot { height: auto; width: 92%; max-width: 92%; max-height: 90%; border-radius: 12px 12px 0 0; }
.project-card:hover .card-media .shot { transform: translateY(-8px) scale(1.03); }
.card-icon { position: absolute; top: 16px; left: 16px; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border-2); box-shadow: var(--shadow-sm); z-index: 3; background: var(--surface); }
.card-rating { position: absolute; top: 18px; right: 16px; z-index: 3; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); color: var(--accent-2); font-size: 0.78rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; display: flex; align-items: center; gap: 5px; }
.card-gallery-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,15,18,0.55); opacity: 0; transition: opacity 0.3s; z-index: 2; }
.card-gallery-hint span { background: var(--accent); color: #16161a; font-weight: 600; font-size: 0.85rem; padding: 9px 18px; border-radius: 999px; display: flex; align-items: center; gap: 8px; transform: translateY(8px); transition: transform 0.3s; }
.card-media:hover .card-gallery-hint { opacity: 1; }
.card-media:hover .card-gallery-hint span { transform: translateY(0); }

/* GitHub badge (open-source cards with screenshots) */
.card-badge { position: absolute; top: 16px; left: 16px; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--border-2); box-shadow: var(--shadow-sm); z-index: 3; background: var(--surface); display: grid; place-items: center; color: var(--text); font-size: 1.2rem; }

/* Cover image media (open-source cards without screenshots) — fills height & width */
.card-cover { height: 280px; overflow: hidden; background: var(--bg); }
.card-cover img { width: 100%; height: 100%; object-fit: fill; transition: transform 0.5s var(--ease); }
.project-card:hover .card-cover img { transform: scale(1.04); }

.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.card-body h3 { font-size: 1.22rem; font-weight: 600; margin-bottom: 4px; }
.card-tagline { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 10px; }
.card-desc { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 14px; flex: 1; }
.card-tech { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.card-tech span { font-size: 0.72rem; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 6px; }
.card-links { display: flex; flex-wrap: wrap; gap: 8px; }
.card-links a { font-size: 0.8rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-2); color: var(--text-dim); transition: all 0.2s; }
.card-links a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.card-links a.primary { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ----------------------------- Timeline ----------------------------- */
.timeline { position: relative; margin-top: 1rem; --tl-axis: 10px; }
/* rail and nodes share the SAME center (--tl-axis) via translateX(-50%) — guaranteed aligned */
.timeline::before { content: ''; position: absolute; left: var(--tl-axis); top: 8px; bottom: 8px; width: 2px; transform: translateX(-50%); background: linear-gradient(var(--accent), rgba(245,179,1,0.3)); }
.tl-item { position: relative; padding: 0 0 34px 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: var(--tl-axis); top: 6px; transform: translateX(-50%); width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.tl-item:first-child::before { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.tl-date { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); font-weight: 500; margin-bottom: 3px; }
.tl-role { font-size: 1.08rem; font-weight: 600; }
.tl-company { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 8px; }
.tl-company .tag { font-size: 0.7rem; background: var(--surface-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; margin-left: 8px; color: var(--text-mute); }
.tl-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.tl-list li { position: relative; padding-left: 18px; color: var(--text-dim); font-size: 0.9rem; }
.tl-list li::before { content: '▹'; position: absolute; left: 0; color: var(--accent); }

/* ----------------------------- Contact ----------------------------- */
.contact { text-align: center; }
.contact .section-title { justify-content: center; }
.contact .section-title::after { display: none; }
.contact-lead { max-width: 540px; margin: 0.4rem auto 2rem; color: var(--text-dim); font-size: 1.05rem; }
.contact-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; margin-top: 2.2rem; }
.contact-socials a { color: var(--text-dim); font-size: 0.92rem; display: inline-flex; align-items: center; gap: 9px; transition: color 0.2s; }
.contact-socials a:hover { color: var(--accent); }
.contact-socials i { color: var(--accent); }

/* ----------------------------- Footer ----------------------------- */
.footer { border-top: 1px solid var(--border); padding: 34px 0; background: var(--bg); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-credit { color: var(--text-mute); font-size: 0.86rem; }
.heart { color: var(--accent); }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a { color: var(--text-dim); font-size: 1.1rem; transition: color 0.2s, transform 0.2s; }
.footer-socials a:hover { color: var(--accent); transform: translateY(-3px); }

/* ----------------------------- Lightbox ----------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,10,13,0.92); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; animation: fadein 0.25s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.lb-close { position: absolute; top: 18px; right: 20px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-size: 1.2rem; cursor: pointer; z-index: 210; transition: all 0.2s; }
.lb-close:hover { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); }
.lb-content { max-width: 1000px; width: 100%; max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 28px 30px; }
.lb-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.lb-head img { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--border-2); }
.lb-glyph { width: 56px; height: 56px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--surface-2); display: grid; place-items: center; font-size: 1.6rem; color: var(--text); flex: 0 0 auto; }
.lb-head h3 { font-size: 1.4rem; }
.lb-head .lb-cat { color: var(--accent); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.lb-desc { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 18px; }
.lb-shots-wrap { position: relative; }
.lb-shots-wrap::after { content: ''; position: absolute; top: 0; right: 0; bottom: 14px; width: 48px; background: linear-gradient(90deg, transparent, var(--surface)); pointer-events: none; border-radius: 0 14px 14px 0; }
.lb-shots { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; }
.lb-shots img { height: min(460px, 52vh); width: auto; border-radius: 14px; border: 1px solid var(--border); scroll-snap-align: center; flex: 0 0 auto; background: var(--bg-2); }
.lb-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ----------------------------- Back to top ----------------------------- */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #16161a; border: none; font-size: 1.1rem; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(16px); transition: all 0.3s var(--ease); z-index: 90; box-shadow: 0 10px 26px rgba(245,179,1,0.35); }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { transform: translateY(-4px); }

/* ----------------------------- Reveal animation ----------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .about-facts { justify-content: center; }
  .about-cta { justify-content: center; }
}
@media (max-width: 760px) {
  /* NOTE: .nav has backdrop-filter, which makes it the containing block for this
     fixed child — so size/position the drawer explicitly to fill the viewport height. */
  .nav-links { position: fixed; top: 0; right: 0; bottom: auto; left: auto; height: 100vh; height: 100dvh; width: min(78vw, 300px); flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 6px; background: var(--surface); padding: 92px 24px 24px; transform: translateX(110%); transition: transform 0.35s var(--ease); box-shadow: -20px 0 60px rgba(0,0,0,0.55); border-left: 1px solid var(--border-2); z-index: 105; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { width: 100%; padding: 12px 14px; font-size: 1rem; }
  .nav-links a::after { display: none; }
  .nav-links a.nav-cta { margin-left: 0; margin-top: 6px; }
  .hamburger { display: flex; }
  .stats-strip { gap: 10px; }
  .stat { padding: 20px 8px; }
  .about-facts { grid-template-columns: 1fr; text-align: left; }
  .projects-grid { grid-template-columns: 1fr; }
  .section-title::after { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
