/* =================================================================
   THE SENTINEL AESTHETIC — Diego Moraes Portfolio
   Tokens e regras derivados de DESIGN.md.
   Princípios: The Void (charcoal) + The Pulse (neon). Sem bordas 1px
   sólidas; separação por camadas de surface. Cantos sm (2px)/none.
   ================================================================= */

:root {
  /* ---- The Tonal Spectrum ---- */
  --bg: #131313;
  --surface: #131313;
  --surface-container-lowest: #0e0e0e;
  --surface-container-low: #1c1b1b;
  --surface-container: #232222;
  --surface-container-high: #2a2a2a;
  --surface-container-highest: #353434;

  /* ---- The Pulse ---- */
  --primary: #efffe3;                 /* neon nerve (texto de destaque) */
  --primary-container: #39ff14;       /* neon verde — ação mais importante */
  --primary-fixed-dim: #25c20a;       /* base do gradiente do LED */
  --on-primary-container: #07270a;    /* texto escuro sobre o neon */

  /* ---- Cyber Blue ---- */
  --secondary: #a6e6ff;
  --secondary-container: #14d1ff;

  /* ---- Texto ---- */
  --on-surface: #e5e2e1;              /* corpo — nunca branco puro */
  --on-surface-variant: #9a9897;      /* metadados / texto silencioso */

  /* ---- Outline (usado só como "ghost border") ---- */
  --outline: #5f5d5c;
  --outline-variant: #46443f;

  /* ---- Tipografia ---- */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* ---- Layout ---- */
  --radius-sm: 2px;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* ---------------------------------------------------------------- */
/* Reset                                                            */
/* ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; }

.mono { font-family: var(--font-mono); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------------------------------------------------------------- */
/* Eyebrow + section title (estratégia de hierarquia do DESIGN)     */
/* ---------------------------------------------------------------- */
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--secondary);
  margin: 0 0 16px;
}
.eyebrow--center { text-align: center; }

.eyebrow.inset {
  display: inline-block;
  background: var(--surface-container-lowest);
  color: var(--on-surface-variant);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.28em;
  margin-bottom: 28px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5.2vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 56px;
}
.section__title--center { text-align: center; }

/* ---------------------------------------------------------------- */
/* Sections — separação só por shift de background (No-Line Rule)    */
/* ---------------------------------------------------------------- */
.section { padding-block: clamp(72px, 12vw, 130px); background: var(--surface); }
.section--low { background: var(--surface-container-low); }

/* ---------------------------------------------------------------- */
/* NAV — glassmorphism flutuante                                    */
/* ---------------------------------------------------------------- */
.nav-wrap {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 14px var(--gutter);
  pointer-events: none;
}
.glass {
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav {
  pointer-events: auto;
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  /* ghost border a 15% — fallback de acessibilidade do DESIGN */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--outline-variant) 22%, transparent);
}
.nav__brand {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--on-surface);
}
.nav__links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}
.nav__links a {
  color: var(--on-surface-variant);
  transition: color .2s ease, text-shadow .2s ease;
}
.nav__links a:hover,
.nav__links a.is-active {
  color: var(--primary-container);
  text-shadow: 0 0 12px color-mix(in srgb, var(--primary-container) 60%, transparent);
}
.nav__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--primary-container);
  background: color-mix(in srgb, var(--primary-container) 12%, transparent);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}
.nav__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary-container);
  box-shadow: 0 0 8px var(--primary-container);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.nav__toggle { display: none; }

