/* ===== Global Reset & Variables ===== */
:root {
  --bg: #F4F6F8;
  --card-bg: #ffffff;
  --text-main: #0A192F;
  --green: #00BFA6;
  --header-dark: #0A192F;
}

body.dark-mode {
  --bg: #050d1a;
  --card-bg: #112240;
  --text-main: #ffffff;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text-main);
  transition: 0.3s;
}

/* ===== Header (Aligned to match Index) ===== */
header {
  background: var(--header-dark);
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Vertically centers everything in header */
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .logo {
  max-height: 50px;
}

/* Flex container for Nav and Button */
.header-nav {
  display: flex;
  gap: 10px;
  /* Matching index page link spacing */
  align-items: center;
  /* Ensures links and button are perfectly aligned */
}

.header-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  /* Matched to index */
  padding: 8px 15px;
  transition: 0.3s;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--green);
}

/* Dark Mode Toggle (Rounded & Centered) */
.dark-mode-toggle {
  background: var(--green);
  color: white;
  border: none;
  padding: 8px 18px;
  /* Adjusted padding to match nav link height */
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  margin-left: 10px;
  /* Fixed spacing from last link */
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(0, 191, 166, 0.2);
  white-space: nowrap;
}

.dark-mode-toggle:hover {
  transform: translateY(-2px);
  background-color: #008f7a;
  box-shadow: 0 6px 15px rgba(0, 191, 166, 0.3);
}

/* ===== Main Container ===== */
.about-main {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

/* ===== Bio Card (The Card with the Photo) ===== */
.bio-card {
  display: flex;
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
  align-items: center;
}

.bio-image {
  flex: 1;
  min-width: 300px;
  padding: 20px;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 15px;
  filter: grayscale(20%);
  transition: 0.5s;
}

.profile-img:hover {
  filter: grayscale(0%);
  transform: scale(1.02);
}

/* ===== Bio Content Text ===== */
.bio-content {
  flex: 1.5;
  padding: 50px;
}

.bio-content h1 {
  font-size: 2.5rem;
  margin-bottom: 5px;
}

.role {
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

/* Social Tags/Buttons */
.social-tags {
  margin-top: 25px;
  display: flex;
  gap: 10px;
}

.social-tags a {
  text-decoration: none;
  background: var(--green);
  color: white;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
}

/* ===== Story Grid (Lower Boxes) ===== */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.story-box {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 15px;
  border-bottom: 4px solid var(--green);
}

.story-box h3 {
  margin-bottom: 15px;
  color: var(--green);
}

/* ===== Footer ===== */
footer {
  background: var(--header-dark);
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  margin-top: 50px;
}

footer a,
footer a:visited {
  color: var(--green) !important;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

footer a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ===== Mobile Hamburger & Menu ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.bar {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
}

/* ===== Responsive Mobile Styles ===== */
@media (max-width: 850px) {
  .bio-card {
    flex-direction: column;
  }

  .bio-content {
    padding: 30px;
    text-align: center;
  }

  .bio-image {
    width: 100%;
    padding: 20px;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: flex;
  }

  .header-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--header-dark);
    padding: 20px;
    gap: 15px;
  }

  .header-nav.active {
    display: flex;
  }

  .dark-mode-toggle {
    margin: 15px auto;
    width: fit-content;
  }
}