/* Base reset & typography */

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

html {
  scroll-behavior: smooth;
}

/* Font imports */
@font-face {
  font-display: swap;
  font-family: "Poppins";
  font-style: italic;
  font-weight: 300;
  src: url("../fonts/poppins-v24-latin-300italic.woff2") format("woff2");
}
@font-face {
  font-display: swap;
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/poppins-v24-latin-regular.woff2") format("woff2");
}
@font-face {
  font-display: swap;
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  src: url("../fonts/poppins-v24-latin-800.woff2") format("woff2");
}

/* ==== REMOVE SCROLLBAR ==== */

*::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

:root {
  /* Light Theme (Default) */
  --bg-color: #fdfdfd;
  --surface-color: linear-gradient(0deg, #ffffff 95%, #f8f8f3);
  --surface-color-alt: #f5f5f5;
  --nav-bg-color: rgba(251, 251, 251, 0.3);
  --text-color: #1a1a1a;
  --text-color-light: #555;
  --border-color: #e0e0e0;

  /* Accent base color */
  --accent-base: hsl(257, 54%, 62%);
  --accent-color: var(--accent-base);
  --accent-color-hover: color-mix(in srgb, var(--accent-base) 80%, white 20%);

  --shadow-color: 0px 2px 4px rgba(0, 0, 0, 0.08);
  --input-bg-color: #ffffff;
  --input-text-color: #1a1a1a;
  --input-focus-border: var(--accent-color);
}

body.dark-mode {
  /* Dark Theme */
  --bg-color: oklch(42.393% 0.00005 271.152);
  --surface-color: #1e1e1e;
  --surface-color-alt: #2a2a2a;
  --nav-bg-color: rgba(30, 30, 30, 0.2);
  --text-color: #e8e8e8;
  --text-color-light: #b5b5b5;
  --border-color: #333;

  /* Accent dynamically shifted for dark contrast */
  --accent-color: color-mix(in srgb, var(--accent-base) 75%, white 25%);
  --accent-color-hover: color-mix(in srgb, var(--accent-base) 60%, white 40%);

  --shadow-color: 0px 2px 6px rgba(0, 0, 0, 0.5);
  --input-bg-color: #7c7c7c;
  --input-text-color: #f0f0f0;
  --input-focus-border: var(--accent-color);
}

/* ======================================================================= */

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3 {
  font-weight: 600;
}

/* General Purpose Button Style */
.btn {
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  border: 0;
  background-color: var(--text-color);
  font-size: 15px;
  color: var(--bg-color);
  transition: box-shadow 0.5s ease, transform 0.5s ease,
    background-color 0.5s ease;
}

.btn:hover {
  background-color: var(--accent-base);
  color: #fff;
  transform: scale(0.98);
}

/* Header & nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}
nav {
  max-width: 100%;
  width: 87.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2em 2em;
  margin: 0 auto;
}

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

.logo a {
  font-size: 1.75rem;
  text-decoration: none;
  color: var(--text-color);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5em;
  /* align-items: center; */
}
.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--accent-color);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  font-size: 1.2rem;
  padding: 0;
  transition: color 0.2s ease;
}
.theme-toggle-btn:hover {
  color: var(--accent-color);
}

/* Hero Section */

.hero-container {
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  max-width: 87.5rem;
  gap: 2rem;
  margin: 0 auto;
  padding: 2rem;
}

.hero-text h2 {
  font-size: 3rem;
}

.hero-text p {
  text-wrap: pretty;
  margin-bottom: 2rem;
}

.hero-text a {
  margin-top: 20rem;
}

.hero-img img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* =========== CARDS ==============*/

.container {
  padding: 2rem 0;
}
.container h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2em;
}
.wrapper {
  max-width: 87.5rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}
.card {
  border-radius: 1rem;
  box-shadow: var(--shadow-color);
  transition: box-shadow 0.5s ease, transform 0.5s ease;
}

.card:hover {
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
  transform: scale(0.98);
}

.card a {
  display: block;
  color: var(--input-text-color);
  text-decoration: none;
  position: relative;
}

.card h3 {
  border-radius: 1rem;
  font-size: 1.5rem;
  padding: 2rem 1rem;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  border: 1px solid var(--border-color);
  background-color: var(--nav-bg-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Makes images square and responsive */
  object-fit: cover;
  display: block;
  border-radius: 1rem;
}

/* Footer */

footer {
  text-align: center;
  padding: 1em 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-color-light);
  gap: 1rem;
}

footer a {
  color: var(--text-color-light);
  text-decoration: none;
}

/* Hamburger Menu */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  font-size: 1.5rem;
  z-index: 1001; /* Above the nav background */
}

/* Responsive breakpoints */
@media (max-width: 992px) {
  nav {
    padding: 0.3em 2em;
  }
}

@media (max-width: 768px) {
  .nav-main-links,
  .nav-social-links {
    display: none; /* Hide original nav links */
  }

  .header-container {
    padding: 0.1rem 1.5rem;
  }

  .hamburger-btn {
    display: block;
  }

  /* Optional hover feedback */
  .scroll-top__link:hover {
    background: var(--surface-color-alt);
  }

  /* When the 'responsive' class is applied by JavaScript */
  .header-container.responsive {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 1em;
    padding-top: 1em;
  }

  .header-container.responsive .logo {
    width: 100%;
    align-items: center;
    border-bottom: solid 1px var(--text-color);
  }

  .header-container.responsive .nav-main-links {
    display: block;
  }

  .header-container.responsive .nav-main-links .nav-links {
    flex-direction: column;
    gap: 0.5em;
    margin-top: 0.5rem;
  }

  .header-container.responsive .nav-social-links {
    display: block;
    margin-top: 0.5rem;
  }

  .header-container.responsive .nav-social-links .social-links {
    flex-direction: row;
    gap: 1rem;
  }

  /* ====== Hero Container ====== */

  .hero-container {
    grid-template-columns: 1fr;
    text-align: start;
    padding: 2rem;
  }
  .hero-img {
    grid-row: 1; /* Move image to the top on mobile */
    margin: 2rem 0 1.5rem 0;
  }

  .grid {
    display: flex;
    flex-direction: column;
  }
}

/* == SCROLL TO TOP == */

.scroll-top {
  position: absolute;
  top: 120vh;
  bottom: 1rem;
  right: 4rem;
}

.scroll-top__link {
  position: sticky;
  top: 90vh;
  text-decoration: none;
  border-radius: 100px;
  padding: 1rem;
  color: var(--text-color);
  font-weight: 700;
  background: var(--nav-bg-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  transition: background 0.3s ease;
  /* opacity: 0.5; */
}

.scroll-top__link:hover {
  background-color: var(--bg-color);
  transition: background 0.3s ease;
}

/* ----==== LIGHTBOX ===---- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  max-width: auto;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}
.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

:root {
  scroll-behavior: smooth;
}
main {
  position: relative;
}

.contact_test {
  display: flex;
  justify-content: center;
  align-items: center;
}
