/* ============================================
   Mathaus Sobrinho - Landing Page
   mathaus.site
   ============================================ */

:root {
  --bg: #0a0b0f;
  --bg-card: #12141c;
  --surface: #161922;
  --text: #e4e6eb;
  --text-muted: #8b8f9a;
  --accent: #00d4aa;
  --accent-dim: #00a884;
  --accent-glow: rgba(0, 212, 170, 0.25);
  --purple: #a855f7;
  --blue: #3b82f6;
  --border: rgba(255, 255, 255, 0.06);
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Noise overlay */
.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

/* Grid background */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(10, 11, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 96px) 16px 40px;
}

.hero-greeting {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-bottom: 8px;
  animation: fadeUp 0.6s ease-out;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.6s ease-out 0.1s both;
}

.hero-title {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-top: 8px;
  animation: fadeUp 0.6s ease-out 0.2s both;
}

.hero-location {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
  animation: fadeUp 0.6s ease-out 0.3s both;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 64px;
  animation: fadeUp 0.6s ease-out 0.4s both;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-outline {
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-visual {
  animation: fadeUp 0.8s ease-out 0.3s both;
}

.code-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  min-width: 576px;
  width: 100%;
  max-width: 576px;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-content {
  padding: 28px 24px;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.code-prompt {
  color: var(--accent);
}

/* Sections common */
section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 16px;
}

.hero + section {
  padding-top: 40px;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 12px;
  max-width: 560px;
}

.section-login {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  margin-bottom: 40px;
  max-width: 560px;
}

.section-login strong {
  color: var(--accent);
}

/* Sobre */
.sobre .section-title {
  margin-bottom: 8px;
}

.sobre-layout {
  display: flex;
  align-items: flex-end;
  gap: 48px;
}

.sobre-col-texto {
  flex: 1;
}

.sobre-content {
  max-width: 600px;
  flex: 1;
}

.sobre-foto {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  min-height: 200px;
  flex-shrink: 0;
  margin-top: 48px;
  object-fit: contain;
  object-position: center bottom;
}

.sobre-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.sobre-text strong {
  color: var(--text);
}

.sobre-stats {
  display: flex;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Projetos */
.projetos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.projeto-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.projeto-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-glow);
}

.projeto-link {
  display: block;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.projeto-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.projeto-nome {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.projeto-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.projeto-arrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.projeto-card:hover .projeto-arrow {
  transform: translateX(4px);
}

/* Habilidades */
.habilidades .section-desc {
  margin-bottom: 32px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  display: inline-block;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

/* Contato */
.contato-text {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contato-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.contato-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  min-width: 200px;
  transition: border-color 0.2s, transform 0.2s;
}

.contato-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contato-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.contato-icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 8px;
}

.contato-icon-svg svg {
  width: 100%;
  height: 100%;
}

.contato-icon-wpp {
  color: #25D366;
}

.contato-icon-linkedin {
  color: #0A66C2;
}

.contato-icon-github {
  color: var(--text);
}

.contato-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contato-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer a {
  color: #24D89F;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: #1eb887;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 0;
  }

  .hero-cta {
    justify-content: center;
  }

  .sobre-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .sobre-stats {
    justify-content: flex-start;
  }

  .projetos-grid {
    grid-template-columns: 1fr;
  }
}
