/* ============================================================
   SATYASA KHADKA — PERSONAL WEBSITE
   Palette: Warm Off-white · Near-black · Deep Emerald
   Type: Syne (display) · Plus Jakarta Sans (body)
   ============================================================ */

/* ── TOKENS: LIGHT (default) ── */
:root {
  --bg:            #F8F7F4;
  --bg-2:          #F2F1EE;
  --bg-3:          #ECEAE6;
  --surface:       #FFFFFF;
  --border:        #E4E3DF;
  --border-soft:   #EDECE9;
  --text:          #1A1A18;
  --text-muted:    #5C5C58;
  --text-dim:      #9A9A94;
  --accent:        #196B47;
  --accent-light:  #218A5C;
  --accent-dim:    rgba(25, 107, 71, 0.08);
  --accent-glow:   rgba(25, 107, 71, 0.15);
  --shadow-sm:     0 1px 3px rgba(26, 26, 24, 0.06), 0 1px 2px rgba(26, 26, 24, 0.04);
  --shadow-md:     0 4px 16px rgba(26, 26, 24, 0.08), 0 2px 6px rgba(26, 26, 24, 0.05);
  --shadow-lg:     0 8px 32px rgba(26, 26, 24, 0.10), 0 4px 12px rgba(26, 26, 24, 0.06);
  --font-display:  'Syne', system-ui, sans-serif;
  --font-body:     'Plus Jakarta Sans', system-ui, sans-serif;
  --max-w:         1100px;
  --nav-h:         68px;
  --radius:        10px;
  --radius-lg:     16px;
  color-scheme: light;
}

/* ── TOKENS: DARK (system preference) ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #131311;
    --bg-2:          #1A1A18;
    --bg-3:          #222220;
    --surface:       #1E1E1C;
    --border:        #2C2C29;
    --border-soft:   #252523;
    --text:          #F0EFEB;
    --text-muted:    #8A8A84;
    --text-dim:      #5C5C58;
    --accent:        #22A869;
    --accent-light:  #2DC278;
    --accent-dim:    rgba(34, 168, 105, 0.10);
    --accent-glow:   rgba(34, 168, 105, 0.18);
    --shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md:     0 4px 16px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg:     0 8px 32px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

/* ── TOKENS: DARK (explicit toggle) ── */
:root[data-theme="dark"] {
  --bg:            #131311;
  --bg-2:          #1A1A18;
  --bg-3:          #222220;
  --surface:       #1E1E1C;
  --border:        #2C2C29;
  --border-soft:   #252523;
  --text:          #F0EFEB;
  --text-muted:    #8A8A84;
  --text-dim:      #5C5C58;
  --accent:        #22A869;
  --accent-light:  #2DC278;
  --accent-dim:    rgba(34, 168, 105, 0.10);
  --accent-glow:   rgba(34, 168, 105, 0.18);
  --shadow-sm:     0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md:     0 4px 16px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-lg:     0 8px 32px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
strong { font-weight: 600; color: var(--text); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── SELECTION ── */
::selection { background: var(--accent); color: #fff; }

/* ── FOCUS ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(248, 247, 244, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header {
    background: rgba(19, 19, 17, 0.88);
  }
}
:root[data-theme="dark"] .site-header {
  background: rgba(19, 19, 17, 0.88);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-link:hover,
.nav-link.active { color: var(--text); }
.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--text); background: var(--bg-3); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 2rem;
  z-index: 99;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 1.25rem; }
.mob-link {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.mob-link:hover { color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 3rem) 2rem 5rem;
  position: relative;
}

.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 5rem;
  align-items: center;
}

/* Text side */
.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
  min-height: 1.6em;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 52ch;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  margin-bottom: 2.75rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.hero-social {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.hero-social a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.2s;
}
.hero-social a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hero-social a:hover { color: var(--accent); }

/* Photo side */
.hero-photo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.hero-photo-offset {
  position: absolute;
  top: 14px;
  left: 14px;
  right: -14px;
  bottom: -14px;
  background: var(--accent);
  border-radius: var(--radius-lg);
  opacity: 0.1;
  z-index: 0;
}
.hero-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 8%;
  display: none;
}
.hero-photo.loaded img { display: block; }
.hero-photo.loaded .photo-fallback { display: none; }
.photo-fallback {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  letter-spacing: -0.04em;
}

.hero-photo-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.4rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hero-scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.75); }
}

/* ============================================================
   SECTIONS — SHARED
   ============================================================ */
