/* ============================================================
   Pedro H. N. Oliveira — Portfolio
   Single editorial direction; dark / light via [data-mode].
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--accent); color: var(--bg); }

/* ============================================================
   THEME TOKENS — light default, dark on [data-mode="dark"]
   ============================================================ */
:root {
  --accent: #7e8b42;
  --accent-ink: #ffffff;
  --maxw: 1180px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 3px;
  --reveal-y: 22px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Light mode */
  --bg: #f4f1ea;
  --bg-2: #ece8df;
  --surface: #fbf9f4;
  --surface-2: #f1ede4;
  --border: rgba(24,20,15,.13);
  --border-strong: rgba(24,20,15,.30);
  --text: #16140f;
  --text-2: #4c473d;
  --muted: #8b8475;
}

[data-mode="dark"] {
  --bg: #15130e;
  --bg-2: #1b1812;
  --surface: #201d15;
  --surface-2: #262218;
  --border: rgba(240,236,226,.14);
  --border-strong: rgba(240,236,226,.30);
  --text: #f1ece1;
  --text-2: #b9b1a0;
  --muted: #877f6e;
}

/* ============================================================
   BASE
   ============================================================ */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}

/* Background motif (fixed) */
.bg-motif {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 26%, transparent) .6px, transparent .6px);
  background-size: 4px 4px;
  opacity: .5;
}

/* Glow accent in corner */
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none;
  top: -10%; right: -5%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%);
  filter: blur(20px);
  opacity: .55;
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); position: relative; z-index: 1; }
.section { padding-block: clamp(64px, 11vh, 130px); position: relative; z-index: 1; }
.section--alt { background: var(--bg-2); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}

.section-head { margin-bottom: clamp(34px, 5vw, 58px); }
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 6.2vw, 72px);
  line-height: 1.04;
  letter-spacing: .002em;
  margin: 16px 0 0;
  text-wrap: balance;
}
.section-sub { color: var(--text-2); max-width: 56ch; margin-top: 16px; font-size: 16.5px; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gut);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-mono); font-weight: 600; font-size: 14px; letter-spacing: .04em; }
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em;
  color: var(--text-2); padding: 7px 12px; border-radius: var(--radius);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-right { display: flex; align-items: center; gap: 10px; }

.lang {
  display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px;
  overflow: hidden; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
}
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  padding: 6px 11px; cursor: pointer; letter-spacing: .06em; transition: .2s;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

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

/* ---- Mode toggle ---- */
.mode-toggle {
  appearance: none; border: none; background: transparent;
  color: var(--text-2); cursor: pointer; padding: 7px;
  border-radius: var(--radius); transition: color .2s, background .2s;
  display: flex; align-items: center; justify-content: center;
}
.mode-toggle:hover { color: var(--accent); background: var(--surface-2); }
.mode-toggle svg { width: 18px; height: 18px; }
.ic-moon { display: none; }
[data-mode="light"] .ic-sun  { display: none; }
[data-mode="light"] .ic-moon { display: block; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: clamp(120px, 18vh, 190px); padding-bottom: clamp(60px, 9vh, 110px); }
.hero-grid {
  display: grid; grid-template-columns: 1.45fr .85fr; gap: clamp(28px, 5vw, 70px);
  align-items: center;
}
.hero-spec {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 22px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
}
.hero-spec span + span::before {
  content: "|"; padding: 0 14px; color: var(--border-strong);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(46px, 10vw, 120px); line-height: .98; letter-spacing: 0;
  margin: 0 0 6px;
}
.hero h1 .accent { color: var(--accent); }
.hero-role {
  font-family: var(--font-mono); font-size: clamp(14px, 1.5vw, 17px);
  color: var(--text-2); margin: 18px 0 0; letter-spacing: .01em;
}
.hero-role .sep { color: var(--accent); padding: 0 8px; }
.hero-lede { color: var(--text-2); font-size: 17.5px; max-width: 48ch; margin: 24px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .02em;
  padding: 12px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  transition: transform .15s, background .2s, border-color .2s, color .2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--primary:hover { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 86%, #fff); }

/* portrait */
.hero-photo { position: relative; }
.hero-photo .frame {
  position: relative; border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 9px; background: var(--surface);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.6);
}
.hero-photo img { width: 100%; border-radius: calc(var(--radius) - 1px); display: block; aspect-ratio: 3/4; object-fit: cover; object-position: 50% 18%; }
.hero-photo .tag {
  position: absolute; left: -10px; bottom: 26px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink); padding: 6px 12px; border-radius: var(--radius);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.5);
}
.hero-photo .corner { position: absolute; width: 16px; height: 16px; border: 1.5px solid var(--accent); opacity: .8; }
.hero-photo .corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero-photo .corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 320px; }
}

