@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500&display=swap');

/* ---------------------------------------------------------
   Rafaela Freitas — portfólio
   Estrutura fiel ao Cargo: coluna esquerda fixa (menu),
   coluna direita com todos os projetos em scroll contínuo.
   Um único tamanho de texto para tudo; hierarquia pelo tamanho.
--------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --text: #000000;        /* texto principal */
  --accent: #000000;      /* acento — hoje igual ao texto */
  --fs: 20.4px;           /* tamanho único, igual ao Cargo */
  --fs-sm: 11.5px;        /* legendas e textos longos */
  --radius: 8px;
  --edge: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--fs);
  font-weight: 500;
  line-height: 1.15;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
em { font-style: italic; }

/* ---------- Coluna esquerda fixa ---------- */

.nav {
  position: fixed;
  top: var(--edge);
  left: var(--edge);
  width: calc(50% - var(--edge));
  z-index: 10;
}

.nav .name { margin-bottom: 26px; }
.nav .name a {
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.nav .name .sparkle {
  margin-top: 6px;
  font-size: 1.15em;
  letter-spacing: 0.22em;
  line-height: 1;
}

.nav .links { margin-bottom: 26px; }
.nav .links a,
.nav .links span { display: block; }

.nav .selected-label {
  color: var(--accent);
  margin-bottom: 4px;
}

.nav ol {
  list-style: none;
  counter-reset: item;
  margin: 0;
  padding: 0;
}

.nav ol li { counter-increment: item; }

.nav ol li a {
  display: block;
  position: relative;
  padding: 2px 0 2px 52px;
}

.nav ol li a::before {
  content: counter(item) ".";
  position: absolute;
  left: 22px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.nav ol li a.active,
.nav ol li a.active::before { color: var(--accent); }

.site-footer {
  position: fixed;
  bottom: var(--edge);
  left: var(--edge);
  color: var(--accent);
  z-index: 10;
}

/* ---------- Coluna direita: projetos em scroll ---------- */

.stack {
  margin-left: 50%;
  padding: var(--edge) var(--edge) 180px 0;
}

.project { margin-bottom: 120px; }
.project:last-child { margin-bottom: 0; }

.project > .title { margin-bottom: 24px; }

.project > .meta { margin-bottom: 26px; }
.project > .meta em { color: var(--accent); }

/* legendas de subseção (01, 02, 03) */
.step { margin: 34px 0 12px; }

/* ---------- Imagens ---------- */

.media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.media img,
.media video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  background: #f2f4f6;
  cursor: zoom-in;
}

.media video { cursor: default; }

/* linhas de 2 e de 3 */
.media.two img { width: calc(50% - 4px); }
.media.three img { width: calc(33.333% - 6px); }

/* uma imagem por vez, em coluna, com respiro entre elas */
.media.stacked { flex-direction: column; gap: 20px; }
.media.stacked img { width: 100%; }

/* ---------- Rodapé de cada projeto ---------- */

.project-foot {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 40px;
  font-size: var(--fs-sm);
  line-height: 1.45;
  font-weight: 400;
}

.project-foot .credit { color: var(--accent); }
.project-foot .desc { white-space: pre-line; }

/* ---------- About (overlay) ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  overflow-y: auto;
  padding: var(--edge);
  display: none;
}
.overlay.open { display: block; }

.overlay .close {
  position: fixed;
  top: var(--edge);
  right: var(--edge);
  color: var(--accent);
  cursor: pointer;
}

.overlay .inner { max-width: 640px; }
.overlay h1 { font-size: var(--fs); font-weight: 500; margin: 0 0 26px; }
.overlay .bio { margin-bottom: 34px; }

.about-block { margin-bottom: 26px; }
.about-block h2 {
  font-size: var(--fs);
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 8px;
}
.about-block ul { list-style: none; margin: 0; padding: 0; }
.about-block li { margin-bottom: 10px; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 100;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  :root { --fs: 18px; }

  /* empilha na ordem certa: menu, projetos, rodapé */
  body { display: flex; flex-direction: column; }

  .nav {
    position: static;
    width: auto;
    padding: var(--edge) var(--edge) 0;
    order: 1;
  }

  .stack {
    margin-left: 0;
    padding: 44px var(--edge) 0;
    order: 2;
  }

  .site-footer {
    position: static;
    padding: 56px var(--edge) 40px;
    order: 3;
  }

  .project { margin-bottom: 72px; }
  .media.two img, .media.three img { width: 100%; }
  .media.stacked { gap: 12px; }
  .project-foot { grid-template-columns: 1fr; gap: 18px; }
}
