:root {
  --bg-0: #0b0b10;
  --bg-1: #0f1016;
  --fg-0: #e6e6f0;
  --fg-1: #b8b9c6;
  --brand: #8b5cf6; /* violet-500 */
  --brand-2: #22d3ee; /* cyan-400 */
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-0: #f6f7fb;
  --bg-1: #e9ecf5;
  --fg-0: #151723;
  --fg-1: #34384a;
  --card: rgba(20, 20, 35, 0.04);
  --border: rgba(20, 20, 35, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html, body {
  padding: 0;
  margin: 0;
  height: 100%;
  color-scheme: dark;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: var(--fg-0);
  background: radial-gradient(1000px 600px at 10% 10%, rgba(139, 92, 246, 0.18), transparent 60%),
              radial-gradient(900px 500px at 90% 20%, rgba(34, 211, 238, 0.16), transparent 55%),
              radial-gradient(1200px 700px at 50% 100%, rgba(139, 92, 246, 0.10), transparent 60%),
              linear-gradient(180deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
  animation: gradientShift 14s ease-in-out infinite alternate;
}

.theme-animating *, .theme-animating {
  transition: color 300ms ease, background-color 300ms ease, border-color 300ms ease, filter 300ms ease;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 0% 0%;
    filter: saturate(110%);
  }
  50% {
    background-position: 5% 2%, 95% 4%, 50% 98%, 0% 50%;
    filter: saturate(120%);
  }
  100% {
    background-position: 8% 4%, 92% 6%, 50% 96%, 0% 100%;
    filter: saturate(110%);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes imageIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.site {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeUp 600ms ease-out both;
}

.card {
  width: min(860px, 95vw);
  padding: 36px 32px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0);
  transition: transform 280ms ease, box-shadow 280ms ease;
  cursor: pointer;
}

.card::after {
  content: '';
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: conic-gradient(from 180deg at 50% 50%,
              rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.2), rgba(139, 92, 246, 0.2));
  filter: blur(40px) saturate(120%);
  opacity: 0.35;
  z-index: 0;
}

.card:hover {
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
}

.theme-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  color: var(--fg-0);
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

/* Modal */
.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
}

.modal-dialog {
  position: relative;
  margin: 6vh auto;
  width: min(1100px, 92vw);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  opacity: 0;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--fg-0);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.gallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  opacity: 0;
}

/* Ativa animações quando modal está visível */
#gallery-modal[aria-hidden="false"] .modal-backdrop {
  animation: backdropIn 220ms ease-out forwards;
}

#gallery-modal[aria-hidden="false"] .modal-dialog {
  animation: modalIn 260ms ease-out 60ms forwards;
}

#gallery-modal[aria-hidden="false"] .gallery img:nth-child(1) {
  animation: imageIn 260ms ease-out 120ms forwards;
}

#gallery-modal[aria-hidden="false"] .gallery img:nth-child(2) {
  animation: imageIn 260ms ease-out 200ms forwards;
}

#gallery-modal[aria-hidden="false"] .gallery img:nth-child(3) {
  animation: imageIn 260ms ease-out 280ms forwards;
}

@media (max-width: 840px) {
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery img {
    height: auto;
  }
}

.title {
  margin: 0 0 6px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--fg-1);
  font-weight: 400;
}

.content-text {
  position: relative;
  margin: 0;
  z-index: 1;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.7;
}

.read-more {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  transition: opacity 180ms ease, text-underline-offset 180ms ease, border-color 180ms ease;
  text-underline-offset: 2px;
}

.read-more:hover {
  opacity: 0.9;
  border-bottom-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 4px;
}

.footer {
  position: fixed;
  inset: auto 0 10px;
  display: grid;
  place-items: center;
  color: var(--fg-1);
  font-size: 12px;
  pointer-events: none;
}

@media (max-width: 480px) {
  .card {
    padding: 28px 22px;
  }
}