/* ---------------------------------------------------------------- */
/* HERO                                                             */
/* ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(140px, 20vh, 220px) clamp(80px, 12vw, 130px);
  overflow: hidden;
}
/* "data" sutil sangrando no fundo, offset à direita (asymmetry) */
.hero__grid {
  position: absolute;
  inset: 0 -10% 0 35%;
  background-image:
    linear-gradient(color-mix(in srgb, var(--secondary) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--secondary) 6%, transparent) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 78% 28%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 80% at 78% 28%, #000 0%, transparent 72%);
  opacity: .6;
}
.hero__inner { position: relative; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 8.5vw, 5rem);
  display: flex;
  flex-direction: column;
  margin-bottom: 38px;
}
.hero__name { color: var(--on-surface); }
.hero__line--pulse {
  color: var(--primary-container);
  text-shadow: 0 0 30px color-mix(in srgb, var(--primary-container) 35%, transparent);
}
.hero__line--muted { color: #5a5a5a; }

/* Terminal — elemento-assinatura */
.terminal {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--outline-variant) 18%, transparent);
  padding: 22px 24px;
  max-width: 620px;
  font-size: 0.82rem;
  line-height: 1.85;
  color: var(--primary-container);
  margin-bottom: 40px;
}
.terminal__line { display: block; white-space: pre-wrap; }
.cursor {
  display: inline-block;
  color: var(--primary-container);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------------------------------------------------------------- */
/* Buttons                                                          */
/* ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: box-shadow .25s ease, background .25s ease, transform .15s ease;
}
.btn--primary {
  /* gradiente que simula um LED emissor de luz */
  background: linear-gradient(135deg, var(--primary-fixed-dim), var(--primary-container));
  color: var(--on-primary-container);
  font-weight: 700;
  border: 0;
}
.btn--primary:hover {
  box-shadow: 0 0 20px color-mix(in srgb, var(--primary-container) 55%, transparent);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--on-surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--outline-variant) 55%, transparent);
}
.btn--ghost:hover { background: var(--surface-container-high); }

/* ---------------------------------------------------------------- */
/* TIMELINE — assimetria intencional                                */
/* ---------------------------------------------------------------- */
.timeline { position: relative; }
/* linha central — gradiente, não 1px sólido cortante */
.timeline::before {
  content: "";
  position: absolute;
  top: 6px; bottom: 6px; left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--primary-container) 30%, transparent) 12%,
    color-mix(in srgb, var(--primary-container) 30%, transparent) 88%,
    transparent);
}

.tl-item {
  position: relative;
  width: 50%;
  padding: 0 48px 56px;
}
.tl-item--left  { left: 0;   text-align: right; }
.tl-item--right { left: 50%; text-align: left;  }
.tl-item:last-child { padding-bottom: 0; }

.tl-node {
  position: absolute;
  top: 6px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--primary-container);
  box-shadow: 0 0 14px color-mix(in srgb, var(--primary-container) 55%, transparent);
}
.tl-item--left  .tl-node { right: -6.5px; }
.tl-item--right .tl-node { left:  -6.5px; }

.tl-role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--primary-container);
  margin-bottom: 6px;
}
.tl-meta {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--on-surface-variant);
  margin-bottom: 14px;
}
.tl-points { display: flex; flex-direction: column; gap: 7px; }
.tl-points li {
  position: relative;
  font-size: 0.9rem;
  color: var(--on-surface);
}
.tl-item--left  .tl-points li { padding-right: 16px; }
.tl-item--right .tl-points li { padding-left: 16px; }
.tl-points li::before {
  content: "›";
  position: absolute;
  color: var(--secondary-container);
}
.tl-item--left  .tl-points li::before { right: 0; }
.tl-item--right .tl-points li::before { left: 0; }

/* ---------------------------------------------------------------- */
/* CREDENTIALS — cards com barra de acento à esquerda               */
/* ---------------------------------------------------------------- */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  align-items: center;
}
.cred-card {
  background: var(--surface-container-low);
  border-radius: var(--radius-sm);
  padding: 26px 28px 26px 30px;
  position: relative;
  transition: background .25s ease;
}
.section--low .cred-card { background: var(--surface-container); }
.cred-card::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  border-radius: var(--radius-sm);
}
.cred-card--pulse::before { background: var(--primary-container); }
.cred-card--cyber::before { background: var(--secondary-container); }
.cred-card:hover { background: var(--surface-container-high); }

.cred-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.cred-card--pulse .cred-title { color: var(--primary-container); }
.cred-card--cyber .cred-title { color: var(--secondary); }
.cred-meta {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--on-surface-variant);
  margin: 0;
}

