:root,
:root[data-theme="dark"] {
  --color-canvas: #1a1a1a;
  --color-ink: #f4f4f2;
  --color-charcoal: #ffffff;
  --color-muted-hard: #242424;
  --color-muted: #bcbcbc;
  --color-muted-soft: #8a8a8a;
  --color-border-soft: #444444;
  --color-border-subtle: #2a2a2a;
  --color-btn-hover: #c9c9c9;
  --color-row-hover: rgba(244, 244, 242, 0.04);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --color-canvas: #ffffff;
  --color-ink: #101010;
  --color-charcoal: #000000;
  --color-muted-hard: #222222;
  --color-muted: #555555;
  --color-muted-soft: #999999;
  --color-border-soft: #c8c8c8;
  --color-border-subtle: #e0e0e0;
  --color-btn-hover: #999999;
  --color-row-hover: rgba(16, 16, 16, 0.03);
  color-scheme: light;
}

:root {
  --font-mono: 'JetBrains Mono', 'Soehne Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-caption: 10px;
  --text-label: 26px;
  --text-display: 54px;

  --section-gap: 96px;
  --element-gap: 14px;

  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  --nav-height: 64px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --shutter-ash: #1a1a1a;
  --shutter-ash-seam: #2e2e2e;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

main, .footer { position: relative; z-index: 1; }

/* ---------- Starfield ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}
:root[data-theme="light"] #starfield { opacity: 0; }

.star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  animation: star-pulse ease-in-out infinite;
}

@keyframes star-pulse {
  0%, 100% { opacity: var(--op, 0.5); }
  50% { opacity: calc(var(--op, 0.5) * 0.35); }
}

:focus-visible {
  outline: 1px solid var(--color-ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Camera shutter transition ---------- */
.shutter {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    var(--shutter-ash) 0deg 23deg,
    var(--shutter-ash-seam) 23deg 24deg
  );
  pointer-events: none;
  clip-path: circle(0% at var(--ox, 50%) var(--oy, 50%));
  transition: clip-path 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}
.shutter.active {
  clip-path: circle(150% at var(--ox, 50%) var(--oy, 50%));
}
html.incoming-shutter .shutter {
  clip-path: circle(150% at 50% 50%);
  transition: none;
}

/* ---------- Resume modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-panel {
  width: 100%;
  max-width: 820px;
  height: min(85vh, 960px);
  background: var(--color-canvas);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

.modal-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
  transition: border-color 0.12s ease;
}
.modal-close:hover { border-color: var(--color-ink); }

.modal-body {
  flex: 1;
  background: #ffffff;
  min-height: 0;
}
.modal-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .modal-overlay { padding: 0; }
  .modal-panel { max-width: 100%; height: 100vh; border-radius: 0; }
  .modal-footer { justify-content: center; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--color-canvas);
  border-bottom: 1px solid var(--color-border-subtle);
  z-index: 100;
  transform: translateY(0);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav.nav--hidden { transform: translateY(-100%); }

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mark {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: border-color 0.12s ease;
}
.nav-mark:hover { border-color: var(--color-ink); }

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.12s ease;
  padding: 4px 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-ink);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--color-ink);
  width: 100%;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

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

/* Theme toggle — pill switch */
.theme-toggle {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-soft);
  background: transparent;
  position: relative;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--color-ink); }

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease), background-color 0.3s ease;
}
[data-theme="dark"] .theme-toggle-thumb { transform: translateX(0) rotate(0deg); }
[data-theme="light"] .theme-toggle-thumb { transform: translateX(20px) rotate(180deg); }

.theme-toggle-thumb svg {
  position: absolute;
  color: var(--color-canvas);
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}
.theme-toggle-thumb .icon-sun { opacity: 0; transform: scale(0.4) rotate(-90deg); }
.theme-toggle-thumb .icon-moon { opacity: 1; transform: scale(1) rotate(0deg); }
[data-theme="light"] .theme-toggle-thumb .icon-sun { opacity: 1; transform: scale(1) rotate(90deg); }
[data-theme="light"] .theme-toggle-thumb .icon-moon { opacity: 0; transform: scale(0.4) rotate(0deg); }

