:root {
  --bg: #FAF7F2;
  --surface: #F4EDE5;
  --ink: #4B342D;
  --muted: #8a6f63;
  --line: #D8C4B6;
  --accent: #7A3E48;
  --max: 1180px;
  --nav-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;          /* 17px base — textos maiores */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Background: imagem repetida em tile com transparência sutil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .20;
  background-image: url("dc6a043a-3dca-4155-8cbf-95eb48cc4c2e.png");
  background-repeat: repeat;
  background-size: 280px auto;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; line-height: 1.1; }

a { color: inherit; text-decoration: none; }

img { display: block; }

/* offset para o header fixo não cobrir o alvo ao clicar no menu */
.hero, .section, .footer { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.3rem; letter-spacing: .2px; }
.nav-links { display: flex; gap: clamp(16px, 2.5vw, 34px); }
.nav-links a { font-size: .92rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .25s, opacity .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Skeleton loading ---------- */
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
.img-loading {
  background: linear-gradient(90deg, var(--surface) 25%, var(--line) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite ease-in-out;
}
.img-loading img { opacity: 0; }

/* ---------- Animações de entrada ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.hero-name { animation: fadeUp .75s ease both; }
.hero-tags { animation: fadeUp .75s .25s ease both; }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(70px, 13vw, 150px) clamp(20px, 5vw, 64px) clamp(50px, 9vw, 110px);
}
.hero-eyebrow {
  font-size: .92rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.hero-name {
  font-size: clamp(2.6rem, 7.5vw, 6rem);
  letter-spacing: -.015em;
  margin-bottom: 32px;
}
.hero-tagline {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  max-width: 640px;
  color: var(--muted);
  margin-bottom: 36px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(.85rem, 1.1vw, 1rem);
  letter-spacing: .02em;
}
.hero-tags span { white-space: nowrap; }
.hero-tags span:not(:last-child)::after {
  content: "·";
  color: var(--accent);
  margin: 0 12px;
  opacity: .6;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(50px, 8vw, 95px) clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 44px; }
.section-num { font-size: .9rem; color: var(--accent); letter-spacing: .1em; padding-top: 4px; }
.section-head h2 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); letter-spacing: -.01em; }
.section-intro { color: var(--muted); font-size: 1.05rem; }
.proj-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-bottom: 48px;
}
.proj-header .section-head { margin-bottom: 0; }
.proj-header .section-intro { padding-top: 14px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: clamp(100px, 15%, 180px) 1fr;
  column-gap: clamp(32px, 5vw, 64px);
  row-gap: 0;
  align-items: stretch;
}
.about-photo-col { display: flex; flex-direction: column; }
.about-photo {
  width: 100%;
  flex: 1;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.about-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 20%;
  mix-blend-mode: multiply;
}
.about-photo-name { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-top: 14px; }
.about-photo-role { font-size: .85rem; color: var(--muted); letter-spacing: .02em; margin-top: 4px; }
.about-text-col { display: flex; flex-direction: column; }
.about-section-head { margin-bottom: 28px; }
.about-lead {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.32;
  color: var(--ink);
}
.about-body {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
}
.about-body p { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.about-meta-col {
  display: flex;
  flex-direction: row;
  gap: clamp(24px, 4vw, 48px);
  margin-top: 40px;
}
.about-meta-group { flex: 1; }
.about-meta-title {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.about-facts { list-style: none; border-top: 1px solid var(--line); }
.about-facts li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: .93rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.about-facts strong { color: var(--ink); font-weight: 600; font-size: .93rem; }
.about-facts span { font-size: .85rem; opacity: .85; }

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.timeline::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.timeline li {
  position: relative;
  padding-top: 28px;
  padding-right: 16px;
  background: none;
  border: none;
  min-height: auto;
  text-align: left;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.timeline li:last-child { padding-right: 0; }
.timeline li:nth-child(odd)  { align-self: unset; }
.timeline li:nth-child(even) { align-self: unset; }
.timeline li.tl-visible {
  opacity: 1;
  transform: translateY(0) !important;
}
.timeline li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
}
.timeline li:nth-child(odd)::after  { left: 0; right: auto; }
.timeline li:nth-child(even)::after { left: 0; right: auto; }
.tl-period {
  display: block;
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.tl-role {
  font-size: clamp(.88rem, 1.1vw, 1rem);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 6px;
}
.tl-company { font-size: .82rem; color: var(--muted); line-height: 1.4; }

/* ---------- Projetos — grade de empresas ---------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.proj-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.proj-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .4s ease, transform .5s ease, filter .35s ease;
}
.proj-card__label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px;
  background: linear-gradient(transparent, rgba(43, 29, 24, .72));
  color: #fff;
  transition: opacity .3s ease;
}
.proj-card__label .t { display: block; font-family: 'Playfair Display', serif; font-size: 1.25rem; line-height: 1.1; }
.proj-card__label .m { display: block; font-size: .82rem; opacity: .85; margin-top: 2px; }
.proj-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 29, 24, .28);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .3s ease;
}
.proj-card__btn {
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bg);
  border: none;
  padding: 12px 26px;
  border-radius: 100px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.proj-card__btn:hover { transform: translateY(-2px); background: #fff; }

@media (hover: hover) {
  .proj-card:hover img { transform: scale(1.05); }
  .proj-card:hover .proj-card__overlay { opacity: 1; }
  .proj-card:hover .proj-card__label { opacity: 0; }
}
.proj-card.active { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Galeria expansível (foto em destaque + miniaturas) */
.proj-gallery {
  display: none;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.proj-gallery.open { display: block; animation: galFade .35s ease; }
@keyframes galFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.gal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.gal-title { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.gal-close {
  font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: none; border: none; cursor: pointer; padding: 6px;
}
.gal-close:hover { color: var(--accent); }

/* Sanfona horizontal (estilo Gallery 8 — painéis que expandem no hover) */
.gal-accordion {
  display: flex;
  gap: 10px;
  height: clamp(300px, 58vh, 580px);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.gal-panel {
  position: relative;
  flex: 0 0 auto;
  width: 92px;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: zoom-in;
  transition: width .55s cubic-bezier(.22, .61, .36, 1);
}
.gal-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .4s ease, transform .6s ease;
}
.gal-panel.active { width: min(62vw, 640px); }

@media (hover: hover) {
  .gal-accordion:hover .gal-panel { width: 92px; }
  .gal-accordion:hover .gal-panel:hover { width: min(62vw, 640px); }
  .gal-panel:hover img { transform: scale(1.04); }
}

.gal-panel__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 18px;
  background: linear-gradient(transparent, rgba(43, 29, 24, .72));
  color: #fff;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  white-space: nowrap;
}
.gal-panel.active .gal-panel__cap { opacity: 1; }
@media (hover: hover) {
  .gal-accordion:hover .gal-panel.active .gal-panel__cap { opacity: 0; }
  .gal-accordion .gal-panel:hover .gal-panel__cap { opacity: 1; }
}
.gal-panel__cap .t { display: block; font-family: 'Playfair Display', serif; font-size: 1.15rem; line-height: 1.1; }
.gal-panel__cap .m { display: block; font-size: .8rem; opacity: .85; margin-top: 2px; }

.gal-accordion::-webkit-scrollbar { height: 8px; }
.gal-accordion::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.gal-accordion::-webkit-scrollbar-track { background: transparent; }

/* ---------- Skills — itens em linha com bullet separador ---------- */
.skills-grid { display: block; }
.skills-grid--tools {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.skills-tools-head { margin-bottom: 32px; }
.skills-col h3 {
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--accent);
}
.skills-col ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.skills-col li {
  padding: 6px 14px;
  font-size: clamp(.8rem, 1vw, .95rem);
  line-height: 1.4;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .2s, color .2s;
}
.skills-col li:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 110px) clamp(20px, 5vw, 64px) 70px;
  border-top: 1px solid var(--line);
}
.footer-lead { font-family: 'Playfair Display', serif; font-size: clamp(1.9rem, 4.5vw, 3.2rem); line-height: 1.15; margin-bottom: 34px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: 50px; }
.footer-links a { font-size: 1.1rem; border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color .2s; }
.footer-links a:hover { border-color: var(--accent); color: var(--accent); }
.footer-credit { font-size: .88rem; color: var(--muted); letter-spacing: .02em; }

/* ---------- Lightbox (zoom) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(43, 29, 24, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lb-img { max-width: 90vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); transition: opacity .25s ease; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: .8;
  transition: opacity .2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: 22px; right: 30px; font-size: 2.4rem; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 2rem; padding: 16px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .85rem; opacity: .7; letter-spacing: .1em; }

/* ---------- Telas grandes (ultrawide) ---------- */
@media (min-width: 1700px) {
  :root { --max: 1380px; }
  body { font-size: 1.18rem; }
  .proj-grid { grid-template-columns: repeat(5, 1fr); }
  .proj-grid { gap: 24px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: clamp(220px, 38%, 320px) 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  body { font-size: 1.05rem; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(250, 247, 242, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 60vh; }
  .nav-links a { padding: 16px clamp(20px, 5vw, 64px); border-top: 1px solid var(--line); font-size: 1rem; }

  /* alinhamento central no mobile */
  .hero { text-align: center; }
  .hero-tags { justify-content: center; }
  .section-head { justify-content: center; text-align: center; }
  .section-intro { margin-left: auto; margin-right: auto; text-align: center; }
  .proj-header { grid-template-columns: 1fr; gap: 16px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; margin: 0 auto; }
  .about-photo-col { align-items: center; text-align: center; }
  .about-body { grid-template-columns: 1fr; }
  .about-meta-col { gap: 16px; }
  .about-meta-group { flex: 1 1 120px; }
  .skills-col ul { justify-content: center; }
  .skills-col h3 { text-align: center; }

  .timeline {
    grid-template-columns: 1fr;
    padding-left: 28px;
  }
  .timeline::before { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; }
  .timeline li {
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 32px;
    transform: translateX(-16px);
  }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline li::after,
  .timeline li:nth-child(odd)::after,
  .timeline li:nth-child(even)::after { top: 0; left: -28px; }

  .proj-grid { grid-template-columns: 1fr; }
  /* sem hover no touch: overlay/botão sempre visível */
  .proj-card__overlay { opacity: 1; background: rgba(43, 29, 24, .12); backdrop-filter: none; align-items: flex-start; justify-content: flex-end; padding: 12px; }
  .proj-card__btn { padding: 9px 18px; font-size: .76rem; }

  .gal-accordion { height: clamp(300px, 78vw, 460px); gap: 8px; }
  .gal-panel { width: 76px; border-radius: 14px; cursor: pointer; }
  .gal-panel.active { width: 82vw; }
  .gal-panel__cap { padding: 14px 16px; }
  .gal-panel__cap .t { font-size: 1rem; }
  /* dica de toque: fatias fechadas ganham um leve escurecido pra indicar que abrem */
  .gal-panel:not(.active)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(43, 29, 24, .12);
    transition: opacity .35s ease;
  }
  .gal-panel.active::after { opacity: 0; }
}
