/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: var(--selection); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── CSS Variables — Day (Light) ── */
:root {
  --bg: #FFF8F0;
  --bg-card: #FFF1E6;
  --text: #1A2B3B;
  --text-soft: #4A6173;
  --text-muted: #7A8F9E;
  --accent: #0891B2;
  --accent-hover: #06B6D4;
  --accent-soft: #CFFAFE;
  --coral: #F97066;
  --sunset-pink: #EC4899;
  --sunset-orange: #F59E0B;
  --sunset-purple: #A855F7;
  --divider: #E0D5C8;
  --selection: #BAE6FD;
  --max-w: 1080px;
  --px: 32px;
}

/* ── CSS Variables — Night (Dark) ── */
html.dark {
  --bg: #0B1120;
  --bg-card: #111D2E;
  --text: #E8F0F8;
  --text-soft: #94A8BE;
  --text-muted: #5E7A8F;
  --accent: #22D3EE;
  --accent-hover: #67E8F9;
  --accent-soft: #164E63;
  --coral: #FB7185;
  --sunset-pink: #F472B6;
  --sunset-orange: #FBBF24;
  --sunset-purple: #C084FC;
  --divider: #1E3044;
  --selection: #164E63;
}

/* ── Dark Mode Transitions ── */
body, nav, .project-card, .tool-chip, footer, .lightbox, .glass-section, .mobile-menu, .glass-footer, .avail-badge {
  transition: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease;
}
a, .nav-links a, .footer-links a, .meta-value a {
  transition: color 0.25s ease;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drawLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Squiggle Underlines ── */
.squiggle { position: relative; display: inline-block; cursor: default; }
.squiggle-svg {
  position: absolute; bottom: -6px; left: 0;
  width: 100%; height: 14px;
  overflow: visible; pointer-events: none;
}
.squiggle-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 0.45s ease-out;
}
.squiggle:hover .squiggle-line,
.squiggle.squiggle-active .squiggle-line {
  stroke-dashoffset: 0;
  animation: squiggle-wave 2s ease-in-out infinite;
}
@keyframes squiggle-wave {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-1px) translateY(-1.5px); }
  50% { transform: translateX(1px) translateY(0.5px); }
  75% { transform: translateX(-0.5px) translateY(1px); }
}

/* ── Dock-style text bump (JS-driven) ── */
.ripple-char {
  display: inline-block;
  transition: transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: bottom center;
  will-change: transform;
}
.ripple-char.space { width: 0.3em; }

/* ── Navigation ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  display: flex; align-items: center;
  transition: all 0.35s ease;
  background: transparent;
}
nav.scrolled {
  background: rgba(255,248,240,0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--divider);
}
html.dark nav.scrolled {
  background: rgba(11,17,32,0.9);
}
.nav-inner {
  width: 100%; max-width: var(--max-w); margin: 0 auto;
  padding: 0 var(--px);
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
  font-family: 'DM Mono', monospace;
  font-size: 16px; font-weight: 400;
  cursor: pointer; letter-spacing: 0.02em;
  text-decoration: none; color: var(--text);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  letter-spacing: 0.03em; transition: color 0.25s;
  position: relative; padding-bottom: 3px;
}
.nav-links a:not(.nav-contact)::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0;
  height: 1.5px; background: var(--accent); transition: width 0.2s; border-radius: 1px;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:not(.nav-contact):hover::after { width: 100%; }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { width: 100%; }
.nav-contact {
  font-size: 13px; font-weight: 500;
  color: var(--text);
  padding: 7px 18px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  transition: all 0.25s;
}
.nav-contact:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ── Theme Toggle ── */
.theme-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: color 0.25s, background 0.25s;
}
.theme-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.theme-icon-moon { display: none; }
html.dark .theme-icon-sun { display: none; }
html.dark .theme-icon-moon { display: block; }

