/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}
/**********************************************************************************/
/* Theme Variables */
/**********************************************************************************/

:root {
  /* Light Mode Colors */
  --bg-color: #ececec;
  --bg-dk-color: #f2f2f2;
  --footer-color: #d6d6d6;
  --text-color: #000000;
  --primary-color: #238375;
  --secondary-color: #E04852;
  --card-bg: #E4E4E4;
  --card-border: #E04852;
  --pill-bg: #E04852;
  --pill-text: #000000;
  --hero-bg: #E4E4E4;
  --hero-text: #000000;
  --btn-bg: #E04852;
  --btn-text: #000000;
  --btn-hover-bg: transparent;
  --btn-hover-text: #E04852;
  --meta-text: #E04852;
}

body.dark-mode {
  --bg-color: #242424;
  --bg-dk-color: #25090c;
  --footer-color: #0d0304;
  --text-color: #d3d3d3;
  --primary-color: #5ECEBD;
  --secondary-color: #FFACB1;
  --card-bg: #0d0304;
  --card-border: #FFACB1;
  --pill-bg: #1f423d;
  --pill-text: #c1c1c1;
  --hero-bg: #323232;
  --hero-text: #FFFFFF;
  --btn-bg: #FFACB1;
  --btn-text: #000000;
  --btn-hover-bg: transparent;
  --btn-hover-text: #FFACB1;
  --meta-text: #FFACB1;
}

/**********************************************************************************/
/* Base Styles */
/**********************************************************************************/

body {
  display: flex;
  flex-direction: column;
  font-family: 'Noto Sans', sans-serif;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
}

body.dark-mode {
  /* fall back to the dark bg variable, then layer a subtle gradient to near-black */
  background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-dk-color) 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

main {
  flex: 1; /* Ensures main takes up available space */
}

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

/* Containers */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

/**********************************************************************************/
/* Footer */
/**********************************************************************************/

/* ensure footer is the stacking context and leaves room for the wave */
footer {
  position: relative;       /* required for absolute .footer-wave inside footer */
  z-index: 0;
  padding: 2rem 1rem 1rem; /* add half the wave height to top padding */
  background-color: var(--footer-color);
  text-align: center;
  margin-top: 2rem;
}

/* Footer - social links */
.footer-content .footer-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--text-color);
  background: transparent;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.footer-links a svg {
  width: 20px;
  height: auto;            /* allow SVG to scale proportionally */
  aspect-ratio: 1 / 1;     /* keeps it square in supporting browsers */
  display: block;
  fill: currentColor;
  vertical-align: middle;
}

.footer-links a:hover,
.footer-links a:focus {
  transform: translateY(-3px);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
  background: rgba(0,0,0,0.03);
  outline: none;
}

.footer-meta {
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--text-color) 70%, transparent);
  margin-top: 0.25rem;
}
.footer-meta a { color: var(--primary-color); }

/* ensure footer content sits above the wave */
footer .footer-content {
  position: relative;
  z-index: 2;
}

.footer-wave {
  position: absolute;
  top: -80px;               /* pull the wave up to overlap the previous section */
  left: 0;
  width: 100%;
  height: 80px;             /* control wave height */
  overflow: visible;
  line-height: 0;
  pointer-events: none;
  z-index: 1;
}
.footer-wave svg {
  display: block;
  width: 100%;
  height: 100%;
}

/**********************************************************************************/
/* Breadcrumbs - used on Case Studies and Artifacts landing pages */
/**********************************************************************************/

.breadcrumbs {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  border: none;
  padding: 0;
  gap: 0;
}

