/* =============================================
   VARIABLES & RESET
   ============================================= */
:root {
  --bg:          #080c10;
  --bg-2:        #0d1318;
  --bg-3:        #111820;
  --petrol:      #1b6b7a;
  --petrol-mid:  #22899b;
  --petrol-lt:   #2dafcc;
  --gray-dk:     #1c232b;
  --gray-mid:    #2e3a45;
  --gray-lt:     #5a6e7d;
  --text:        #d8e4ec;
  --text-muted:  #6d8494;
  --accent:      #2dafcc;
  --border:      rgba(45, 175, 204, 0.15);
  --border-2:    rgba(45, 175, 204, 0.08);

  --font-mono: 'JetBrains Mono', monospace;
  --font-serif: 'Fraunces', serif;

  --nav-h: 72px;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* =============================================
   UTILITIES
   ============================================= */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}

.accent { color: var(--accent); }
.highlight { color: var(--petrol-lt); font-weight: 600; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}
#navbar.scrolled {
  background: rgba(8, 12, 16, 0.88);
  backdrop-filter: blur(18px);
  border-color: var(--border-2);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color var(--transition);
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 8px;
}
.nav-links a {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover {
  color: var(--accent);
  background: rgba(45, 175, 204, 0.08);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: var(--transition);
}

/* =============================================
   HERO
   ============================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-2) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: glow-pulse 6s ease-in-out infinite alternate;
}
.glow-1 {
  width: 600px;
  height: 600px;
  background: var(--petrol);
  top: -150px;
  right: -100px;
  animation-delay: 0s;
}
.glow-2 {
  width: 400px;
  height: 400px;
  background: var(--petrol-mid);
  bottom: 0;
  left: -80px;
  animation-delay: -3s;
}

@keyframes glow-pulse {
  from { opacity: 0.2; transform: scale(1); }
  to   { opacity: 0.35; transform: scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
  padding-top: var(--nav-h);
  width: 100%;
}

.hero-tag {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 24px;
  animation-delay: 0s;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 32px;
  animation-delay: 0.1s;
}
.hero-name-accent {
  color: transparent;
  -webkit-text-stroke: 2px var(--petrol-lt);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 40px;
  animation-delay: 0.2s;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation-delay: 0.3s;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--petrol);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--petrol-mid);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: var(--petrol-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(27, 107, 122, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--gray-mid);
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn-outline:hover {
  color: var(--text);
  border-color: var(--petrol-lt);
  transform: translateY(-2px);
}

.hero-socials {
  display: flex;
  gap: 16px;
  animation-delay: 0.4s;
}
.hero-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.hero-socials a svg { width: 18px; height: 18px; }
.hero-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(45, 175, 204, 0.08);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  animation: scroll-fade 2.5s ease-in-out infinite;
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
@keyframes scroll-fade {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.8; transform: translateX(-50%) translateY(6px); }
}

/* =============================================
   SECTION COMMONS
   ============================================= */
section { padding: 100px 0; }
section:nth-child(even) { background: var(--bg-2); }

.section-header {
  margin-bottom: 64px;
}
.section-tag {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

/* =============================================
   SOBRE
   ============================================= */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.sobre-text p {
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 20px;
}
.sobre-text p:last-of-type { margin-bottom: 0; }

.sobre-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-2);
}
.detail-item { display: flex; flex-direction: column; gap: 4px; }
.detail-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
.detail-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* Terminal card */
.terminal-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--gray-dk);
  border-bottom: 1px solid var(--border-2);
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red    { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #27c93f; }
.terminal-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 8px;
  letter-spacing: 0.05em;
}
.terminal-body {
  padding: 24px 20px;
  overflow-x: auto;
}
.terminal-body pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  white-space: pre;
  min-width: min-content;
}
.t-brace { color: var(--text-muted); }
.t-key   { color: var(--petrol-lt); }
.t-str   { color: #9fcda8; }

/* =============================================
   HABILIDADES
   ============================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.skill-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.skill-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(27, 107, 122, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}
.skill-icon svg { width: 24px; height: 24px; }

.skill-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.skill-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-tags li {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(45, 175, 204, 0.08);
  border: 1px solid rgba(45, 175, 204, 0.2);
  padding: 3px 10px;
  border-radius: 4px;
}

/* =============================================
   PROJETOS
   ============================================= */
#projetos { background: var(--bg); }

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  align-items: start;
  padding: 40px 0;
  border-bottom: 1px solid var(--border-2);
  transition: background var(--transition);
}
.project-card:first-child { border-top: 1px solid var(--border-2); }
.project-card:hover { background: rgba(45, 175, 204, 0.03); }