/* ── Music Toggle ── */
.music-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; transition: color 0.25s, background 0.25s;
}
.music-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.music-icon-on { display: none; }
.music-toggle.playing .music-icon-off { display: none; }
.music-toggle.playing .music-icon-on { display: block; }
.music-toggle.playing { color: var(--accent); }
.canvas-page .music-toggle { color: rgba(255,255,255,0.7); }
.canvas-page .music-toggle:hover { color: #fff; background: rgba(255,255,255,0.1); }
.canvas-page .music-toggle.playing { color: var(--accent); }

/* ── Hamburger Menu (mobile) ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-muted);
  transition: color 0.25s;
  z-index: 110;
}
.hamburger:hover { color: var(--accent); }
.hamburger svg { display: block; }
.hamburger .icon-close { display: none; }
.hamburger.active .icon-open { display: none; }
.hamburger.active .icon-close { display: block; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(255, 248, 240, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
html.dark .mobile-menu {
  background: rgba(11, 17, 32, 0.96);
}
.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 32px;
  color: var(--text);
  transition: color 0.25s ease;
  letter-spacing: -0.01em;
}
.mobile-menu a:hover { color: var(--accent); }
.mobile-menu a[href^="mailto"] {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.03em;
  border: 1px solid var(--accent);
  padding: 10px 28px;
  border-radius: 100px;
  transition: all 0.25s ease;
}
.mobile-menu a[href^="mailto"]:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── Scene Background (home page) ── */
.scene-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
.page-content {
  position: relative;
  z-index: 1;
}

/* ── Canvas Page Overrides (nav + text over canvas) ── */
.canvas-page nav {
  background: rgba(11,17,32,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.canvas-page nav.scrolled {
  background: rgba(11,17,32,0.6);
  border-bottom-color: rgba(255,255,255,0.1);
}
.canvas-page .nav-logo { color: #fff; }
.canvas-page .nav-links a { color: rgba(255,255,255,0.75); }
.canvas-page .nav-links a:hover { color: #fff; }
.canvas-page .nav-links a:not(.nav-contact)::after { background: #fff; }
.canvas-page .nav-contact {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.canvas-page .nav-contact:hover {
  background: #fff;
  color: #0B1120;
  border-color: #fff;
}
html.dark .canvas-page nav.scrolled {
  background: rgba(11,17,32,0.85);
  border-bottom-color: rgba(255,255,255,0.06);
}
.canvas-page .theme-toggle { color: rgba(255,255,255,0.7); }
.canvas-page .theme-toggle:hover { color: #fff; background: rgba(255,255,255,0.1); }
.canvas-page .hamburger { color: rgba(255,255,255,0.7); }
.canvas-page .hamburger:hover { color: #fff; }

/* ── Canvas Page Hero Text (white over canvas) ── */
.canvas-page .hero h1 { color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3); }
.canvas-page .hero .hero-sub { color: rgba(255,255,255,0.85); text-shadow: 0 1px 12px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.25); }
.canvas-page .hero .hero-divider { background: rgba(255,255,255,0.2); }
.canvas-page .hero h1 em { color: #67E8F9; }
.canvas-page .hero .squiggle-line { stroke: rgba(255,255,255,0.6); }

/* ── Hero ── */
.hero {
  padding: 160px var(--px) 72px;
  max-width: var(--max-w); margin: 0 auto;
}
.hero h1, .hero-canvas h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 400; line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero h1 > span, .hero-canvas h1 > span { display: block; animation: fadeUp 0.8s ease forwards; opacity: 0; }
.hero h1 > span:nth-child(1), .hero-canvas h1 > span:nth-child(1) { animation-delay: 0.1s; }
.hero h1 > span:nth-child(2), .hero-canvas h1 > span:nth-child(2) { animation-delay: 0.25s; }
.hero h1 > span:nth-child(3), .hero-canvas h1 > span:nth-child(3) { animation-delay: 0.4s; }
.hero h1 em, .hero-canvas h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  margin-top: 36px; max-width: 560px;
  font-size: 18px; font-weight: 300; line-height: 1.75;
  color: var(--text-soft);
  animation: fadeUp 0.8s ease 0.55s forwards; opacity: 0;
}
.hero-divider {
  margin-top: 56px; height: 1px;
  background: var(--divider);
  transform-origin: left;
  animation: drawLine 0.9s ease 0.7s forwards;
  transform: scaleX(0);
}

/* ── Hero (Canvas variant — home page only) ── */
.hero-canvas {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
  padding-top: 18vh;
  padding-bottom: 20vh;
}

/* ── Hero Text Contrast (over canvas) ── */
.hero-canvas .hero-content h1,
.hero-canvas .hero-content .hero-sub {
  color: #fff;
}
.hero-canvas .hero-content h1 em {
  color: #67E8F9;
}
.hero-canvas .hero-content {
  text-shadow:
    0 2px 20px rgba(0,0,0,0.4),
    0 1px 4px rgba(0,0,0,0.3);
}
/* ── Availability Badge (from Portfolio 2) ── */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(8,145,178,0.4); }
  60% { box-shadow: 0 0 0 8px rgba(8,145,178,0); }
}
.avail-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  padding: 7px 16px; border-radius: 100px;
  animation: pulse 2.4s infinite, fadeUp 0.8s ease 0.65s forwards;
  opacity: 0;
  margin-top: 32px;
}
html.dark .avail-badge { color: #0B1120; }
.avail-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); flex-shrink: 0;
}

/* ── Sections ── */
section { padding: 64px var(--px); max-width: var(--max-w); margin: 0 auto; }
.section-label { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.section-label h2, .section-label span {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  white-space: nowrap;
  font-family: 'DM Sans', -apple-system, sans-serif;
  margin: 0;
}
.section-num {
  font-family: 'DM Mono', monospace;
  color: var(--text-muted);
  margin-right: 6px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--divider); }

/* ── Glass Cards (over canvas background) ── */
.glass-section {
  background: rgba(255, 248, 240, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(224, 213, 200, 0.5);
  border-radius: 20px;
  padding: 48px 40px;
  margin: 0 auto;
  max-width: var(--max-w);
}
html.dark .glass-section {
  background: rgba(11, 17, 32, 0.78);
  border-color: rgba(30, 48, 68, 0.5);
}

/* Jungle (gallery) page — green-tinted glass to blend with foliage */
.jungle-page .glass-section {
  background: rgba(220, 240, 220, 0.72);
  border-color: rgba(120, 170, 120, 0.35);
}
html.dark .jungle-page .glass-section {
  background: rgba(8, 20, 10, 0.78);
  border-color: rgba(20, 55, 28, 0.45);
}
.jungle-page .glass-footer {
  background: rgba(220, 240, 220, 0.68);
  border-top-color: rgba(120, 170, 120, 0.35);
}
html.dark .jungle-page .glass-footer {
  background: rgba(8, 20, 10, 0.75);
  border-top-color: rgba(20, 55, 28, 0.35);
}

/* ── Glass Footer ── */
.glass-footer {
  background: rgba(255, 248, 240, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(224, 213, 200, 0.5);
}
html.dark .glass-footer {
  background: rgba(11, 17, 32, 0.75);
  border-top-color: rgba(30, 48, 68, 0.4);
}

/* ── Timeline ── */
.timeline-item {
  display: grid; grid-template-columns: 170px 1fr; gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--divider);
}
.timeline-item:last-child { border-bottom: none; }
.time-period { font-size: 13px; color: var(--text-muted); letter-spacing: 0.02em; padding-top: 4px; }
.time-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px; font-weight: 400; margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.time-desc { font-size: 15px; font-weight: 300; line-height: 1.65; color: var(--text-soft); }

/* ── Education ── */
.edu { margin-top: 56px; }
.edu + .edu { margin-top: 28px; }
.edu-degree {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px; display: block; margin-bottom: 4px;
}
.edu-school { font-size: 15px; font-weight: 300; color: var(--text-soft); }

/* ── Projects Grid ── */
.projects-intro {
  font-size: 17px; font-weight: 300; line-height: 1.7;
  color: var(--text-soft); max-width: 560px;
  margin: -12px 0 44px;
}
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project-card {
  background: var(--bg-card);
  border-radius: 14px; padding: 30px;
  display: flex; flex-direction: column; gap: 16px;
  transition: all 0.35s ease, opacity 0.35s ease;
  cursor: default; position: relative;
}
a.project-card { cursor: pointer; }
.project-card:hover {
  background: var(--accent-soft);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(8,145,178,0.08);
}
.project-grid:hover .project-card:not(:hover):not(.placeholder) {
  opacity: 0.35;
}
.project-top { display: flex; justify-content: space-between; align-items: center; }
.project-index { font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.05em; }
.project-emoji { font-size: 20px; }
.project-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.project-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px; font-weight: 400; letter-spacing: -0.01em;
}
.project-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  display: block; margin-bottom: 4px;
}
.project-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
}
.project-desc { font-size: 14px; font-weight: 300; line-height: 1.65; color: var(--text-soft); flex: 1; }
.project-link {
  font-size: 13px; font-weight: 500; color: var(--accent);
  border-bottom: 1px solid transparent;
  align-self: flex-start; padding-bottom: 1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.project-link:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }

/* ── Placeholder Cards ── */
.project-card.placeholder {
  border: 2px dashed var(--divider);
  background: transparent;
  backdrop-filter: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  cursor: default;
  opacity: 0.6;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}
.project-card.placeholder:hover {
  opacity: 0.85;
  border-color: var(--accent);
  background: transparent;
  transform: none;
  box-shadow: none;
}
.placeholder-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.placeholder-icon {
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Project Visuals ── */
.project-visual {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--divider);
  background: var(--bg);
}
.project-visual img { width: 100%; height: auto; display: block; max-height: 220px; object-fit: cover; }

/* ── Tools ── */
.tools-grid { display: flex; flex-direction: column; gap: 32px; }
.tool-group-label { font-size: 13px; font-weight: 500; color: var(--text-soft); margin-bottom: 10px; letter-spacing: 0.02em; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip {
  font-size: 13px; color: var(--text-soft);
  background: var(--accent-soft);
  border: 1px solid var(--divider);
  padding: 7px 16px; border-radius: 100px;
  transition: all 0.2s;
}
.tool-chip:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
.about-text p { font-size: 17px; font-weight: 300; line-height: 1.75; color: var(--text-soft); margin-bottom: 20px; }
.about-text p:last-child { margin-bottom: 0; }
.about-meta { display: flex; flex-direction: column; gap: 24px; padding-top: 2px; }
.meta-label { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 3px; }
.meta-value { font-size: 15px; color: var(--text); line-height: 1.5; }
.meta-value a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--divider);
  transition: text-decoration-color 0.2s;
}
.meta-value a:hover { text-decoration-color: var(--accent); }