.breadcrumbs a {
  text-decoration: underline;
  border: none;
  padding: 0;
  text-decoration-color: var(--secondary-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  font-weight: normal;
}

.breadcrumbs a:hover {
  border: none;
  font-weight: bold;
  color: var(--accent-color); /* Optional: highlight color */
}

/**********************************************************************************/
/* Tag Pills - used on Case Studies landing page */
/**********************************************************************************/

.tag-pills {
  margin-bottom: 2rem;
}
.tag-pill {
  display: inline-block;
  background: var(--secondary-color);
  color: var(--btn-text);
  border: none;
  border-radius: 1rem;
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.tag-pill.active,
.tag-pill:hover {
  background: var(--accent-color);
  color: var(--btn-hover-text);
}

/**********************************************************************************/
/* Home hero - intro section */
/**********************************************************************************/

.hero h1, .hero h2, .hero p, .hero a {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}
.hero h1 { animation-delay: 0.1s; }
.hero h2 { animation-delay: 0.3s; }
.hero p  { animation-delay: 0.5s; }
.hero a  { animation-delay: 0.7s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode shadows */
body.dark-mode .card,
body.dark-mode .btn,
body.dark-mode nav .nav-container,
body.dark-mode #nav-container,
body.dark-mode #mobile-nav-container {
  box-shadow: 0 2px 12px rgba(186, 186, 186, 0.08);
}
body.dark-mode .card:hover,
body.dark-mode .btn:hover {
  box-shadow: 0 6px 24px rgba(191, 191, 191, 0.16);
}

/**********************************************************************************/
/* Logo Carousel - on homepage */
/**********************************************************************************/

body.dark-mode .logo-gallery-wrapper {
  display: none !important; /* hide in dark mode for now because the images are not optimized */
}

/* Logo gallery grid (static gallery, responsive) */
.logo-gallery-wrapper {
  margin: 2rem 0;
  padding: 0 0.25rem;
}

.logo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  background: transparent; /* light theme: transparent */
  border-radius: 12px;
}

/* dark mode: give gallery a subtle card background for contrast */
body.dark-mode .logo-gallery {
  background: color-mix(in srgb, var(--card-bg) 82%, rgba(0,0,0,0.12));
  box-shadow: 0 6px 18px rgba(0,0,0,0.14);
}

/* each logo cell */
.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  height: 80px;
  border-radius: 8px;
  background: transparent;
}

/* scale on small screens */
@media (max-width: 520px) {
  .logo-item {
    height: 56px;
    padding: 0.35rem;
  }
}

/* logo images */
.logo-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Hover visuals (no JS needed) */
body.resume-page .content .exp-item h3.company > a {
  transition: color 0.12s ease, transform 0.12s ease;
}
body.resume-page .content .exp-item h3.company > a:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
}

/*************************************************/
/***************Resume****************************/
/*************************************************/

/* Resume: enforce two-column grid for experience items (desktop) and full stack on mobile */
body.resume-page main.container .content .exp-item {
  display: grid !important;
  grid-template-columns: max-content 1fr; /* left = date column sized to content, right = content */
  column-gap: 1rem;
  row-gap: 0.25rem;
  align-items: start;       /* align date with company row */
  grid-auto-rows: auto;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed color-mix(in srgb, var(--text-color) 6%, transparent);
  width: 100%;
  box-sizing: border-box;
}

/* Date column (left) */
body.resume-page main.container .content .exp-item > .role-date {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;         /* keep date flush to the right edge of the left column */
  margin: 0;
  color: var(--primary-color);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  line-height: 1.25;
  align-self: center;
}

/* Company (linked) — top row, right column */
body.resume-page main.container .content .exp-item > h3.company {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  display: inline-block; /* keeps company on same row as date */
  vertical-align: middle;
}

/* company link underline and hover */
body.resume-page main.container .content .exp-item > h3.company a {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  color: inherit;
  transition: color 0.12s ease, transform 0.12s ease;
}
body.resume-page .content .exp-item h3.company a:hover,
body.resume-page .content .exp-item h3.company a:focus {
  color: var(--secondary-color) !important;
  transform: translateY(-2px);
  outline: none;
}

/* Role/title appears below the company and stands out a bit more */
body.resume-page .content .exp-item .role-title {
  grid-column: 2;
  grid-row: 2;
  margin: 0.15rem 0 0;
  font-size: 1.5rem;        /* slightly larger than company */
  font-weight: 700;
  color: var(--text-color);
}

body.resume-page .content .exp-item .talk-name {
  font-size: 1.2rem;
}

/* Content (clients, lists) flows in the right column below */
body.resume-page .content .exp-item p:not(.role-date),
body.resume-page .content .exp-item ul,
body.resume-page .content .exp-item ol {
  grid-column: 2;
  margin-top: 0.5rem;
}



