/* =============================================================
   THAIS FRANÇA — PORTFOLIO
   Design tokens: dark terminal / cybersecurity HUD aesthetic
   ============================================================= */

:root {
  /* Colors */
  --bg: #050505;
  --bg-alt: #0a0c0a;
  --bg-panel: #0d100d;
  --neon: #39ff14;
  --neon-dim: #1f8f0c;
  --neon-glow: rgba(57, 255, 20, 0.55);
  --border: rgba(57, 255, 20, 0.16);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #eaeceb;
  --text-muted: #8b958c;
  --text-dim: #5c655e;
  --danger: #ff4444;

  /* Type */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Poppins", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Layout */
  --max-w: 1180px;
  --radius: 4px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body.is-loading {
  overflow: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--neon); color: #050505; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--neon-dim); border-radius: 10px; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
}

/* =============================================================
   MATRIX BACKGROUND CANVAS
   ============================================================= */
#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}

#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-screen__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.loading-screen__logo {
  width: clamp(160px, 28vw, 240px);
  filter: drop-shadow(0 0 22px rgba(57, 255, 20, 0.28));
  animation: pulseLogo 1.6s ease-in-out infinite alternate;
}

.loading-screen__bar {
  position: relative;
  width: min(260px, 48vw);
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.loading-screen__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(57, 255, 20, 0.05), rgba(57, 255, 20, 0.95), rgba(57, 255, 20, 0.1));
  animation: loadingBar 1.5s ease-in-out infinite;
}

@keyframes pulseLogo {
  0% { transform: scale(0.96); opacity: 0.8; }
  100% { transform: scale(1.04); opacity: 1; }
}

@keyframes loadingBar {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

/* =============================================================
   UTILITIES
   ============================================================= */
.section {
  position: relative;
  z-index: 1;
  padding: 120px 32px;
}
.section--alt { background: linear-gradient(180deg, transparent 0%, rgba(57,255,20,0.02) 50%, transparent 100%); }
.section__inner { max-width: var(--max-w); margin: 0 auto; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  display: block;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.section__subtitle {
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 56px;
  font-weight: 300;
}

.muted { color: var(--text-muted); font-size: 0.85rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--solid {
  background: var(--neon);
  color: #050505;
  box-shadow: 0 0 0 rgba(57,255,20,0);
}
.btn--solid:hover {
  box-shadow: 0 0 24px var(--neon-glow);
  transform: translateY(-2px);
}
.btn--outline {
  border-color: var(--neon);
  color: var(--neon);
  background: transparent;
}
.btn--outline:hover {
  background: rgba(57,255,20,0.08);
  box-shadow: 0 0 18px rgba(57,255,20,0.2);
}
.btn--ghost {
  color: var(--text);
  border-color: var(--border-soft);
}
.btn--ghost:hover { border-color: var(--neon); color: var(--neon); }
.btn--sm { padding: 9px 16px; font-size: 0.75rem; }
.btn--full { width: 100%; }

/* =============================================================
   NAVBAR
   ============================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5,5,5,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  transition: border-color var(--transition), background var(--transition);
}
.navbar.is-scrolled { border-bottom-color: var(--border); }

.navbar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: opacity var(--transition);
}
.navbar__logo:hover { opacity: 0.9; }
.navbar__logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(57,255,20,0.18));
}

.navbar__links {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-left: auto;
  margin-right: 32px;
}
.nav-link {
  position: relative;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 4px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--neon);
  transition: width var(--transition);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.navbar__cta { flex-shrink: 0; }

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.navbar__burger span {
  width: 22px; height: 2px;
  background: var(--text);
  transition: all var(--transition);
}
.navbar__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 32px 80px;
}

.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.terminal-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon);
  border: 1px solid var(--border);
  background: rgba(57,255,20,0.04);
  padding: 8px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
}
.terminal-badge__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.terminal-badge__prompt { color: var(--text-dim); }

.hero__greeting {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero__role {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--neon);
  font-weight: 500;
  margin-bottom: 20px;
}
.hero__amp { color: var(--text-muted); font-family: var(--font-body); }

.hero__desc {
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero__traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-bottom: 40px;
  max-width: 460px;
}
.hero__traits li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.trait-icon { color: var(--neon); }

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero photo */
.hero__right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-frame {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 400 / 460;
}

.photo-frame__glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 40%, rgba(57,255,20,0.35), transparent 65%);
  filter: blur(30px);
  z-index: 0;
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.photo-frame__img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: contrast(1.05) saturate(0.92);
}

.photo-frame__corners {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 6px var(--neon-glow));
}

