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

html, body{
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text-3);
  background: linear-gradient(120deg, var(--bg-1), var(--bg-2), var(--bg-3));
  background-size: 400% 400%;
  animation: gradientFlow 18s ease infinite;
}

#site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: scroll;
  height: 100vh;
}

main {
  flex: 1 0 auto;
}

/* NAVBAR */
.logo img {
  width: 200px;
}

.glass-nav .logo a::after {
  background: none;
}

.logo-mobile img {
  width: 50px;
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.glass-nav .logo-mobile a::after {
  background: none;
}

.glass-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  backdrop-filter: blur(1px) saturate(180%);
  background: var(--bg-5);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  transition: all 0.4s ease;
}

.glass-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.glass-nav a {
  color: var(--text-4);
  text-decoration: none;
  position: relative;
  font-weight: 600;
}

.glass-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transition: width 0.4s;
}

.glass-nav a:hover::after {
  width: 100%;
}

.glass-nav a.active::after {
  width: 100%;
}

.glass-nav a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  font-size: 3rem;
  background: none;
  border: none;
  color: var(--text-4);
  cursor: pointer;
}

/* Drawer */
.drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 280px;
  height: 100vh;
  background: var(--bg-5);
  backdrop-filter: blur(10px) saturate(160%);
  border-left: 1px solid var(--glass-border);
  padding: 2rem 1.5rem;
  transition: right 0.35s ease;
  z-index: 30;
}

.drawer.open {
  right: 0;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-4);
  font-size: 1.4rem;
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
}

.drawer-links {
  list-style: none;
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.drawer-links a {
  color: var(--text-4);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
}

.drawer-links a:hover {
  color: var(--accent);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 25;
}

.drawer-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

.drawer-links a.active::after {
  width: 100%;
}

.drawer-links a.active {
  color: var(--accent);
}


/* flex */
.bento-flex {
  padding: 120px 3rem 3rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  align-content: center;
  gap: 1.5rem;
}

/* CARDS */
.card.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;

  box-shadow:
    0 10px 28px var(--shadow-accent),
    0 4px 12px var(--shadow-depth),
    inset 0 1px 0 var(--shadow-glass-highlight);

  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card.glass:hover {
  transform: translateY(-6px);

  box-shadow:
    0 18px 45px var(--shadow-accent-strong),
    0 6px 16px var(--shadow-depth-strong),
    inset 0 1px 0 var(--shadow-glass-highlight-strong);
}

/* HERO */
.hero {
  flex: 1;
  display: block flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: 3rem;
  margin: 0;
  font-weight: 800;
}

.hero h2 {
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
}

.hero p {
  max-width: 520px;
  line-height: 1.7;
  opacity: 0.9;
  text-align: justify;
}

.section {
  scroll-margin-top: 110px;
}

/* BUTTONS */
.cta-row {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.btn {
  cursor: pointer;
  background-color: transparent;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.4s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: var(--text-on-accent);
}

.btn.ghost {
  border: 1px solid var(--glass-border);
  color: var(--text-3);
}

.btn:hover {
  transform: translateY(-3px);
}

/* FOOTER */
.footer {
  text-align: center;
  opacity: 0.85;
  font-size: 0.9rem;
  flex-shrink: 0;
  padding-bottom: 3rem;
}

.footer .socials {
  margin-bottom: 1rem;
}

.footer a {
  color: var(--text-3);
  margin: 0 0.8rem;
  text-decoration: none;
  opacity: 0.8;
}

.footer a:hover {
  opacity: 1;
}

/* Tablets */
@media (max-width: 1024px) {
  .bento-flex {
    /* grid-template-columns: repeat(2, 1fr); */
    padding: 100px 2rem 2rem;
  }

  .hero {
    /* grid-column: span 2; */
  }

  .glass-nav {
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .glass-nav ul.nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .glass-nav {
    padding: 1rem 1.5rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .glass-nav {
    flex-direction: row;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem;
  }

  .glass-nav ul {
    gap: 1.2rem;
  }

  .card.glass {
    padding: 1rem;
  }

  .bento-flex {
    /* grid-template-columns: 1fr; */
    padding: 140px 1rem 1.5rem;
  }

  .hero.project {
    /* grid-column: span 6; */
  }

  .hero {
    /* grid-column: span 1; */
  }

  .hero h1 {
    font-size: 2.2rem;
  }

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

  .cta-row {
    flex-direction: column;
  }

  .footer {
    font-size: 0.85rem;
  }
}