/* Resume skill pills (scoped to resume page) */
body.resume-page .content .skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
}

body.resume-page .content .skill-list li {
  background: var(--pill-bg);
  color: var(--pill-text);
  border: 1px solid color-mix(in srgb, var(--text-color) 8%, transparent);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s;
}

/* hover/focus */
body.resume-page .content .skill-list li:hover,
body.resume-page .content .skill-list li:focus {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor: default;
}

/* optional: all-gray variant — add .gray to the UL for this */
body.resume-page .content .skill-list.gray li {
  background: color-mix(in srgb, var(--text-color) 6%, transparent);
  color: var(--btn-text);
  border: 1px solid color-mix(in srgb, var(--text-color) 8%, transparent);
  opacity: 0.95;
}
body.resume-page .content .skill-list.gray li:hover {
  transform: translateY(-2px);
  box-shadow: none;
  opacity: 1;
}

/* make pills wrap nicely on small screens */
@media (max-width: 760px) {
  body.resume-page .content .skill-list li {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Resume: wave divider spacing and sizing (uses same SVG include) */
body.resume-page .wave-divider--resume {
  margin: 2.5rem 0;        /* more breathing room between sections */
  width: 100%;
  line-height: 0;
  height: 48px;
}
body.resume-page .wave-divider--resume svg {
  height: 48px;
}
/* reduce visual weight on small screens */
@media (max-width: 760px) {
  body.resume-page .wave-divider--resume {
    margin: 1.5rem 0;
  }
  body.resume-page .wave-divider--resume svg {
    height: 36px;
  }
}
/*************************************************/
/*************** ARTIFACTS GALLERY ***********************/
/*************************************************/

/* Artifacts Gallery — Responsive Grid */
.cards.artifacts-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 0.25rem;
  box-sizing: border-box;
}

.cards.artifacts-gallery .card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.5rem;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-radius: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.cards.artifacts-gallery .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.cards.artifacts-gallery .card-thumb {
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--card-bg) 94%, transparent);
  margin-bottom: 0.5rem;
}
.cards.artifacts-gallery .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cards.artifacts-gallery h3 {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  text-align: center;
  font-weight: 700;
  color: var(--text-color);
}

/* Tablet: 2 columns */
@media (max-width: 1100px) {
  .cards.artifacts-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile: 1 column, smaller thumbs */
@media (max-width: 760px) {
  .cards.artifacts-gallery {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .cards.artifacts-gallery .card-thumb {
    height: 140px;
  }
}

/*************************************************/
/*************** CASE STUDIES List Page ***********************/
/*************************************************/

/* Case studies list: full-width rows with left thumbnail; stack on mobile */
.cards.case-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
}

.cards.case-list .case-item.card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--text-color) 4%, transparent);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.cards.case-list .case-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.cards.case-list .card-thumb {
  flex: 0 0 160px;
  width: 160px;
  height: 96px;
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, var(--card-bg) 92%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cards.case-list .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cards.case-list .card-content {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

/* Responsive: stack cards vertically on mobile */
@media (max-width: 760px) {
  .cards.case-list .case-link {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .cards.case-list .card-thumb {
    flex: none;
    width: 100%;
    height: 140px;
    margin-bottom: 0.75rem;
  }

  .cards.case-list .card-content {
    flex: none;
    width: 100%;
  }
}

/* Constrain images in article/content so they never exceed container */
.content img,
.article-hero {
  max-width: 100%;
  height: auto;
  display: block;
}

/* style for article hero */
.article-hero-wrap { text-align: center; margin: 0 0 1rem 0; }
.article-hero { border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }

/*************** DESKTOP NAVIGATION ***********************/

/* Navigation container */
nav .nav-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  margin: 1rem;
  padding: .5rem;
  border: 1px solid var(--card-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-radius: 100px;
}

/* Desktop Nav menu */
#nav-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: max-height 0.3s ease;
}

/* Hide mobile nav by default */
#mobile-nav-container {
  display: none;
  height: 0;
  overflow: hidden;
}

#mobile-nav-menu {
  display: none; /* Hide Mobile nav menu on desktop */
}