.photo-frame__scan {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  z-index: 4;
  opacity: 0.8;
  animation: scan-move 3.2s linear infinite;
  box-shadow: 0 0 12px var(--neon);
}
@keyframes scan-move {
  0% { top: 2%; }
  100% { top: 96%; }
}

.photo-frame__tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon);
  background: rgba(5,5,5,0.7);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(4px);
}

.rec-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 6px var(--neon);
  display: inline-block;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}
.scroll-cue__line {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--neon), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0% { transform: scaleY(0.3); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.1% { transform-origin: bottom; }
  100% { transform: scaleY(0.3); transform-origin: bottom; }
}

/* =============================================================
   SOBRE
   ============================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-grid__text p {
  color: var(--text-muted);
  margin-bottom: 18px;
  max-width: 620px;
}
.about-grid__text strong { color: var(--text); font-weight: 500; }

.about-grid__panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-card {
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color var(--transition), transform var(--transition);
}
.info-card:hover {
  border-color: var(--border);
  transform: translateX(4px);
}
.info-card__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon);
  margin-bottom: 8px;
}
.info-card__value {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
}

/* =============================================================
   TECH GRID
   ============================================================= */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.tech-card {
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.tech-card:hover {
  border-color: var(--neon);
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(57,255,20,0.12);
}
.tech-card__icon {
  width: 34px; height: 34px;
  color: var(--text-muted);
  transition: color var(--transition), filter var(--transition);
}
.tech-card:hover .tech-card__icon {
  color: var(--neon);
  filter: drop-shadow(0 0 6px var(--neon-glow));
}
.tech-card__icon svg { width: 100%; height: 100%; }
.tech-card__name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.tech-card:hover .tech-card__name { color: var(--text); }

/* =============================================================
   PROJECTS
   ============================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  border-color: var(--border);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.project-card__img-wrap {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #000;
}
.project-card__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition);
}
.project-card:hover .project-card__img-wrap img { transform: scale(1.05); }

.project-card__body { padding: 22px; }
.project-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.project-card__desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
  min-height: 44px;
}
.project-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.project-card__tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--neon);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 12px;
}
.project-card__actions {
  display: flex;
  gap: 10px;
}

/* =============================================================
   TIMELINE
   ============================================================= */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--border);
}

.timeline__item {
  position: relative;
  padding-bottom: 48px;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--neon);
  box-shadow: 0 0 10px var(--neon-glow);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--neon);
  display: inline-block;
  margin-bottom: 8px;
}
.timeline__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.timeline__desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 620px;
}

/* =============================================================
   CONTACT
   ============================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.field input, .field textarea {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(57,255,20,0.1);
}

.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon);
  border: 1px solid var(--border);
  background: rgba(57,255,20,0.06);
  padding: 12px 16px;
  border-radius: var(--radius);
}
.form-success.is-visible { display: flex; animation: fade-in 0.4s ease; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.social-row {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}
.social-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 16px rgba(57,255,20,0.25);
  transform: translateY(-3px);
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-soft);
  padding: 32px;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.footer__back {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__back:hover { color: var(--neon); }

/* =============================================================
   SCROLL REVEAL
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__right { order: -1; margin-bottom: 20px; }
  .photo-frame { width: min(70%, 300px); margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar__links { display: none; }
  .navbar__cta { display: none; }
  .navbar__burger { display: flex; }

  .navbar__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(5,5,5,0.97);
    backdrop-filter: blur(14px);
    padding: 24px 32px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    margin: 0;
  }

  .hero { padding-top: 120px; }
  .hero__traits { grid-template-columns: 1fr; }
  .section { padding: 80px 20px; }
  .navbar__inner { padding: 16px 20px; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}