/* =================================
   Root & Global Styles
================================= */
:root {
  --near-black: #0A0A0A;
  --pitch-black: #080808;
  --dark-overlay: linear-gradient(rgba(30, 30, 30, 0.6), rgba(5, 5, 5, 0.55555));
  --red-overlay: linear-gradient(rgba(20, 0, 0, 0.6), rgba(5, 0, 0, 0.55555));
  --blue-overlay: linear-gradient(rgba(0, 10, 10, 0.6), rgba(0, 2, 3, 0.55555));
  --dark-gray-border: solid 1px #333333;
  --light-gray: #B0B0B0;
  --vibrant-red: #FF4040;
  --hover: #FFFFFF;
  --vibrant-cyan: #00FFCC;
  --codystar: 'Codystar';
  --girassol: 'Girassol';
}

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

html {
  height: 100%;
}

body {
  background: var(--pitch-black);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Make sure your navbar and footer are not inside the wrapper */
.navbar, .footer {
    width: 100%; /* These will now span the full browser width */
}
/* =================================
   Typography & Links
================================= */
a,
a:visited {
  color: var(--vibrant-red);
  text-decoration: none;
}

/* Shared font styles for nav/headers */
#contact,
.nav-links,
.cat-nav,
.cat-font {
  font-family: var(--codystar);
  font-weight: bold;
}

.cat-nav,
.cat-font {
  color: var(--vibrant-red);
}

.cat-font {
  font-size: 35px;
  margin-left: auto;
}

.cat-nav {
  font-size: 20px;
  border: var(--dark-gray-border);
}

/* =================================
   Layout Utilities & Footer
================================= */

/* Shared flex properties */
.navbar-brand,
.body-photo,
.cli-header,
.ui-header,
.card-container {
  display: flex;
  align-items: center;
}

.footer {
  background: var(--dark-overlay);
  color: var(--vibrant-red);
  border-top: var(--dark-gray-border);
  text-align: center;
  font-family: var(--codystar);
  position: sticky;
  bottom: 0;
}

/* Fills remaining vertical space */
.body-fill {
  background: #0F0F0F;
  min-height: 0;
  flex: 1;
}

/* =================================
   Navigation
================================= */
.navbar,
.cat-header {
  background: var(--near-black);
  border-top: var(--dark-gray-border);
  border-bottom: var(--dark-gray-border);
  padding: 5px 15px;
  display: flex;
  align-items: center;
}

.navbar {
  position: fixed;
  top: 2px;
  width: 100%;
  height: 40px;
  justify-content: space-between;
  flex-wrap: nowrap;
  z-index: 1001; /* Ensure navbar is on top */
}

.navbar-brand {
  height: 100%;
  padding: 0;
  z-index: 1000;
}

.logo-img {
  height: 100%;
  width: auto;
  max-height: 100px;
  display: block;
}

#contact,
.nav-links {
  font-size: 20px;
  list-style: none;
  display: flex;
  align-items: center;
}

.nav-links {
  margin: 0 auto;
}

.nav-links li {
  margin: 0 30px;
}

.nav-links a {
  font-weight: bold;
}

.nav-links a:hover {
  color: var(--hover);
  /* White on hover */
}

.nav-links a.active {
  color: var(--vibrant-cyan);
  /* Vibrant cyan for active */
  text-decoration: overline underline;
  /* Clear visual indicator */
}

.hamburger {
  display: none;
  color: var(--light-gray);
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  z-index: 1002; /* Ensure hamburger is above other nav items */
}

/* =================================
   Page Sections
================================= */

/* General page header block */
.cat-header {
  height: 80px;
  padding: 60px 15px;
  margin-bottom: 0;
  justify-content: center;
}

/* Shared font for main content */
.profile-name,
.main-section,
.cli-section,
.ui-section {
  align-items: center;
  font-family: var(--girassol);
  color: var(--light-gray);
}

/* --- Profile Section --- */
.profile-name {
  margin-top: 40px;
  font-size: 30px;
  flex-direction: column;
  text-align: center;
}

.social-logo {
  color: white;
  max-width: 50%;
  height: 2vh;
}

.main-section {
  margin: 10px 20px;
  padding: 40px;
  font-size: 22px;
  text-align: justify;
  display: flex;
  background: var(--dark-overlay);
  border-bottom: 2px solid #151515;
  border-radius: 10px;
}

.body-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-right: auto;
}