/* ---------------------------------------------------------------- */
/* SKILLS                                                           */
/* ---------------------------------------------------------------- */
.skills {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.skills__intro .section__title { margin-bottom: 26px; }
.skills__lead {
  color: var(--on-surface-variant);
  max-width: 40ch;
  margin: 0 0 28px;
}
.skills__tags { display: flex; flex-direction: column; gap: 14px; }
.skills__tags li {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--on-surface);
}
.skills__tags li::before {
  content: "▹ ";
  color: var(--primary-container);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.skill-card {
  background: var(--surface-container-lowest);
  border-radius: var(--radius-sm);
  padding: 24px 22px;
  transition: background .25s ease, transform .2s ease;
}
.skill-card:hover { background: var(--surface-container-high); transform: translateY(-2px); }
.skill-card__icon {
  display: inline-flex;
  width: 30px; height: 30px;
  color: var(--primary-container);
  margin-bottom: 16px;
}
.skill-card:nth-child(even) .skill-card__icon { color: var(--secondary-container); }
.skill-card__icon svg { width: 100%; height: 100%; }
.skill-card__title {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--on-surface);
  margin-bottom: 14px;
}
.skill-card__items { display: flex; flex-direction: column; gap: 8px; }
.skill-card__items li {
  font-size: 0.84rem;
  color: var(--on-surface-variant);
  padding-left: 14px;
  position: relative;
}
.skill-card__items li::before {
  content: "•";
  position: absolute; left: 0;
  color: var(--primary-container);
}
.skill-card:nth-child(even) .skill-card__items li::before { color: var(--secondary-container); }

/* ---------------------------------------------------------------- */
/* CONTACT                                                          */
/* ---------------------------------------------------------------- */
.contact__card {
  background: var(--surface-container-low);
  border-radius: var(--radius-sm);
  padding: clamp(36px, 6vw, 60px);
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.contact__text {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 auto 32px;
  color: var(--on-surface);
}
.contact__cta { justify-content: center; }
.contact__socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.icon-btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  color: var(--on-surface-variant);
  background: var(--surface-container-lowest);
  transition: background .2s ease, color .2s ease;
}
.icon-btn:hover { background: var(--surface-container-high); color: var(--primary-container); }

/* ---------------------------------------------------------------- */
/* FOOTER                                                           */
/* ---------------------------------------------------------------- */
.footer { background: var(--surface-container-lowest); padding-block: 30px; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--on-surface-variant);
}
.footer__brand { color: var(--on-surface); font-weight: 700; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { transition: color .2s ease; }
.footer__links a:hover { color: var(--primary-container); }

/* ---------------------------------------------------------------- */
/* Reveal on scroll                                                 */
/* ---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor, .nav__dot { animation: none; }
}

/* ---------------------------------------------------------------- */
/* Responsive                                                       */
/* ---------------------------------------------------------------- */
@media (max-width: 860px) {
  .nav__links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    flex-direction: column;
    gap: 18px;
    padding: 22px 26px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface-container-low) 92%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--outline-variant) 22%, transparent);
    display: none;
    min-width: 200px;
  }
  .nav__links.is-open { display: flex; }
  .nav__status { display: none; }
  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 38px; height: 38px;
    background: transparent;
    border: 0;
    cursor: pointer;
  }
  .nav__toggle span {
    display: block;
    width: 20px; height: 2px;
    margin-inline: auto;
    background: var(--on-surface);
    transition: transform .25s ease, opacity .25s ease;
  }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

  /* Timeline vira coluna única à esquerda */
  .timeline::before { left: 6px; transform: none; }
  .tl-item,
  .tl-item--left,
  .tl-item--right {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 0 0 44px 34px;
  }
  .tl-item--left .tl-node,
  .tl-item--right .tl-node { left: 0.5px; right: auto; }
  .tl-item--left .tl-points li,
  .tl-item--right .tl-points li { padding: 0 0 0 16px; }
  .tl-item--left .tl-points li::before,
  .tl-item--right .tl-points li::before { left: 0; right: auto; }

  .cred-grid { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .skills__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .footer__inner { flex-direction: column; text-align: center; }
}
