/* =========================================================
   Prof. Patryck — Biologia & Física · Dark Blue Theme
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Core palette — deep blue */
  --bg:         #080e1a;
  --bg-soft:    #0d1526;
  --bg-card:    #111d33;
  --bg-hover:   #162140;

  /* Text */
  --ink:        #d4dff5;
  --ink-dim:    #7b94c0;
  --ink-muted:  #3d5580;
  --paper:      #eef3ff;

  /* Accent — electric blue */
  --accent:     #4a8fff;
  --accent-dim: #2563c7;
  --accent-glow:rgba(74,143,255,0.18);

  /* Secondary — cyan tint */
  --cyan:       #38c9e8;
  --cyan-dim:   #0e8fa8;

  /* Biology — green tint */
  --bio:        #34d399;
  --bio-dim:    #0f7a56;

  /* Physics — blue/purple */
  --phys:       #818cf8;
  --phys-dim:   #4338ca;

  /* Borders & lines */
  --line:       rgba(74,143,255,0.10);
  --line-strong:rgba(74,143,255,0.22);
  --line-hover: rgba(74,143,255,0.40);

  --radius:     6px;
  --radius-lg:  12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.45);
  --shadow-glow:0 0 40px rgba(74,143,255,0.08);
}

/* ---- Reset & Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  margin: 0;
  color: var(--paper);
  letter-spacing: -0.02em;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 18px; } }

/* ---- Background grain overlay ---------------------------- */
body::before {
  content: '';
  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.75' 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: 0;
}

/* ---- Header ---------------------------------------------- */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,14,26,0.88);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line-strong);
  transition: background .2s;
}
header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 1.1rem;
  color: var(--paper); text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-mark { width: 32px; height: 32px; flex: none; }
nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
nav a {
  text-decoration: none; color: var(--ink-dim); font-size: 0.9rem; font-weight: 500;
  padding: 7px 14px; border-radius: var(--radius);
  transition: color .15s, background .15s;
}
nav a:hover, nav a:focus-visible {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Mobile nav */
.nav-toggle { display: none; }
#nav-check  { display: none; }
@media (max-width: 760px) {
  nav ul {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line-strong);
    max-height: 0; overflow: hidden;
    transition: max-height .28s ease;
  }
  nav a { display: block; padding: 15px 22px; border-radius: 0; border-bottom: 1px solid var(--line); }
  #nav-check:checked ~ nav ul { max-height: 360px; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    cursor: pointer; width: 28px; padding: 6px 0;
  }
  .nav-toggle span { height: 2px; background: var(--paper); border-radius: 2px; transition: .2s; }
}

/* ---- Hero ------------------------------------------------ */
.hero {
  padding: 100px 0 80px; position: relative; overflow: hidden;
}
/* Radial glow in background */
.hero::before {
  content: '';
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(74,143,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 56px; align-items: center; position: relative; z-index: 1;
}
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
  background: var(--accent-glow);
  border: 1px solid rgba(74,143,255,0.25);
  padding: 6px 14px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.1; max-width: 15ch;
  background: linear-gradient(135deg, #eef3ff 0%, #7aacff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p.lead {
  color: var(--ink-dim); max-width: 48ch;
  margin-top: 22px; font-size: 1.05rem; line-height: 1.7;
}
.hero-cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-size: 0.95rem; font-weight: 600;
  padding: 13px 26px; border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all .2s ease;
  cursor: pointer; font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #080e1a;
  box-shadow: 0 0 24px rgba(74,143,255,0.35);
}
.btn-primary:hover {
  background: #6aaeff;
  box-shadow: 0 0 36px rgba(74,143,255,0.55);
  transform: translateY(-1px);
}
.btn-ghost {
  color: var(--ink);
  border-color: var(--line-strong);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Hero SVG art */
.hero-art { opacity: 0.9; }
.hero-art svg { filter: drop-shadow(0 0 32px rgba(74,143,255,0.15)); }

/* ---- Sections -------------------------------------------- */
section { padding: 80px 0; border-top: 1px solid var(--line); position: relative; }
.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  background: linear-gradient(120deg, #eef3ff 30%, #7aacff 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-head p { color: var(--ink-dim); margin-top: 14px; font-size: 1.02rem; }

/* ---- Sobre ----------------------------------------------- */
.sobre-grid {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 48px; align-items: start;
}
@media (max-width: 680px) { .sobre-grid { grid-template-columns: 1fr; } }
.monograma {
  width: 180px; height: 180px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.6rem; font-weight: 700;
  color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 40px rgba(74,143,255,0.12), inset 0 0 40px rgba(74,143,255,0.05);
}
.sobre-text p { color: var(--ink-dim); max-width: 64ch; }
.sobre-text p + p { margin-top: 16px; }

/* ---- Filtros -------------------------------------------- */
.filtros { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.filtro-grupo { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  font-size: 0.85rem; font-weight: 500; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink-dim);
  cursor: pointer; font-family: inherit;
  transition: all .15s ease;
}
.pill:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.pill[aria-pressed="true"] {
  background: var(--accent); color: #080e1a;
  border-color: var(--accent); font-weight: 700;
  box-shadow: 0 0 16px rgba(74,143,255,0.3);
}

/* ---- Cards Grid ------------------------------------------ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(74,143,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.card:hover {
  border-color: var(--line-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow), 0 0 30px rgba(74,143,255,0.08);
}

/* Tags */
.card .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--ink-dim); letter-spacing: 0.04em; text-transform: uppercase;
}
.tag.tag-biologia  { border-color: var(--bio-dim);  color: var(--bio);  background: rgba(52,211,153,0.07); }
.tag.tag-quimica   { border-color: var(--bio-dim);  color: var(--bio);  background: rgba(52,211,153,0.07); }
.tag.tag-fisica    { border-color: var(--phys-dim); color: var(--phys); background: rgba(129,140,248,0.08); }

