/* ===========================
   RESET & GLOBAL
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: white;
  height: 100vh;
  overflow-x: hidden;
  background: #000;

  /* Page fade animation (in + out) */
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* After page is ready -> fade IN */
body.loaded {
  opacity: 1;
}

/* When navigating away -> fade OUT */
body.fade-out {
  opacity: 0;
}

/* ===========================
   BACKGROUND
   =========================== */
.background {
  position: fixed;
  inset: 0;
  background: url("background.jpg") center center / cover no-repeat;
  z-index: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1;
}

/* ===========================
   PAGE LAYOUT
   =========================== */
.page {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px 60px;
}

/* ===========================
   NAVIGATION
   =========================== */
.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.links a {
  color: white;
  margin-right: 24px;
  text-decoration: none;
  font-size: 15px;
  position: relative;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #ffffff;
  transition: width 0.25s ease;
}

.links a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.links a:hover::after {
  width: 100%;
}

.active-link {
  opacity: 1;
}

.github-btn {
  padding: 6px 14px;
  border: 1px solid white;
  border-radius: 8px;
  font-size: 14px;
  display: inline-block;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.github-btn:hover {
  background: white;
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5);
}

/* ===========================
   HERO (HOME)
   =========================== */
.hero {
  text-align: center;
  margin-top: 60px;
  padding: 0 10px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  margin-bottom: 12px;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.9);
}

.hero p {
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 300;
  line-height: 1.7;
}

.hero a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===========================
   DISCORD CARD (HOME)
   =========================== */
.bottom {
  display: flex;
  justify-content: center;
  margin-bottom: 90px; /* raises the card higher */
}

.discord-card {
  background: rgba(5, 5, 5, 0.9);
  border-radius: 20px;
  padding: 18px;
  width: min(420px, 90vw);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.discord-card img {
  width: 100%;
  border-radius: 14px;
}

.discord-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.95);
}

/* ===========================
   CENTERED CARD PAGES
   (CONTACT & PROJECTS)
   =========================== */
.center-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding-bottom: 60px;
}

.card {
  background: rgba(8, 8, 8, 0.88);
  border-radius: 22px;
  padding: 30px 34px;
  width: min(820px, 95vw);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.card h1 {
  font-size: clamp(26px, 4vw, 32px);
  margin-bottom: 10px;
}

.subtitle {
  font-size: 15px;
  margin-bottom: 24px;
  opacity: 0.85;
}

.hint {
  font-size: 12px;
  margin-top: 8px;
  opacity: 0.7;
}

/* ===========================
   CONTACT CARD DETAILS
   =========================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.contact-block {
  background: rgba(18, 18, 18, 0.95);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-block h2 {
  font-size: 17px;
  margin-bottom: 8px;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  opacity: 0.7;
  letter-spacing: 0.06em;
}

.value {
  font-size: 14px;
  margin-bottom: 8px;
}

.value a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.bullet-list {
  list-style: none;
  margin-top: 8px;
  font-size: 14px;
}

.bullet-list li::before {
  content: "• ";
  color: #ffffff;
}

.tags {
  margin-top: 10px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 6px 6px 0;
}

/* ===========================
   PROJECTS CARD
   =========================== */
.projects-card .coming-soon {
  margin-bottom: 20px;
}

.pill {
  display: inline-block;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.project-teasers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 10px 0 14px;
}

.teaser {
  background: rgba(18, 18, 18, 0.95);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.teaser h2 {
  font-size: 15px;
  margin-bottom: 4px;
}

/* ===========================
   RESPONSIVE (TABLET / MOBILE)
   =========================== */
@media (max-width: 768px) {
  .page {
    padding: 18px 18px 26px;
    height: auto;
    min-height: 100vh;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .links {
    gap: 10px;
  }

  .links a {
    margin-right: 0;
    font-size: 14px;
  }

  .github-btn {
    margin-top: 2px;
  }

  .hero {
    margin-top: 40px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero p {
    font-size: 14px;
  }

  .bottom {
    margin-bottom: 40px;
  }

  .discord-card {
    width: 95%;
    padding: 14px;
  }

  .card {
    width: 96%;
    padding: 22px 20px;
  }

  .contact-grid,
  .project-teasers {
    grid-template-columns: 1fr;
  }
}

/* Even smaller phones (e.g. iPhone SE) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 13px;
  }

  .links a {
    font-size: 13px;
  }

  .discord-card {
    border-radius: 16px;
  }
}