/* ============================================================
   FEATURED WORK
   ============================================================ */
.featured { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
.fcard {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(22px, 3.5vw, 50px);
  align-items: center;
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  background: var(--surface); padding: clamp(22px, 3vw, 40px);
  position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s;
}
.fcard:hover { border-color: var(--border-strong); }
.fcard:nth-child(even) { grid-template-columns: 1fr 1.05fr; }
.fcard:nth-child(even) .fcard-media { order: -1; }
.fcard-index { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: .12em; }
.fcard h3 {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0; margin: 12px 0 0; line-height: 1.05;
}
.fcard-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: .04em; }
.fcard p { color: var(--text-2); margin: 16px 0 0; font-size: 15.5px; }
.fcard-highlights { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 7px; }
.fcard-highlights li { font-size: 14px; color: var(--text-2); padding-left: 20px; position: relative; }
.fcard-highlights li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); font-size: 11px; top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.tag-chip {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--text-2); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 999px; background: var(--surface-2);
}

/* fcard: dot-separated plain text instead of pills */
.fcard .tags { gap: 0; margin-top: 16px; }
.fcard .tag-chip {
  border: none; background: none; border-radius: 0; padding: 0;
  color: var(--muted); font-size: 12px;
}
.fcard .tag-chip + .tag-chip::before { content: " · "; }
.fcard-links { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.flink {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 7px; letter-spacing: .02em;
  transition: color .2s, gap .2s;
}
.flink:hover { color: var(--accent); gap: 11px; }
.flink svg { width: 14px; height: 14px; }
/* Stretch link — makes the whole card clickable via the .fcard-link anchor */
.fcard-link {
  position: absolute; inset: 0; z-index: 0;
  border-radius: inherit;
}
.fcard-links { position: relative; z-index: 1; }

.fcard-media { position: relative; z-index: 1; }

/* ---- Device mockup ---- */
.device-wrap {
  display: flex; align-items: center; gap: 10px;
}
/* Even fcards: flip so phone stays on the outer edge */
.fcard:nth-child(even) .device-wrap { flex-direction: row-reverse; }

.device-laptop { flex: 1; min-width: 0; }

.device-laptop-lid {
  background: var(--bg-2);
  border: 1.5px solid var(--border-strong);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 5px 5px 0;
  aspect-ratio: 16/10;
  overflow: hidden;
  box-shadow: 0 16px 48px -10px rgba(0,0,0,.5);
}
.device-laptop-lid img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: top;
  border-radius: 2px 2px 0 0;
}

.device-laptop-base {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 0 0 4px 4px;
  height: 10px; margin: 0 -6px;
  display: flex; justify-content: center;
}
.device-laptop-base::after {
  content: ""; align-self: flex-end;
  width: 22%; height: 3px;
  background: var(--border-strong);
  border-radius: 3px 3px 0 0;
}

.device-phone {
  width: 21%; flex-shrink: 0;
  aspect-ratio: 9/19;
  background: var(--bg-2);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 16px 40px -8px rgba(0,0,0,.5);
  padding: 10px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.device-phone::before {
  content: ""; flex-shrink: 0;
  width: 24%; height: 3px;
  background: var(--border-strong);
  border-radius: 999px;
}
.device-phone-screen {
  flex: 1; width: 100%;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}
.device-phone-screen img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: top;
}

@media (max-width: 760px) {
  .fcard, .fcard:nth-child(even) { grid-template-columns: 1fr; }
  .fcard:nth-child(even) .fcard-media { order: 0; }
}