.card h3 { font-size: 1.05rem; color: var(--paper); font-weight: 600; }
.card .desc { color: var(--ink-dim); font-size: 0.9rem; flex: 1; line-height: 1.6; }
.card .card-link {
  text-decoration: none; color: var(--accent);
  font-size: 0.9rem; font-weight: 600;
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
  transition: color .15s, gap .15s;
}
.card .card-link::after { content: '→'; transition: transform .15s; }
.card .card-link:hover { color: #6aaeff; }
.card .card-link:hover::after { transform: translateX(3px); }
.empty-msg { color: var(--ink-muted); font-style: italic; padding: 24px 0; }

/* ---- Exercícios / Tabs ----------------------------------- */
.tabs {
  display: flex; gap: 4px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.tab-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem; font-weight: 600;
  background: none; border: none; color: var(--ink-muted);
  padding: 10px 20px; cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color .15s, background .15s, border-color .15s;
}
.tab-btn:hover { color: var(--ink); background: rgba(74,143,255,0.05); }
.tab-btn[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(74,143,255,0.06);
}
.turma-panel { display: none; }
.turma-panel.active { display: block; }

.disciplina-col-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
}
@media (max-width: 680px) { .disciplina-col-wrap { grid-template-columns: 1fr; } }
.disciplina-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--paper); font-size: 1rem; font-weight: 600;
  margin: 0 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.lista-item {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
  transition: background .15s;
}
.lista-item .titulo { color: var(--ink); }
.lista-item .baixar {
  color: var(--accent); text-decoration: none;
  font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(74,143,255,0.3);
  transition: background .15s, border-color .15s;
}
.lista-item .baixar:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

/* ---- Simuladores ----------------------------------------- */
.sim-group { margin-bottom: 56px; }
.sim-group:last-child { margin-bottom: 0; }
.sim-group-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}
.sim-group-header h3 {
  font-size: 1.15rem; font-weight: 600;
  color: var(--accent);
}
.sim-group-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
.sim-card.disabled { opacity: 0.45; pointer-events: none; }
.sim-icon { width: 36px; height: 36px; color: var(--accent); }

/* Sim card without image — icon placeholder */
.sim-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(74,143,255,0.06), rgba(74,143,255,0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 80px;
  margin-bottom: 4px;
}
.sim-thumb-empty .sim-icon { width: 32px; height: 32px; }

.sim-status {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.sim-status.available { color: var(--bio); }

/* ---- Separador com decoração ---------------------------- */
.section-divider {
  width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  margin-bottom: 16px;
}

/* ---- Footer ---------------------------------------------- */
footer {
  border-top: 1px solid var(--line-strong);
  padding: 52px 0;
  background: var(--bg-soft);
  position: relative; overflow: hidden;
}
footer::before {
  content: '';
  position: absolute; bottom: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(ellipse, rgba(74,143,255,0.06), transparent 65%);
  pointer-events: none;
}
footer .wrap {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 24px; position: relative; z-index: 1;
}
footer .school { color: var(--ink-dim); font-size: 0.9rem; max-width: 38ch; }
footer .school strong {
  color: var(--paper); display: block; margin-bottom: 8px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
}
footer .links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
footer .links a {
  color: var(--ink-muted); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; transition: color .15s;
}
footer .links a:hover { color: var(--accent); }

/* ---- Scroll animation (fade-in) -------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ---- Reduced motion -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