/* ---------- Layout helpers ---------- */
.section-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-inner--narrow { max-width: 680px; }

.section {
  padding-top: var(--section-gap);
}
.section:last-of-type { padding-bottom: var(--section-gap); }

.section-heading {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-muted-soft);
  margin: 0 0 32px;
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-ink);
  color: var(--color-canvas);
}
.btn-primary:hover { background: var(--color-btn-hover); }

.btn-ghost {
  background: transparent;
  border-color: var(--color-border-soft);
  color: var(--color-muted);
}
.btn-ghost:hover { border-color: var(--color-ink); color: var(--color-ink); }

.hero-actions {
  display: flex;
  gap: var(--element-gap);
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 40px;
  position: relative;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-inner { max-width: 620px; }

.hero-title {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(36px, 7vw, var(--text-display));
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin: 0;
}

.hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  animation: word-in 0.6s var(--ease) both;
}
.hero-title .word:nth-child(1) { animation-delay: 0.1s; }
.hero-title .word:nth-child(2) { animation-delay: 0.28s; }
.hero-title .word:nth-child(3) { animation-delay: 0.46s; }

@keyframes word-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-fade-item {
  opacity: 0;
  transform: translateY(10px);
  animation: word-in 0.6s var(--ease) both;
}
.hero-subtitle.hero-fade-item { animation-delay: 0.68s; }
.hero-actions.hero-fade-item { animation-delay: 0.82s; }

.hero-subtitle {
  font-size: 13px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 18px 0 0;
}

.hero-actions { justify-content: center; }

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  color: var(--color-muted-soft);
  transition: color 0.12s ease;
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue:hover { color: var(--color-ink); }

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ---------- About ---------- */
.about-lead {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 20px;
}

.body-text {
  font-size: 13px;
  line-height: 1.75;
  color: var(--color-muted);
  margin: 0 0 16px;
}

/* ---------- Roles: table/list ---------- */
.role-list { display: flex; flex-direction: column; }

.role-row-head {
  display: grid;
  grid-template-columns: 84px 1fr 180px 18px;
  gap: 24px;
  padding: 0 24px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted-soft);
}
/* Only two labels are shown (logo/arrow columns have none), so place them
   explicitly over the columns they describe instead of relying on grid
   auto-placement, which would put them in columns 1–2 instead of 2–3. */
.role-row-head span:nth-child(1) { grid-column: 2; }
.role-row-head span:nth-child(2) { grid-column: 3; text-align: left; }

.role-row {
  display: grid;
  grid-template-columns: 84px 1fr 180px 18px;
  align-items: start;
  gap: 24px;
  padding: 28px 24px;
  border-top: 1px solid var(--color-border-subtle);
  transition: background-color 0.12s ease;
}
.role-row:last-child { border-bottom: 1px solid var(--color-border-subtle); }
.role-row:hover { background: var(--color-row-hover); }

.role-logo {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background: var(--color-canvas);
}

.role-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.5;
}

.role-current {
  font-style: normal;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  margin-left: 10px;
  vertical-align: middle;
}

.role-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-muted);
  margin-top: 2px;
}