#mobile-mode-toggle {
  display: none; /* Hide Mobile nav on desktop */
}

#nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: fit-content; /* Shrinks to fit content */
  margin: 0 auto; /* Centers the container */
  margin-top: 1rem;
  border: 2px solid var(--card-bg);
  border-radius: 100px;
}

nav a {
  padding: 1rem;
  border-radius: 100px;
  color: var(--text-color);
  transition: all 0.3s ease;
}

nav a:hover {
  background: var(--bg-color);
  border: 2px solid var(--secondary-color);
}

nav a.active {
  background: var(--bg-color);
  border: 2px solid var(--secondary-color);
}

/* Theme Toggle */
.theme-toggle {
  width: 50px;
  height: 50px;
  border: none;
  background: var(--btn-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--btn-text);
  position: relative;
  transition: background 0.3s ease;
}

.theme-toggle .icon {
  position: absolute;
  color: inherit;
  width: 24px;
  height: 24px;
  stroke-width: 2;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.theme-toggle .sun {
  transform: rotate(0deg);
  opacity: 0;
}

.theme-toggle .moon {
  transform: rotate(90deg);
  opacity: 1;
}

body.dark-mode .theme-toggle .sun {
  transform: rotate(-90deg);
  opacity: 1;
}

body.dark-mode .theme-toggle .moon {
  transform: rotate(0deg);
  opacity: 0;
}


  
/*************** TYPOGRAPHY ***********************/

h1, h2, h3 {
  margin: 1rem 0 0.5rem;
}

h2 {
  color: var(--secondary-color);
  font-weight: 400;
}

p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

/* General content container styles */
.content {
  padding-top: 2rem;
  padding-bottom: 2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* Only style lists in content */
.content ul, .content ol {
  margin-left: 2rem;
  padding-left: 1rem;
}

.content li {
  margin-bottom: 0.5rem;
}

.content ul li::marker, .content ol li::marker {
  color: var(--secondary-color);
}

/******************* Wave Divider *********************/

.wave-divider {
  width: 100%;
  overflow: visible; /* allow the curve to render cleanly */
  margin: 1.5rem 0;  /* adjust vertical spacing as you like */
}
.wave-divider svg {
  display: block;
  height: 48px;      /* tweak to taste */
}

body:not(.subpage) .wave-divider {
  margin: 3.5rem 0;
}

/* Slightly tighter on small screens */
@media (max-width: 760px) {
  body:not(.subpage) .wave-divider {
    margin: 2rem 0;
  }
}

/*************** COMPONENTS ***********************/

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1rem;
  border-radius: 8px;
  background: var(--card-bg);
  transition: transform 0.2s ease, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.cards .card {
  /*border: 1px solid var(--card-border); */
  border-image: linear-gradient(90deg, var(--secondary-color), var(--accent-color)) 1;
  transition: box-shadow 0.2s;
}
.cards .card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Buttons */
.btn {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 0.8rem 1.5rem;
  margin: 1rem;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s;
}

.btn:hover {
  background: var(--btn-hover-bg);
  border: 1px solid var(--btn-bg);
  color: var(--btn-hover-text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
}

/* Hero Section */
.hero {
  color: var(--hero-text);
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  margin: 0 auto;
}

/* Resume iframe */
iframe, object {
  width: 100%;
  height: 800px;
  border: 1px solid var(--card-border);
}

/* Horizontal Rule - Divider in markdown */
hr {
  margin: 2.5rem 0;
  border: none;
  border-top: 2px solid var(--card-border);
}

/**********************************************************************************/
/*************** RESPONSIVE ***********************/
/**********************************************************************************/

@media(max-width: 600px) {
  nav ul {
    flex-direction: column;
    
    gap: 0;
    max-height: 0;
  }
  main {
    margin-top: 3rem; /* Adjust this value to match the height of the mobile nav bar */
  }
  .subpage main {
    margin-top: 0; /* Adjust this value to match the height of the mobile nav bar */
  }
}

@media (max-width: 760px) {
  html, body {
    overflow-x: hidden; /* hides any page-level overflow */
  }

  /* ensure top-level container doesn't exceed viewport */
  main.container,
  .container {
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* images and media scale down */
  img, video, .logo {
    max-width: 100%;
    height: auto;
    display: block;
  }
}

/**********************************************************************************/
/* MOBILE-NAV - Visible at < 600px width */
/**********************************************************************************/

@media (max-width: 600px) {
  /* Hide the desktop navigation */
  #nav-container {
    display: none;
  }

  /* Mobile Navigation Container */
  #mobile-nav-container {
    display: flex; /* Keeps hamburger and toggle separate */
    align-items: center; /* Keeps hamburger and toggle aligned in the middle of the row */
    justify-content: space-between; /* Keeps space between hamburger and toggle */
    position: fixed; /* Pin to the top of the viewport */
    top: 0;
    left: 0;
    width: 100%; /* Full width */
    background: var(--bg-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensure it appears above other elements */
    height: auto;
    overflow: visible;
  }

  /* Hamburger Button */
  #hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 1001; /* Ensure it stays above the nav menu */
    position: relative;
  }

  #hamburger span {
    display: block;
    width: 100%; /* Ensure spans stretch to the full width of the button */
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Hamburger Animation When Active */
  #hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
    top: 50%; /* Center the line vertically */
    left: 0;
    transform-origin: center; /* Rotate around the center */
  }
  #hamburger.active span:nth-child(2) {
    opacity: 0; /* Hide the middle bar */
  }
  #hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  position: absolute;
  top: 50%; /* Center the line vertically */
  left: 0;
  transform-origin: center; /* Rotate around the center */
  }

  /* Show mobile nav menu when container has .active or .mobile-visible */
  #mobile-nav-container.active #mobile-nav-menu,
  #mobile-nav-container.mobile-visible #mobile-nav-menu {
    display: flex;
  }

  /* Mobile Navigation Menu */
  #mobile-nav-menu {
    display: none; /* Hidden by default */
    top: 60px; /* Adjust to position below the mobile nav bar */
    overflow-y: auto; /* Add scrolling if the menu exceeds the viewport height */
    max-height: calc(100vh - 60px); /* Prevent it from exceeding the viewport height */
    list-style: none;
    background: var(--bg-color);
    flex-direction: column;
    position: absolute;
    top: 100%; /* Position below the mobile nav bar */
    overflow-x: hidden;
    left: 0;
    width: 100%; /* Full width */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999; /* Ensure it appears below the nav bar but above other content */
  }

  #mobile-nav-menu li {
    width: 100%;
  }

  #mobile-nav-menu a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    color: var(--text-color);
    border-radius: 0;
    text-align: left;
    transition: background 0.3s ease;
  }

  #mobile-nav-menu a:hover {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid var(--secondary-color);
  }

  /* Show Mobile Navigation When Active */
  #mobile-nav-container.mobile-visible #mobile-nav-menu {
    display: flex;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  }

  /* Mobile Theme Toggle */
  #mobile-mode-toggle {
    width: 50px;
    height: 50px;
    border: none;
    background: var(--btn-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
  }
}

/**********************************************************************************/
/* RESUME - Responsive: collapse to single column on small screens — fully stacked */
/**********************************************************************************/

@media (max-width: 760px) {
  body.resume-page main.container .content .exp-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  /* date becomes the first row, full width */
  body.resume-page main.container .content .exp-item > .role-date {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: none;
    white-space: normal;
    margin-bottom: 0.35rem;
  }

  /* company then role then content flow naturally below */
  body.resume-page main.container .content .exp-item > h3.company {
    grid-column: 1;
    grid-row: 2;
    display: block;
    margin-bottom: 0.15rem;
  }
  body.resume-page main.container .content .exp-item > .role-title {
    grid-column: 1;
    grid-row: 3;
    display: block;
    margin-top: 0;
  }

  body.resume-page main.container .content .exp-item > p:not(.role-date):not(.role-title),
  body.resume-page main.container .content .exp-item > ul,
  body.resume-page main.container .content .exp-item > ol {
    grid-column: 1;
    margin-top: 0.5rem;
  }
}