.project-number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 300;
  color: var(--gray-mid);
  line-height: 1;
  padding-top: 4px;
  font-style: italic;
  transition: color var(--transition);
}
.project-card:hover .project-number { color: var(--petrol); }

.project-content h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.project-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 18px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.project-tags li {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--gray-dk);
  padding: 3px 10px;
  border-radius: 4px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  transition: gap var(--transition);
}
.project-link svg { width: 14px; height: 14px; }
.project-link:hover { gap: 12px; }

/* =============================================
   ESTUDANDO
   ============================================= */
#estudando { background: var(--bg-2); }

.studying-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.studying-card {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 28px;
  align-items: start;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition);
}
.studying-card:hover { border-color: var(--border); }

.studying-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(27, 107, 122, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}
.studying-icon svg { width: 22px; height: 22px; }

.studying-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.studying-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.progress-bar {
  height: 4px;
  background: var(--gray-mid);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-fill {
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--petrol), var(--petrol-lt));
  border-radius: 2px;
  animation: progress-grow 1.2s ease-out both;
  animation-play-state: paused;
}
.studying-card.visible .progress-fill {
  animation-play-state: running;
}
@keyframes progress-grow {
  from { width: 0; }
  to   { width: var(--w); }
}
.progress-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* =============================================
   CONTATO
   ============================================= */
#contato { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-text p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
.contact-item:hover {
  border-color: var(--border);
  transform: translateX(6px);
}
.contact-item svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.contact-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.contact-card {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.contact-card-inner {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.contact-card-tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}

.availability-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.availability-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.availability-list li svg {
  width: 16px;
  height: 16px;
  color: var(--petrol-lt);
  flex-shrink: 0;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-2);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
}
.footer-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.footer-socials {
  display: flex;
  gap: 12px;
}
.footer-socials a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition);
}
.footer-socials a svg { width: 15px; height: 15px; }
.footer-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* --- Tablet landscape / large tablet --- */
@media (max-width: 900px) {
  .sobre-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .contact-card { position: static; }
}

/* --- Tablet portrait --- */
@media (max-width: 768px) {
  section { padding: 80px 0; }
  .section-header { margin-bottom: 48px; }
}

/* --- Mobile --- */
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .section-header { margin-bottom: 36px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(8, 12, 16, 0.97);
    backdrop-filter: blur(20px);
    padding: 32px 28px;
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open a {
    font-size: 1rem;
    padding: 14px 16px;
    border-radius: 8px;
  }
  .menu-toggle { display: flex; }

  .hero-content { padding-bottom: 100px; }
  .scroll-indicator { display: none; }

  .hero-title { font-size: clamp(3rem, 14vw, 5rem); }
  .section-header h2 { font-size: clamp(1.8rem, 7vw, 2.5rem); }

  .project-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .project-number { font-size: 2rem; }

  .studying-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sobre-details {
    grid-template-columns: 1fr;
  }

  .contact-item:hover { transform: none; }
}

/* --- Telas muito pequenas (< 380px) --- */
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .hero-content { padding-left: 16px; padding-right: 16px; }
  .terminal-body { padding: 16px 12px; }
  .terminal-body pre { font-size: 0.72rem; }
  .skill-card { padding: 24px 20px; }
  .contact-card-inner { padding: 24px 20px; }
}
