:root {
  --bg: #0f172a;
  --text: #ffffff;
  --primary: #38bdf8;
  --primary-strong: #0ea5e9;
  --glass: rgba(255,255,255,0.05);
  --hero-gradient: linear-gradient(-45deg, #020617, #1e293b, #0f172a);
  --header-border: rgba(255,255,255,0.05);
  --card-bg: rgba(30, 41, 59, 0.6);
  --card-border: rgba(255,255,255,0.05);
  --input-bg: rgba(255,255,255,0.05);
  --button-text: #0f172a;
  --muted: #cbd5e1;
  --shadow-soft: 0 20px 45px rgba(2, 6, 23, 0.28);
}

.light {
  --bg: #f1f5f9;
  --text: #0f172a;
  --glass: rgba(0,0,0,0.05);
  --hero-gradient: linear-gradient(-45deg, #e2e8f0, #f8fafc, #cbd5e1);
  --header-border: rgba(15,23,42,0.12);
  --card-bg: rgba(255,255,255,0.75);
  --card-border: rgba(148,163,184,0.35);
  --input-bg: rgba(255,255,255,0.85);
  --button-text: #ffffff;
  --muted: #475569;
  --shadow-soft: 0 20px 45px rgba(148, 163, 184, 0.22);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  transition: 0.3s;
  padding-top: 80px; /* evita sobreposição do header */
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  background: var(--glass);
  border-bottom: 1px solid var(--header-border);
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  padding: 15px 40px;
  align-items: center;
  gap: 20px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav ul li {
  margin-left: 0;
}

.status {
  color: var(--muted);
  font-size: 0.95rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  transition: 0.3s;
}

nav a:hover {
  color: var(--primary);
}

#themeToggle {
  cursor: pointer;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 999px;
  width: 44px;
  height: 44px;
}

/* HERO */
.hero {
  height: 100vh;
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;

  background: var(--hero-gradient);
  background-size: 400% 400%;
  animation: gradient 10s ease infinite;

  text-align: center;
}

@keyframes gradient {
  0% { background-position: 0% }
  50% { background-position: 100% }
  100% { background-position: 0% }
}

.hero h2 {
  font-size: 2.5rem;
  max-width: 700px;
}

.hero p {
  opacity: 0.8;
  margin-top: 10px;
  max-width: 600px;
}

.hero span {
  color: var(--primary);
}

.hero button {
  margin-top: 20px;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--button-text);
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-weight: 600;
}

/* SECTIONS */
.section {
  padding: 120px 20px;
  text-align: center;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(15px);
  border-radius: 10px;
  padding: 40px;
  margin: 40px auto;
  max-width: 900px;
}

/* CARDS */
.cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.card {
  padding: 20px;
  border-radius: 10px;
  width: 200px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  transition: 0.3s;
  box-shadow: var(--shadow-soft);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 15px rgba(56,189,248,0.5);
}

.project-card {
  width: min(100%, 280px);
  text-decoration: none;
  text-align: left;
  display: block;
}

.project-card h3 {
  margin-bottom: 12px;
}

.project-card p {
  color: var(--muted);
  line-height: 1.6;
}

/* NEON */
.neon {
  box-shadow: 0 0 8px rgba(56,189,248,0.6),
              0 0 16px rgba(56,189,248,0.4);
}

/* FORM */
form {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin: auto;
  width: 100%;
}

form input,
form textarea {
  margin: 10px 0;
  padding: 12px;
  border-radius: 6px;
  border: none;
  background: var(--input-bg);
  color: var(--text);
}

form input:focus,
form textarea:focus {
  outline: 1px solid var(--primary);
}

form textarea {
  min-height: 140px;
  resize: vertical;
}

form button {
  margin-top: 10px;
  background: var(--primary);
  color: var(--button-text);
  border: none;
  padding: 12px;
  cursor: pointer;
  border-radius: 6px;
  font-weight: 600;
}

/* BUTTON GLOBAL */
button {
  transition: 0.3s;
}

button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* FOOTER */
footer {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.project-page {
  min-height: 100vh;
}

.project-hero {
  min-height: calc(100vh - 80px);
  padding: 120px 20px 60px;
  display: grid;
  place-items: center;
  background: var(--hero-gradient);
}

.project-hero-content {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.project-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.project-copy p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 60ch;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.3s;
}

.btn-primary {
  background: var(--primary);
  color: var(--button-text);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--card-border);
}

.project-preview {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 24px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.preview-window {
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(15,23,42,0.08));
}

.preview-bar {
  display: flex;
  gap: 8px;
  padding: 16px;
}

.preview-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
}