/* ── Footer ── */
footer {
  margin-top: 32px; padding: 28px var(--px);
  max-width: var(--max-w); margin-left: auto; margin-right: auto;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--divider);
  padding-top: 28px;
}
.footer-text { font-size: 12px; color: var(--text-muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--text-muted); transition: color 0.25s ease;
}
.footer-links a:hover { color: var(--accent); }

/* ── Work Item List ── */
.work-item {
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  padding: 26px 0; border-bottom: 1px solid var(--divider); align-items: start;
}
.work-item:last-child { border-bottom: none; }
.work-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 22px; font-weight: 400; margin-bottom: 6px; letter-spacing: -0.01em;
}
.work-desc { font-size: 15px; font-weight: 300; line-height: 1.65; color: var(--text-soft); }
.work-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-muted); white-space: nowrap; padding-top: 8px;
}
.work-link {
  display: inline-block; margin-top: 8px;
  font-size: 13px; font-weight: 500; color: var(--accent);
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.work-link:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }

/* ── Values Section ── */
.values-grid { display: flex; flex-direction: column; gap: 32px; margin-top: 8px; }
.value-item { display: flex; gap: 16px; }
.value-emoji { font-size: 24px; flex-shrink: 0; padding-top: 2px; }
.value-content h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 20px; font-weight: 400; margin-bottom: 4px;
}
.value-content p { font-size: 15px; font-weight: 300; line-height: 1.65; color: var(--text-soft); }

