:root {
  /* Paleta: Italian Roast #211112 · Cosy Coverlet #EFCCAF · Cafe Royale #6B4928
     Tudor Tan #B6885F · Minesweeper's Purple #9B1EAC · Clairvoyant #4C0657
     (os tons extras são clareamentos/escurecimentos dessas mesmas cores) */
  --bg: #fbf4ee;          /* Cosy Coverlet bem claro */
  --surface: #fffaf6;
  --surface-2: #f5e6d8;   /* Cosy Coverlet claro */
  --border: #e8d2bd;
  --text: #211112;        /* Italian Roast */
  --muted: #6b4928;       /* Cafe Royale */
  --accent: #9b1eac;      /* Minesweeper's Purple */
  --accent-2: #6b4928;    /* Cafe Royale */
  --accent-ink: #fffaf6;
  --tag-bg: #f4e3f6;      /* Purple bem claro */
  --tag-ink: #4c0657;     /* Clairvoyant */
  --grad-a: #9b1eac;
  --grad-b: #b6885f;      /* Tudor Tan */
  --shadow: 0 1px 2px rgba(33, 17, 18, .06), 0 12px 32px -12px rgba(76, 6, 87, .22);
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #170b0c; --surface: #211112; --surface-2: #2b1719; --border: #3d2427;
    --text: #efccaf; --muted: #b6885f; --accent: #c65bd6; --accent-2: #b6885f; --accent-ink: #efccaf;
    --tag-bg: #4c0657; --tag-ink: #efccaf; --grad-a: #c65bd6; --grad-b: #efccaf;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 32px -12px rgba(155, 30, 172, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #170b0c; --surface: #211112; --surface-2: #2b1719; --border: #3d2427;
  --text: #efccaf; --muted: #b6885f; --accent: #c65bd6; --accent-2: #b6885f; --accent-ink: #efccaf;
  --tag-bg: #4c0657; --tag-ink: #efccaf; --grad-a: #c65bd6; --grad-b: #efccaf;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 32px -12px rgba(155, 30, 172, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: #9b1eac; color: #fffaf6; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* navegação */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-weight: 800; font-size: 1.3rem; text-decoration: none; color: var(--text); letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav nav a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 8px; }
.lang, .theme { height: 36px; min-width: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 .8rem var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
@media (max-width: 720px) { .nav nav { display: none; } .nav-actions { margin-left: auto; } }

/* hero */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding: 72px 0 56px; }
.eyebrow { color: var(--accent-2); font-weight: 600; margin: 0; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -.03em; margin: 6px 0 8px; }
.role { font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 600; margin: 0 0 18px; background: linear-gradient(90deg, var(--grad-a), var(--grad-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 60ch; margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.cta.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: #9b1eac; border-color: #9b1eac; color: #fffaf6; }
.btn.primary:hover { background: #4c0657; border-color: #4c0657; }
.social { list-style: none; padding: 0; margin: 28px 0 0; display: flex; gap: 18px; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; }
.social a:hover { color: var(--text); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.hero-photo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.photo-frame { position: relative; width: min(320px, 70vw); aspect-ratio: 1; border-radius: 32px; padding: 6px; background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); box-shadow: var(--shadow); }
.photo-frame img, .photo-frame .initials { width: 100%; height: 100%; border-radius: 26px; object-fit: cover; }
.photo-frame .initials { display: none; place-items: center; background: var(--surface); font-size: 5rem; font-weight: 800; color: var(--accent); letter-spacing: -.04em; }
.photo-frame:not(:has(img)) .initials { display: grid; }
.location { color: var(--muted); font-size: .92rem; margin: 0; text-align: center; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 32px; }
  .hero-photo { order: -1; }
  .photo-frame { width: 180px; }
}

/* seções */
.section { padding: 56px 0; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.02em; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 28px; }

/* projetos */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) { .projects { grid-template-columns: 1fr; } }
.project { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s ease; }
.project:hover { transform: translateY(-3px); }
.shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.project:hover .shot img { transform: scale(1.03); }
.sacd-art { width: 100%; height: 100%; position: relative; background: radial-gradient(circle at 30% 40%, #3a1d20, #211112); color: #b6885f; }
.sacd-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sacd-art span { position: absolute; left: 22px; bottom: 16px; font-weight: 800; font-size: 1.6rem; color: #efccaf; letter-spacing: .04em; }
.project-body { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project h3 { margin: 0; font-size: 1.25rem; }
.project h3 small { color: var(--muted); font-weight: 500; font-size: .85rem; }
.project p { margin: 0; color: var(--muted); }
.highlights { margin: 0; padding-left: 18px; color: var(--text); font-size: .93rem; }
.highlights li::marker { color: var(--accent-2); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.tags li { font: 500 .76rem var(--mono); background: var(--tag-bg); color: var(--tag-ink); padding: 4px 9px; border-radius: 999px; }
.links { display: flex; gap: 16px; margin-top: auto; padding-top: 6px; }
.links a { font-weight: 600; text-decoration: none; }
.links a::after { content: " →"; }
.links a:hover { text-decoration: underline; }
.links .demo { color: var(--accent-2); }

/* experiência */
.timeline { list-style: none; padding: 0; margin: 24px 0 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 28px 26px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.timeline li.edu::before { background: var(--accent-2); }
.timeline .when { font: 500 .8rem var(--mono); color: var(--muted); }
.timeline h3 { margin: 2px 0 0; font-size: 1.1rem; }
.timeline .where { margin: 0 0 6px; color: var(--accent); font-weight: 500; }
.timeline p { margin: 0; color: var(--muted); max-width: 70ch; }

/* tecnologias */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 24px; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.skill-group h3 { margin: 0 0 12px; font-size: 1rem; }

/* contato */
.contact { text-align: center; }
.contact p { color: var(--muted); max-width: 56ch; margin: 8px auto 24px; }

.footer { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: .88rem; text-align: center; }

/* ===== Aviso de cookies (LGPD) ===== */
.consent { position: fixed; z-index: 100; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 16px 20px; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 320px; font-size: .95rem; }
.consent-actions { display: flex; gap: 8px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.link[hidden] { display: none; }