.section {
  padding: 5rem 2rem;
}
.section:nth-child(even) { background: var(--bg-2); }

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 3rem;
  text-wrap: balance;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 2.5rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.subsection-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.75rem;
  letter-spacing: -0.02em;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  max-width: 720px;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 62ch;
  font-size: 1.02rem;
}
.about-text p strong { color: var(--text); }
.about-meta {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.meta-item {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}
.meta-label {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 80px;
  padding-top: 1px;
}
.meta-value { color: var(--text-muted); }


/* ============================================================
   TIMELINE (EDUCATION)
   ============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
}
.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 108px;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-item::after {
  content: '';
  position: absolute;
  left: 103px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg-2);
}
.timeline-year {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.timeline-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}
.timeline-inst {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.timeline-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.exp-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 4rem;
}
.exp-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.exp-item:first-child { padding-top: 0; }
.exp-item:last-child { border-bottom: none; }
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}
.exp-role {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.exp-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 99px;
  padding: 0.15rem 0.55rem;
  font-family: var(--font-body);
}
.exp-org {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.25rem;
}
.exp-date {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
  padding-top: 3px;
  flex-shrink: 0;
}
.exp-desc {
  font-size: 0.93rem;
  color: var(--text-muted);
  max-width: 68ch;
  line-height: 1.7;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.award-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.award-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent);
}
.award-event {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.award-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.award-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 0.25rem;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}
.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.project-featured {
  background: var(--bg-3);
}
.proj-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.proj-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.proj-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--border);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}
.project-card:hover .proj-num { color: var(--accent); }
.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.project-featured h3 { font-size: 1.2rem; }
.project-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.proj-tech span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
}
.proj-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: auto;
  transition: opacity 0.2s;
  font-family: var(--font-display);
}
.proj-link:hover { opacity: 0.7; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-bottom: 4rem;
}
.skill-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tags span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.35rem 0.8rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  cursor: default;
}
.skill-tags span:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.certs {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}
.certs-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cert-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.cert-item:last-child { border-bottom: none; }
.cert-inner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.cert-inner strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.cert-inner span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   PUBLICATION
   ============================================================ */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 720px;
}
.pub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  max-width: 720px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.pub-venue {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.pub-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.02em;
}
.pub-authors {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
}
.pub-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 58ch;
}
.pub-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-display);
  transition: opacity 0.2s;
}
.pub-link:hover { opacity: 0.7; }

/* ============================================================
   GALLERY — PHOTO SLIDER
   ============================================================ */
.gallery-section { padding-block: 3.5rem; }
.gallery-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: -2rem;
  margin-bottom: 2.5rem;
}

/* Slider container */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Slider wrap */
.slider-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.slide {
  min-width: 100%;
  position: relative;
  overflow: hidden;
}
.slide img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  display: block;
  background: var(--bg-2);
  transition: transform 0.45s ease;
}
.slide:hover img {
  transform: scale(1.04);
}
.slide-caption {
  padding: 0.8rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
}

/* Prev / Next buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s;
  z-index: 2;
}
.slider-btn svg { width: 18px; height: 18px; }
.slider-btn:hover { background: var(--bg-3); }
.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }

/* Dot indicators — below the slider */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.slider-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: 1.5px solid var(--text-dim);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  padding: 0;
}
.slider-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.25);
}

.gallery-empty {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 1rem;
}
.gallery-empty code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.82rem;
  color: var(--accent);
}

@media (max-width: 640px) {
  .slide img { max-height: 240px; }
  .slider-btn { width: 34px; height: 34px; }
}

/* ============================================================
   FOOTER / CONTACT BAR
   ============================================================ */
.site-footer {
  background: var(--bg-3);
  border-top: 1px solid var(--border);
}
.footer-top {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.footer-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}
.footer-email a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-email a:hover { color: var(--accent); }
.footer-right { text-align: right; }
.footer-icons {
  display: flex;
  gap: 0.625rem;
  justify-content: flex-end;
}
.footer-icons a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.footer-icons a svg { width: 15px; height: 15px; }
.footer-icons a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding: 0.875rem 2rem;
  text-align: center;
}
.footer-bottom span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-photo-wrap {
    order: -1;
    align-items: center;
  }
  .hero-photo {
    max-width: 260px;
    margin: 0 auto;
  }
  .hero-photo-offset { display: none; }

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

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

  .footer-top { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .footer-right { text-align: left; }
  .footer-icons { justify-content: flex-start; }
}

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

  .hero { padding-top: calc(var(--nav-h) + 2rem); }
  .hero-name { letter-spacing: -0.03em; }
  .hero-scroll-hint { display: none; }
  .hero-social a span { display: none; }
  .hero-social a { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; justify-content: center; }

  .awards-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }

  .skills-wrap { grid-template-columns: 1fr; }

  .exp-header { flex-direction: column; gap: 0.3rem; }

  .timeline-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .timeline-item::before { display: none; }
  .timeline-item::after { display: none; }
  .timeline-year { color: var(--accent); font-size: 0.75rem; }

  .footer-top { padding: 1.25rem; }
  .section { padding: 5rem 1.25rem; }
  .pub-card { padding: 1.5rem; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