/* ── Masonry Gallery ── */
.masonry { columns: 3; column-gap: 16px; }
.masonry-item {
  break-inside: avoid; margin-bottom: 16px; border-radius: 3px;
  overflow: hidden; cursor: pointer; transition: all 0.3s ease; border: 2px solid transparent;
}
.masonry-item:hover {
  border-color: var(--divider); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(8,145,178,0.1);
}
.masonry-item img { width: 100%; height: auto; display: block; }

/* ── Full-page Photo Scatter Zone (gallery) ── */
.scatter-zone {
  position: fixed; inset: 0; z-index: 4;
  pointer-events: auto; cursor: crosshair;
}
.scatter-zone .scatter-card {
  position: fixed; pointer-events: auto; cursor: pointer;
  width: 160px; padding: 0; background: none; border-radius: 3px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.45s ease;
  will-change: transform, opacity;
}
html.dark .scatter-zone .scatter-card {
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 1px 4px rgba(0,0,0,0.3);
}
.scatter-card img { width: 100%; height: auto; display: block; }
.scatter-card .scatter-caption { display: none; }
.scatter-card:hover { transform: translate(-50%,-50%) scale(1.12) !important; z-index: 10; }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11,17,32,0.95); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 90vw; max-height: 85vh; border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  font-size: 28px; color: #fff; cursor: pointer;
  background: none; border: none; opacity: 0.7; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 36px; color: #fff; cursor: pointer;
  background: none; border: none; opacity: 0.5; transition: opacity 0.2s; padding: 16px;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ── Gallery Coming Soon ── */
.coming-soon {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Focus Styles ── */
.theme-toggle:focus-visible,
.hamburger:focus-visible,
.nav-contact:focus-visible,
.nav-links a:focus-visible,
.project-link:focus-visible,
.work-link:focus-visible,
.footer-links a:focus-visible,
.meta-value a:focus-visible,
.mobile-menu a:focus-visible,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  :root { --px: 24px; }
  .hero { padding-top: 120px; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .time-period { padding-top: 0; font-size: 12px; }
  .project-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .nav-links a:not(.nav-contact) { display: none; }
  .work-item { grid-template-columns: 1fr; gap: 4px; }
  .masonry { columns: 2; }
  .hamburger { display: flex; align-items: center; }
  .mobile-menu { display: flex; }
  .glass-section { padding: 36px 28px; }
}
@media (max-width: 520px) {
  :root { --px: 18px; }
  .hero { padding-top: 100px; padding-bottom: 48px; }
  .hero-canvas { min-height: 100vh; }
  .hero-content { padding-top: 15vh; padding-bottom: 25vh; }
  .hero-sub { font-size: 15px; }
  section { padding: 48px var(--px); }
  .project-card { padding: 22px; }
  .masonry { columns: 1; }
  .glass-section { padding: 28px 18px; }
  .project-card.placeholder { min-height: 200px; }
}
