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

:root {
  --bg:       #111113;
  --surface:  #18181b;
  --surface2: #222226;
  --border:   rgba(255,255,255,0.08);
  --border2:  rgba(255,255,255,0.14);
  --text:     #f2f2ef;
  --muted:    #8a8a86;
  --dim:      #484844;
  --white:    #ffffff;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 2px; }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(17,17,19,0.88);
  backdrop-filter: blur(20px) saturate(1.4);
}
.logo {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  color: var(--white); text-decoration: none;
  display: flex; align-items: center; letter-spacing: -0.02em;
}
.logo span { color: var(--muted); }
.logo-img  { height: 26px; width: auto; display: block; }
.logo-text { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--white); }

.nav-center {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.nav-center a {
  display: block; padding: 6px 16px;
  font-size: 13px; color: var(--muted); text-decoration: none;
  letter-spacing: -0.01em;
  transition: color .15s, background .15s;
  border-right: 1px solid var(--border);
  cursor: pointer;
}
.nav-center a:last-child { border-right: none; }
.nav-center a:hover, .nav-center a.active { color: var(--white); background: var(--surface2); }

.nav-right {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  animation: pulse-anim 2s infinite;
}
@keyframes pulse-anim {
  0%   { box-shadow: 0 0 0 0   rgba(34,197,94,.45); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0);   }
  100% { box-shadow: 0 0 0 0   rgba(34,197,94,0);   }
}

/* ─── PAGE ─── */
.page-content { padding-top: 54px; min-height: 100vh; animation: fadein .22s ease; }
@keyframes fadein { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }

/* ─── SHARED ─── */
.wrap  { max-width: 960px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section + .section { border-top: 1px solid var(--border); }

.label {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 10px;
}
.label::before { content:''; display:block; width:16px; height:1px; background:var(--dim); }

h2.big {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600; letter-spacing: -0.04em;
  line-height: 1.1; color: var(--white); margin-bottom: 1rem;
}
h2.big span { color: var(--muted); }

.sub {
  font-size: 16px; font-weight: 300; color: var(--muted);
  max-width: 480px; line-height: 1.75; margin-bottom: 2.5rem;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 7px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: -0.01em; cursor: pointer;
  text-decoration: none; transition: all .15s; border: none;
}
.btn-white   { background: var(--white); color: #000; }
.btn-white:hover { background: #eaeaea; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border2); }
.btn-outline:hover { border-color: rgba(255,255,255,.28); background: var(--surface2); }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem; max-width: 960px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  text-decoration: none; transition: color .15s;
}
.footer-links a:hover { color: var(--white); }
.footer-copy { font-family: var(--mono); font-size: 11px; color: var(--dim); }

/* ══════════════════════
   HOME
══════════════════════ */
.hero {
  min-height: calc(100vh - 54px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 5rem 2rem 4rem; max-width: 960px; margin: 0 auto;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 999px; padding: 4px 14px 4px 10px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin-bottom: 2.5rem; width: fit-content;
}
.hero-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.hero-name {
  font-size: clamp(3.2rem, 8vw, 6rem);
  font-weight: 600; letter-spacing: -0.05em;
  line-height: 1; color: var(--white); margin-bottom: 1.5rem;
}
.hero-name span { color: var(--muted); }
.hero-desc {
  font-size: 17px; font-weight: 300; color: var(--muted);
  max-width: 520px; line-height: 1.8; margin-bottom: 2.5rem;
}
.hero-desc strong { color: var(--text); font-weight: 400; }

/* ══════════════════════
   SOBRE
══════════════════════ */
.sobre-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
}
.sobre-text p {
  font-size: 15px; font-weight: 300; color: var(--muted);
  line-height: 1.9; margin-bottom: 1.1rem;
}
.sobre-text p strong { color: var(--text); font-weight: 400; }

.facts { display: flex; flex-direction: column; }
.fact {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.fact:last-child { border-bottom: none; }
.fact-key { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.fact-val { color: var(--text); font-weight: 400; text-align: right; }

/* TIMELINE */
.tl-item {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 2rem; padding: 1.75rem 0; border-bottom: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: none; }
.tl-date { font-family: var(--mono); font-size: 11px; color: var(--dim); padding-top: 2px; line-height: 1.8; }
.tl-date em { color: var(--muted); font-style: normal; }
.tl-role { font-size: 14px; font-weight: 500; color: var(--white); margin-bottom: 3px; }
.tl-co   { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.tl-desc { font-size: 13px; color: var(--muted); font-weight: 300; line-height: 1.8; }

/* ══════════════════════
   SKILLS
══════════════════════ */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.skill-group { background: var(--surface); padding: 1.75rem; }
.skill-group-title {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .07em; text-transform: uppercase; margin-bottom: 1.25rem;
}
.skill-list { display: flex; flex-direction: column; gap: 10px; }
.skill-item { display: flex; justify-content: space-between; align-items: center; }
.skill-name { font-size: 13px; color: var(--text); font-weight: 400; }
.skill-bar  { width: 72px; height: 2px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.skill-fill { height: 100%; background: var(--text); border-radius: 2px; width: 0; transition: width 1s ease; }

/* ══════════════════════
   PROJECTS
══════════════════════ */
.proj-filters { display: flex; gap: 6px; margin-bottom: 2rem; flex-wrap: wrap; }
.pf-btn {
  padding: 5px 14px; border-radius: 6px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: all .15s;
}
.pf-btn:hover, .pf-btn.active { color: var(--white); border-color: var(--border2); background: var(--surface2); }

.proj-grid { display: flex; flex-direction: column; }
.proj-item {
  display: grid; grid-template-columns: 40px 1fr auto auto;
  align-items: center; gap: 1.5rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: padding .15s;
}
.proj-item:last-child { border-bottom: none; }
.proj-item:hover { padding-left: 8px; }
.proj-item:hover .proj-arrow { opacity: 1; transform: translateX(0); }
.proj-item:hover .tag { color: var(--muted); border-color: var(--border2); }
.proj-num  { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.proj-name { font-size: 15px; font-weight: 500; color: var(--white); letter-spacing: -.02em; margin-bottom: 3px; }
.proj-desc { font-size: 13px; color: var(--muted); font-weight: 300; }
.proj-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; transition: all .15s;
}
.proj-arrow { font-size: 16px; color: var(--muted); opacity: 0; transform: translateX(-6px); transition: all .2s; }

/* DETAIL */
.det-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 0; margin-bottom: 2.5rem; transition: color .15s;
}
.det-back:hover { color: var(--white); }
.det-title {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 600; letter-spacing: -.05em; line-height: 1; color: var(--white); margin-bottom: 1.25rem;
}
.det-meta {
  display: flex; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 7px; overflow: hidden; width: fit-content; margin-bottom: 2.5rem;
}
.det-meta span { padding: 6px 14px; border-right: 1px solid var(--border); }
.det-meta span:last-child { border-right: none; }
.det-body { max-width: 680px; }
.det-body p { font-size: 15px; color: var(--muted); font-weight: 300; line-height: 1.85; margin-bottom: 1.5rem; }
.det-h { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 2rem 0 .9rem; }
.det-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.det-list li { font-size: 14px; color: var(--muted); font-weight: 300; padding-left: 1.5rem; position: relative; line-height: 1.7; }
.det-list li::before { content: '—'; position: absolute; left: 0; color: var(--dim); }

/* ══════════════════════
   GALERIA
══════════════════════ */
.gal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.gal-item { background: var(--surface); aspect-ratio: 4/3; position: relative; overflow: hidden; transition: background .2s; }
.gal-item:hover { background: var(--surface2); }
.gal-item:hover .gal-over { opacity: 1; }
.gal-code {
  position: absolute; inset: 0; padding: 1.5rem;
  font-family: var(--mono); font-size: 11px; line-height: 1.9;
  color: rgba(255,255,255,.065); white-space: pre; overflow: hidden; user-select: none;
}
.gal-over {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.82) 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 1.25rem;
  opacity: 0; transition: opacity .2s;
}
.gal-name { font-size: 14px; font-weight: 500; color: var(--white); margin-bottom: 3px; }
.gal-sub  { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ══════════════════════
   FAQ
══════════════════════ */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.35rem 0; background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--text); transition: color .15s;
}
.faq-q:hover { color: var(--white); }
.faq-icon {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--muted); flex-shrink: 0; transition: all .25s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); border-color: var(--text); color: var(--white); }
.faq-a {
  max-height: 0; overflow: hidden;
  font-size: 14px; color: var(--muted); font-weight: 300; line-height: 1.85;
  transition: max-height .35s ease, padding .25s;
}
.faq-item.open .faq-a { max-height: 220px; padding-bottom: 1.5rem; }

/* ─── RESPONSIVE ─── */
@media (max-width: 700px) {
  nav { padding: 0 1.25rem; }
  .nav-center { display: none; }
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .wrap { padding: 0 1.25rem; }
  .sobre-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .tl-item { grid-template-columns: 1fr; gap: .4rem; }
  .proj-item { grid-template-columns: 32px 1fr; }
  .proj-tags { display: none; }
  footer { flex-direction: column; align-items: flex-start; }
}