/* ============================================================
   PROJECT GRID (lab)
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.filter {
  appearance: none; cursor: pointer; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--text-2); border: 1px solid var(--border); background: var(--surface);
  padding: 7px 14px; border-radius: 999px; transition: .2s;
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pcard {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 2px);
  background: var(--surface); padding: 22px;
  transition: transform .25s, border-color .25s;
  position: relative; min-height: 168px;
}
.pcard:hover { transform: translateY(-4px); border-color: var(--accent); }
.pcard.is-hidden { display: none; }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard-kind { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pcard-arrow { color: var(--muted); transition: .2s; }
.pcard:hover .pcard-arrow { color: var(--accent); transform: translate(3px,-3px); }
.pcard h4 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin: 0; }
.pcard p { color: var(--text-2); font-size: 14px; margin: 0; flex: 1; }
.pcard .tags { margin-top: 4px; }

/* ============================================================
   PHOTOGRAPHY
   ============================================================ */
.photo-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.photo-preview {
  columns: 3; column-gap: 10px;
  margin-top: 32px;
}
.photo-preview img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius);
  margin-bottom: 10px;
  break-inside: avoid;
}
@media (max-width: 720px) { .photo-preview { columns: 2; } }
@media (max-width: 480px) { .photo-preview { columns: 1; } }
.photo-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px;
  gap: 12px; margin-top: 40px;
}
.photo-grid image-slot {
  width: 100%; height: 100%; display: block; border-radius: var(--radius);
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent);
}
.photo-grid img {
  width: 100%; height: 100%; display: block;
  border-radius: var(--radius); object-fit: cover;
}
.photo-grid .ph-tall { grid-row: span 2; }
.photo-grid .ph-wide { grid-column: span 2; }
@media (max-width: 720px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid .ph-wide { grid-column: span 2; }
}

/* ============================================================
   PHOTOGRAPHY WORK
   ============================================================ */
.photo-work {
  border-top: 1px solid var(--border);
  padding-top: clamp(40px, 6vw, 72px);
  margin-top: clamp(48px, 7vw, 88px);
}
.photo-work-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 40px);
  font-weight: 400; letter-spacing: .002em;
  margin: 12px 0 0; line-height: 1.1;
}
.photo-work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  grid-auto-flow: row dense;
  gap: 12px; margin-top: 32px;
}
.photo-work-grid image-slot {
  width: 100%; height: 100%; display: block;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent);
}
.photo-work-grid .pw-wide { grid-column: span 2; }
.photo-work-grid .pw-tall { grid-row: span 2; }
.photo-work-grid .photo-work-extra { display: none; }
.photo-work-grid .pw-in {
  display: block;
  animation: pwFadeUp .5s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes pwFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.photo-work-footer { display: flex; justify-content: center; margin-top: 32px; }
.photo-work-footer .btn svg { width: 14px; height: 14px; transition: transform .3s; }
.photo-work-footer .btn.is-expanded svg { transform: rotate(180deg); }
@media (max-width: 720px) {
  .photo-work-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-work-grid .pw-wide { grid-column: span 2; }
}

/* ============================================================
   PHOTO ALBUMS
   ============================================================ */
.photo-album {
  border-top: 1px solid var(--border);
  padding-top: clamp(40px, 6vw, 64px);
  margin-top: clamp(48px, 7vw, 88px);
}
.photo-album .photo-grid { margin-top: 32px; }
.photo-album-head { margin-bottom: 4px; }
.photo-album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 12px;
  margin-top: 32px;
}
.photo-album-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
  transition: opacity .2s;
  display: block;
}
.photo-album-grid img:hover { opacity: .85; }
.photo-album-grid .album-extra { display: none; }
.photo-album-grid .album-in {
  display: block;
  animation: pwFadeUp .5s cubic-bezier(.22,.61,.36,1) both;
}
@media (max-width: 720px) {
  .photo-album-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
}

/* ============================================================
   SCATTER GALLERY
   ============================================================ */