.body-content {
  flex: 1;
}

.body-photo {
  margin: 0 auto;
}

.profile-photo {
  max-width: 250px;
  height: auto;
}

/* --- CLI & UI Shared Sections (MERGED) --- */
.cli-section,
.ui-section {
  margin: 0px 20px 10px;
  border-top: 2px solid #151515;
  border-bottom: 2px solid #151515;
  border-radius: 10px;
  padding: 40px;
  font-size: 22px;
  text-align: justify;
  max-width: 100vw;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Specific section backgrounds */
.cli-section {
  background: var(--red-overlay);
}

.ui-section {
  background: var(--blue-overlay);
}

.cli-header-text,
.ui-header-text {
  border-top: 1px solid white;
  margin: 0 auto;
  padding-bottom: 5px;
}

/* =================================
   Cards & Carousel
================================= */
.carousel-control-prev,
.carousel-control-next {
  top: 20%;
}

.carousel-inner {
  overflow: hidden !important;
  max-width: 40vw;
}


.carousel-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  padding: 0;
  z-index: 10;
  /* Above image */
}

.carousel-caption .card-container {
  margin: 0;
}

.carousel-caption .morse-card {
  /* Inherit all original .morse-card styles */
  width: 40vw;
  /* Match original */
  height: auto;
  /* Smaller for overlay to avoid covering entire image */
  padding: 10px;
  /* Match padding for consistency */
}

.cards {
  text-align: center;
  border-top: 2px solid #212121;
  padding-top: 10px;
  min-width: 0;
}

.card-description {
  /* Empty in original file, can be removed if unused */
}

/* --- Shared Card Styles --- */
.morse-card,
.tictactoe-card,
.krusty-card {
  background-size: cover;
  background-position: center;
  max-width: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--light-gray);
  transition: color 1s ease-in-out;
  padding: 1em;
}

.morse-card,
.tictactoe-card {
  width: 40vw;
  height: 70vh;
  border-top: 2px solid #212121;
  border-bottom: 2px solid #212121;
  border-radius: 100px;

}

.krusty-card {
  width: 40vw;
  height: 55vh;
  clip-path: circle();
  border: 1px solid #212121;
}

/* --- Specific Card Backgrounds --- */
.morse-card {
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/static/img/morse.svg');
}

.tictactoe-card {
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/static/img/tictactoe.svg');
}

.krusty-card {
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/static/img/krusty.svg');
}

/* --- Card Hover Effects --- */
.morse-card:hover,
.morse-card:active,
.tictactoe-card:hover,
.tictactoe-card:active,
.krusty-card:hover,
.krusty-card:active {
  color: var(--vibrant-red);
}

/* =================================
   Media Queries (Mobile)
================================= */
@media screen and (max-width: 600px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--near-black);
    position: absolute;
    top: 30px;
    left: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 10px 0;
    text-align: center;
  }

  .navbar {
    height: 30px;
    flex-direction: row;
  }

  .navbar-brand {
    height: 20px;
  }

  .logo-img {
    height: 100% !important;
    max-height: 30px !important;
  }

  .cat-header {
    padding: 20px 10px;
  }

  .body-container {
    display: block;
    width: 90vw;
    margin-left: auto;
    margin-right: auto;
  }

  .body-photo {
    justify-content: center;
  }

  .profile-photo {
    max-height: 100px;
  }

  .carousel-inner {
    overflow: hidden !important;
    max-width: 80vw;
  }
  .morse-card,
  .tictactoe-card,
  .krusty-card {
    width: 80vw;
  }
}