.role-org {
  font-size: 15px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.role-arrow {
  color: var(--color-muted-soft);
  transition: color 0.12s ease, transform 0.12s ease;
  margin-top: 6px;
}
.role-row:hover .role-arrow { color: var(--color-ink); transform: translate(1px, -1px); }

/* ---------- Tiles (project cards) ---------- */
.grid { display: grid; gap: var(--element-gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.tile {
  background: var(--color-canvas);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s ease;
}
.tile:hover { border-color: var(--color-border-soft); }

.tile-media {
  background: var(--color-canvas);
  aspect-ratio: 16/10;
  overflow: hidden;
}
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-divider { border-top: 1px solid var(--color-border-subtle); }

.tile-meta {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.tile-body { padding: 0 16px 20px; }

.tile-text {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 12px;
}

.tag-line {
  font-size: 10.5px;
  color: var(--color-muted-soft);
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}

.tile-link {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 2px;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.tile-link:hover { border-color: var(--color-ink); color: var(--color-muted); }

.tile-link-row { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Skills: interactive playground ---------- */
.skills-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted-soft);
  margin: -16px 0 24px;
}

.skills-playground {
  position: relative;
  width: 100%;
  height: clamp(360px, 46vw, 560px);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-canvas);
  touch-action: none;
}

.skill-box {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 64px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  background: var(--color-canvas);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: border-color 0.12s ease;
  will-change: transform;
}
.skill-box:hover { border-color: var(--color-ink); }
.skill-box.dragging {
  cursor: grabbing;
  border-color: var(--color-ink);
  z-index: 5;
}

.skill-box-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink);
  pointer-events: none;
}

/* ---------- Contact ---------- */
.contact-intro { text-align: center; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-email {
  display: block;
  font-size: clamp(18px, 2.4vw, 24px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 6px;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.contact-email:hover { border-color: var(--color-ink); color: var(--color-muted); }

.contact-location {
  display: block;
  font-size: 12px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 14px;
  transition: color 0.12s ease;
}
.contact-location:hover { color: var(--color-ink); }

.icon-row { display: flex; gap: 10px; margin-top: 36px; }

.icon-tile {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  color: var(--color-ink);
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}
.icon-tile:hover { border-color: var(--color-ink); background: var(--color-ink); color: var(--color-canvas); }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted-soft);
}

.field input,
.field textarea {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-ink);
  background: var(--color-canvas);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: border-color 0.12s ease;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-ink);
}
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: var(--color-muted);
}

.contact-form .btn { align-self: flex-start; }
.contact-form .btn:disabled { opacity: 0.5; cursor: default; }

.form-status {
  font-size: 12px;
  margin: -6px 0 0;
  color: var(--color-muted);
}
.form-status.success { color: var(--color-ink); }
.form-status.error { color: var(--color-muted); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }
}

/* ---------- Gallery page ---------- */
.page-header {
  text-align: center;
  padding: calc(var(--nav-height) + 64px) 24px 24px;
  animation: hero-in 0.5s var(--ease) both;
}
.page-header .section-heading { margin: 0 auto 16px; }
.page-header .body-text { max-width: 480px; margin: 0 auto 28px; }

.section-inner--gallery { max-width: 1720px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--element-gap);
}

.gallery-tile {
  appearance: none;
  font: inherit;
  text-align: left;
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-canvas);
  cursor: zoom-in;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s ease;
}
.gallery-tile:hover { border-color: var(--color-border-soft); }

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 1;
  transition: transform 0.4s var(--ease);
}
.gallery-tile:hover img { transform: scale(1.03); }

.gallery-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f4f4f2;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-tile:hover .gallery-meta { opacity: 1; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
}

.lightbox-info {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bcbcbc;
}
.lightbox-info span:first-child {
  color: #f4f4f2;
}
.lightbox-info span:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #555555;
  margin-left: 14px;
  vertical-align: middle;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-full);
  background: transparent;
  color: #f4f4f2;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.lightbox-close:hover { border-color: #f4f4f2; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-full);
  background: transparent;
  color: #f4f4f2;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.lightbox-nav:hover { border-color: #f4f4f2; background: rgba(255, 255, 255, 0.06); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

@media (max-width: 1200px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: 24px;
  text-align: center;
}
.footer p {
  font-size: var(--text-caption);
  color: var(--color-muted-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  :root { --section-gap: 72px; }
}

@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--color-canvas);
    border-bottom: 1px solid var(--color-border-subtle);
    flex-direction: column;
    padding: 12px 24px 24px;
    gap: 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  .section-heading { font-size: 16px; }
  :root { --section-gap: 56px; }

  .role-row-head { display: none; }
  .role-row {
    grid-template-columns: 64px 1fr 16px;
    grid-template-areas: "logo title arrow" "logo org arrow";
  }
  .role-logo { grid-area: logo; width: 64px; height: 64px; }
  .role-title { grid-area: title; font-size: 15px; }
  .role-org { grid-area: org; font-size: 13px; margin-top: 2px; }
  .role-arrow { grid-area: arrow; margin-top: 4px; }
}