.scatter-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  padding: 8px 0 24px;
}
.scatter-grid img {
  width: 160px;
  height: 200px;
  object-fit: contain;
  background: #fff;
  box-shadow: 2px 4px 14px rgba(0,0,0,.18);
  border-radius: 2px;
  cursor: zoom-in;
  position: relative;
  z-index: 0;
  transform: rotate(var(--r, 0deg));
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s;
}
.scatter-grid img:nth-child(7n+1) { --r: -3deg; }
.scatter-grid img:nth-child(7n+2) { --r:  2.5deg; }
.scatter-grid img:nth-child(7n+3) { --r: -1.5deg; }
.scatter-grid img:nth-child(7n+4) { --r:  4deg; }
.scatter-grid img:nth-child(7n+5) { --r: -2deg; }
.scatter-grid img:nth-child(7n+6) { --r:  1.5deg; }
.scatter-grid img:nth-child(7n+0) { --r: -3.5deg; }
.scatter-grid img:hover {
  transform: rotate(0deg) scale(1.08) translateY(-8px);
  box-shadow: 6px 14px 36px rgba(0,0,0,.28);
  z-index: 10;
}
.scatter-grid .album-extra { display: none; }
.scatter-grid .album-in {
  display: block;
  animation: pwFadeUp .5s cubic-bezier(.22,.61,.36,1) both;
}
@media (max-width: 720px) {
  .scatter-grid img { width: 120px; height: 150px; gap: 10px; }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center;
}
#lightbox[hidden] { display: none; }
#lb-img {
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  object-fit: contain;
  display: block;
  border-radius: 2px;
  user-select: none;
}
#lb-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: .7; transition: opacity .15s;
}
#lb-close:hover { opacity: 1; }
#lb-prev, #lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff;
  font-size: 32px; line-height: 1; cursor: pointer;
  padding: 12px 18px; border-radius: var(--radius);
  opacity: .6; transition: opacity .15s, background .15s;
  user-select: none;
}
#lb-prev:hover, #lb-next:hover { opacity: 1; background: rgba(255,255,255,.2); }
#lb-prev { left: 20px; }
#lb-next { right: 20px; }
#lb-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.45); font-size: 12px;
  font-family: var(--font-mono); letter-spacing: .06em;
  pointer-events: none; margin: 0;
}
@media (max-width: 600px) {
  #lb-prev { left: 6px; padding: 10px 14px; }
  #lb-next { right: 6px; padding: 10px 14px; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-photo { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 8px; background: var(--surface); }
.about-photo img { width: 100%; border-radius: calc(var(--radius) - 1px); aspect-ratio: 3/4; object-fit: cover; object-position: 50% 15%; }
.about-body p { font-size: 17px; color: var(--text-2); max-width: 60ch; }
.about-body p .hl { color: var(--text); font-weight: 500; }
.stack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 40px; margin-top: 40px; }
.stack-block h5 {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.stack-block ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stack-block li { font-size: 14.5px; color: var(--text-2); display: flex; gap: 9px; }
.stack-block li::before { content: "—"; color: var(--muted); }
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; }
  .stack-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact {
  text-align: center;
  min-height: 100vh;
  padding-block: 0;
  display: flex;
  flex-direction: column;
}
.contact > .wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.contact-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* padding-top desconta a nav (~56px) + espaço extra */
  padding-top: calc(56px + clamp(32px, 5vh, 64px));
  padding-bottom: clamp(32px, 5vh, 64px);
}
.contact .foot { margin-top: 0; }
.contact h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(38px, 8vw, 96px); letter-spacing: 0; line-height: 1; margin: 18px 0 0;
}
.contact .email {
  display: inline-block; margin-top: 28px; font-family: var(--font-mono);
  font-size: clamp(15px, 2.5vw, 22px); color: var(--accent);
  border-bottom: 1px solid var(--accent); padding-bottom: 4px;
}
.contact .email:hover { opacity: .8; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.foot {
  margin-top: clamp(60px, 9vh, 110px); border-top: 1px solid var(--border);
  padding: 26px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.foot, .foot a { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.foot a:hover { color: var(--accent); }
.foot .quote { font-style: italic; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
html.reveal-on .reveal { opacity: 0; transform: translateY(var(--reveal-y)); }
html.reveal-on .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  html.reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  .brand .dot { animation: none; }
}

/* lang swap helper */
[data-lang-hide] { display: none !important; }