.preview-screen {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.screen-block {
  border-radius: 18px;
  background: rgba(56,189,248,0.15);
}

.screen-block.large {
  min-height: 190px;
}

.screen-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.screen-row .screen-block {
  min-height: 90px;
}

.project-section {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto 32px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.info-card h2,
.info-card h3 {
  margin-bottom: 12px;
}

.info-card p,
.info-card li {
  color: var(--muted);
  line-height: 1.7;
}

.feature-list,
.stack-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.stack-list {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.stack-list li,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: var(--glass);
  border: 1px solid var(--card-border);
  border-radius: 999px;
}

.project-overview {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.metric {
  padding: 18px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--card-border);
  text-align: center;
}

.metric strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.back-link {
  display: inline-flex;
  margin-top: 18px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 1024px) {
  nav {
    padding: 14px 24px;
  }

  .project-hero-content,
  .project-overview {
    grid-template-columns: 1fr;
  }

  .project-preview {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  body {
    padding-top: 150px;
  }

  nav {
    padding: 15px 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-right,
  nav ul {
    width: 100%;
  }

  .nav-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 12px;
  }

  #themeToggle {
    width: 42px;
    height: 42px;
  }

  nav ul li {
    margin-left: 0;
  }

  .hero {
    height: auto;
    padding: 56px 20px;
    min-height: calc(100vh - 80px);
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .section {
    padding: 84px 16px;
  }

  .glass,
  .info-card,
  .project-preview {
    padding: 22px;
  }

  .card {
    width: 100%;
  }

  .project-card {
    width: 100%;
  }

  .project-hero {
    min-height: auto;
    padding: 32px 16px 40px;
  }

  .project-hero-content,
  .project-overview,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-copy h1 {
    font-size: 2rem;
  }

  .project-copy p {
    max-width: none;
  }

  .project-actions,
  .btn-link {
    width: 100%;
  }

  .btn-link {
    min-height: 48px;
  }

  .project-section {
    width: min(100%, calc(100% - 24px));
    margin-bottom: 20px;
  }

  .screen-row,
  .metrics {
    grid-template-columns: 1fr;
  }

  .preview-screen {
    padding: 16px;
  }

  .screen-block.large {
    min-height: 150px;
  }

  form textarea {
    min-height: 120px;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 176px;
  }

  nav {
    padding: 12px 16px;
    gap: 14px;
  }

  .status {
    font-size: 0.85rem;
  }

  nav ul {
    gap: 10px 14px;
    font-size: 0.95rem;
  }

  .hero {
    padding: 44px 16px;
  }

  .hero h2 {
    font-size: 1.55rem;
  }

  .hero p,
  .project-copy p,
  .info-card p,
  .info-card li {
    font-size: 0.95rem;
  }

  .hero button,
  form button {
    width: 100%;
    min-height: 48px;
  }

  .section {
    padding: 72px 14px;
  }

  .glass {
    margin: 24px auto;
    padding: 18px;
  }

  .cards {
    gap: 14px;
  }

  .card,
  .project-card,
  .info-card {
    border-radius: 18px;
  }

  .project-hero {
    padding: 24px 12px 32px;
  }

  .project-copy h1 {
    font-size: 1.75rem;
  }

  .stack-list {
    grid-template-columns: 1fr 1fr;
  }

  .metric {
    padding: 14px;
  }
}
