/* === Color Variables === */
:root {
  --bg-dark: #1e1e1e;
  --text-light: #e0f7fa;
  --highlight: #3E5F64; /* Teal Gray */
  --bg-drafting-paper: #babbba;    /* or tweak: #e9f0ec or #dde5e0 */
  --text-graphite: #2d393a;        /* softer than black */
  --light-card-bg: #c4c5c4;
  --worklight-bg: #dde2dd;        /* Not pure white. Pale, with a touch of gray/green */
  --worklight-card: #c7c7c7;      /* Even lighter for cards or modals */
  --worklight-text: #27332f;      /* Nearly black, but soft */
  --worklight-highlight: #497079; /* Slightly softer teal-gray for borders, etc */
  --worklight-faint: #9ab1aa; 
}

html {
  font-size: 16px; /* Prevents unexpected scaling on tablets */
}


/* Force body to always fill full height */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}


/* Content wrapper that fills available space and pushes footer */
#page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* === Global Styles === */
body {
  font-family: 'IBM Plex Mono', monospace;
  background-color: var(--bg-dark);
  color: var(--text-light);
  margin: 0;
  padding: 0 2rem 2rem 2rem;
  line-height: 1.6;
  background-image: 
    linear-gradient(0deg, rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 20px 20px;
}


img {
  max-width: 100%;
  display: block;
}

/* === Title Block Wrapper === */
.titleblock-wrapper {
  position: relative;
  border: 2px solid var(--highlight);
  padding: 0.5rem;
  margin: 2rem auto;
  background: var(--bg-dark);
  max-width: 900px;
}

.titleblock-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 33.33%;
  width: 1px;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}

.titleblock-wrapper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}


/* === Title Block Grid === */
.titleblock-grid {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(200px, 2fr) minmax(150px, 1.5fr) minmax(120px, 1fr);
  grid-template-rows: auto auto auto;
  gap: 1px;
  background: var(--highlight);
}

.titleblock-grid > div {
  padding: 0.75rem 1rem;
  background: #2a2a2a;
  border: 1px solid var(--highlight);
  font-size: 0.9rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
}

/* === Specific Grid Areas === */
.show-title {
  grid-column: 1 / 5;
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  justify-content: center;
  background-color: var(--bg-dark);
  color: white;
}

.venue-name {
  grid-column: 1 / 2;
  font-weight: bold;
}

.draft-title {
  grid-column: 2 / 5;
  font-style: italic;
}

.company-logo {
  grid-column: 1 / 2;
  grid-row: 3 / 6;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.company-logo img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 2px solid var(--highlight);
  border-radius: 4px;
}

.scenic-designer {
  grid-column: 2 / 3;
}

.date {
  grid-column: 3 / 4;
}

.director {
  grid-column: 2 / 3;
}

.lighting-designer {
  grid-column: 2 / 3;
}

.drawing-num {
  grid-column: 4 / 5;
  grid-row: 4 / 6;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.drawing-num .dnumber {
  font-size: 2rem;
  font-weight: bold;
  color: #ffffff;
}

.drawing-num .page-count {
  font-size: 0.8rem;
  color: #a0d8de;
}

/* === About Section === */
.about {
  margin-top: 2rem;
}

.about h2 {
  font-size: 1.5rem;
  color: #ffffff;
}

.about p {
  color: #cccccc;
}

.cta-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--highlight);
  text-decoration: none;
}

.cta-link:hover {
  text-decoration: underline;
}

/* === Footer === */
footer {
  margin-top: 4rem;
  border-top: 1px solid #444;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #777;
}

/* === Responsive === */
@media (max-width: 768px) {
  .titleblock-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto auto auto;
  }

  .show-title {
    grid-column: 1 / 3;
  }

  .venue-name,
  .draft-title,
  .scenic-designer,
  .director,
  .lighting-designer,
  .date,
  .drawing-num,
  .company-logo {
    grid-column: 1 / 3;
    justify-content: center;
    text-align: center;
  }

  .company-logo img {
    width: 80px;
    height: 80px;
  }

  .drawing-num {
    grid-row: auto;
  }

  .titleblock-grid .worklight {
    grid-column: 2 / 3;
    grid-row: 11 / 13; /* or wherever you want it vertically */
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #2a2a2a; /* match other tiles */
    border: 1px solid var(--highlight);
    display: flex;
    max-width: 100%;
    overflow: hidden;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    box-sizing: border-box;
  }
}

/* === Corner Markers === */
.titleblock-wrapper {
  position: relative;
}

/* Top-left */
.titleblock-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--highlight);
  border-left: 2px solid var(--highlight);
}

/* Top-right */
.titleblock-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: auto;
  right: 0;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--highlight);
  border-right: 2px solid var(--highlight);
}


/* Bottom-left */
.titleblock-wrapper .corner-bl {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--highlight);
  border-left: 2px solid var(--highlight);
}

/* Bottom-right */
.titleblock-wrapper .corner-br {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid var(--highlight);
  border-right: 2px solid var(--highlight);
}

.featured-projects {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--text-light);
}

.featured-projects h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--highlight);
  border-bottom: 2px solid var(--highlight);
  padding-bottom: 0.5rem;
}

.project-category {
  margin-bottom: 2rem;
}

.project-category h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #e0f7fa;
  border-left: 4px solid var(--highlight);
  padding-left: 0.5rem;
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-card {
  flex: 1 1 200px;
  max-width: 280px;
  background-color: #2a2a2a;
  border: 1px solid var(--highlight);
  border-radius: 4px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.project-card img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.project-card h4 {
  margin: 0.5rem 0 0.2rem;
  font-size: 1rem;
  color: #fff;
}

.project-card p {
  font-size: 0.85rem;
  color: #ccc;
}

.site-footer {
  background-color: #111;
  color: #aaa;
  padding: 1rem 2rem;
  font-size: 0.9rem;
  border-top: 1px solid var(--highlight);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a {
  color: #87cfdc;
  margin: 0 0.5rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--highlight);
  text-decoration: underline;
}

.site-nav {
  background-color: #1b1b1b;
  border: 2px solid var(--highlight);
  text-align: center;
  margin-bottom: 2rem;
  background-clip: padding-box;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(2px);
  padding-top: 0rem;
  scroll-padding-top: 0rem;
}

.site-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #1b1b1b;
  z-index: -1;
}


.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem;
  display: inline-flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav li {
  display: inline;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-light);
  font-family: var(--font-sans);
  font-size: 1rem;
  position: relative;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 4px;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background-color: var(--highlight);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: right;
}

.site-nav a:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--highlight);
}


html {
  scroll-behavior: smooth;
}

/* Fade page system */
.page-section {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}


.page-section.active {
  display: block;
  opacity: 1;
}

/* Base style for each page section */
.page-section {
  padding: 2rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  color: var(--text-light);
  background-color: var(--bg-dark);
  border-left: 2px solid var(--highlight);
  border-right: 2px solid var(--highlight);
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.1);
}

/* Section titles */
.page-section h2 {
  font-family: var(--font-display, 'Architects Daughter', sans-serif);
  font-size: 2rem;
  color: var(--highlight);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--highlight);
  padding-bottom: 0.5rem;
}

.section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.section * {
  max-width: 100%;
  overflow-x: auto;
  word-break: break-word;
}

/* Subgroup headers like "Educational" / "Community" */
.section-subgroup h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #ccc;
  font-weight: 500;
  border-bottom: 1px solid #444;
  padding-bottom: 0.25rem;
}

/* Responsive adjustments for tablets/phones */
@media (max-width: 768px) {
  .page-section {
    padding: 1rem;
    max-width: 100%;
    margin: 0 auto;
    color: var(--text-light);
    background-color: var(--bg-dark);
    border-left: none;
    border-right: none;
    box-shadow: none;
    box-sizing: border-box;
  }

  .page-section h2 {
    font-size: 1.4rem;
    text-align: center;
  }

  .section-subgroup h3 {
    font-size: 1.1rem;
    text-align: center;
  }
}


.section-container {
  max-width: 100%;
  width: 100%;
  padding: 0 1rem; /* give it breathing room on mobile */
  box-sizing: border-box;
}


/* Page wrapper makes sure footer is pushed to bottom if content is short */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main grows to fill the available space */
#main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0;
}

.site-nav.stuck ul {
  padding-top: 0;
}

/* Footer sticks to bottom when content is short, but scrolls naturally when content is tall */
.site-footer {
  background: var(--bg-darker, #111);
  color: var(--text-light);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  border-top: 1px solid var(--highlight);
}

/* Resume Section Buttons – Clear Border, No Glow */
.resume-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  align-items: center;
}

#view-resume,
.button-link {
  background-color: var(--text-light);
  color: var(--bg-dark);
  border: 2px solid var(--highlight); /* More defined border */
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  box-shadow: none; /* No glow */
}

#view-resume:hover,
.button-link:hover {
  background-color: var(--highlight);
  color: var(--text-light);
  border-color: var(--text-light); /* Slight inverse for hover pop */
  cursor: pointer;
}

#view-resume:active,
.button-link:active {
  transform: translateY(1px);
}

/* Resume Modal Styling */
.modal-resume {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-height: 100%;
  position: relative;
  width: 100%;
  max-width: 90vh;
  max-height: 90vh;
  margin: 3rem auto;
  background-color: var(--bg-dark);
  border: 2px solid var(--highlight);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-radius: 10px;
  background: #222;
  padding: 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  color: #f0f0f0;
  gap: 1.5rem;
}

.modal-content iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background-color: #111;
}

.close-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  font-size: 2rem;
  color: var(--highlight);
  cursor: pointer;
  z-index: 1000;
  padding: 0.25rem;
}

/* Resume Modal Transitions */
#resume-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 20, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

#resume-modal.show {
  opacity: 1;
  pointer-events: auto;
}

#resume-modal.fade-out {
  opacity: 0;
  pointer-events: none;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
}

.resume-buttons button,
.button-link {
  background-color: var(--text-light);
  color: var(--bg-dark);
  border: 2px solid var(--highlight);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font-sans, inherit);
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  margin: 0.5rem;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: inline-block;
}

.resume-buttons button:hover,
.button-link:hover {
  background-color: var(--highlight);
  color: var(--bg-dark);
  transform: scale(1.02);
}

.resume-disclaimer {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 1.5rem;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.resume-disclaimer a {
  color: var(--highlight);
  text-decoration: underline;
}

.resume-updated {
  font-size: 0.75rem;
  color: var(--text-faint);
  position: absolute;
  bottom: 1rem;
  right: 2rem;
  opacity: 0.6;
}

#resume {
  position: relative; /* Needed for .resume-updated positioning */
  min-height: 200px;
  padding-bottom: 3rem; /* So footer doesn’t overlap */
}

.contact-info {
  margin-top: 1.5rem;
  line-height: 1.8;
}

.contact-info a {
  color: var(--highlight);
  text-decoration: none;
  font-weight: 500;
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.contact-icons img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s ease;
}

.contact-icons img:hover {
  transform: scale(1.1);
  filter: brightness(0.8) invert(1);
}

.contact-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1rem;
}

.contact-row p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-light);
}

.contact-row a {
  color: var(--highlight);
  text-decoration: none;
  font-weight: 500;
}

.contact-row a:hover {
  text-decoration: underline;
}

.contact-icons {
  display: flex;
  gap: 1.5rem;
}

.contact-icons img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s ease;
}

.contact-icons img:hover {
  transform: scale(1.1);
  filter: brightness(0.8) invert(1);
}

#aboutme p + p {
  margin-top: 1.2rem;
}

#aboutme {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-top: 2rem;
}

#aboutme p {
  font-family: 'Georgia', serif;
}

.bionic-toggle {
  margin-bottom: 1.5rem;
  text-align: right;
  font-size: 0.9rem;
  color: var(--text-light);
}

.bionic-toggle label {
  margin-right: 0.5rem;
}

#bionic-switch {
  transform: scale(1.2);
  cursor: pointer;
}

.about-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  gap: 1rem;
}

.about-header h2 {
  margin: 0;
}

.bionic-toggle {
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
}

.bionic-toggle label {
  margin-right: 0.5rem;
}

#bionic-switch {
  transform: scale(1.1);
  cursor: pointer;
}

.about-divider {
  border: none;
  border-top: 2px solid var(--highlight);
  margin: 0.5rem 0 1.5rem;
  width: 100%;
}

#aboutme h2 {
  border-bottom: none;
  padding-bottom: 0;
}

.bionic-switch-wrapper {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
  gap: 0.5rem;
  position: relative;
  user-select: none;
}

.bionic-switch-wrapper input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.bionic-slider {
  width: 34px;
  height: 18px;
  background-color: #555;
  border-radius: 999px;
  position: relative;
  transition: background-color 0.3s;
  cursor: pointer;
}

.bionic-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background-color: var(--text-light);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

/* When checked, move the toggle */
.bionic-switch-wrapper input:checked + .bionic-slider {
  background-color: var(--highlight);
}

.bionic-switch-wrapper input:checked + .bionic-slider::before {
  transform: translateX(16px);
}

#aboutme.page-section {
  margin-top: 0 !important;
}



/*PROJECT CARDS */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

/* Tablet: 2 columns */
@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phone: 1 column */
@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Placeholder styling */
.project-card.empty {
  visibility: hidden;
  pointer-events: none;
}

/* Hide placeholder on tablets and smaller */
@media (max-width: 900px) {
  .project-card.empty {
    display: none;
  }
}


.project-card {
  display: flex;
  flex-direction: column;
  background-color: #1a1a1a;
  border: 1px solid var(--highlight);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  height: 300px;
  transition: transform 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  flex-shrink: 0;
}

.project-info {
  flex-grow: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.project-info h4 {
  margin: 0;
  color: var(--highlight);
  font-size: 1rem;
}

.project-info p {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #ccc;
}

.view-details {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  text-align: center;
  padding: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 0.85rem;
  border-top: 1px solid var(--highlight);
}

.project-card:hover .view-details {
  opacity: 1;
}

.project-card.empty {
  visibility: hidden;
  pointer-events: none;
}

.project-role {
  font-style: italic;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9em;
  color: #cfcfcf;
  background-color: #1a1a1a;
  padding: 0.25em 0.5em;
  border: 1px solid #333;
  border-radius: 4px;
  display: inline-block;
  margin-top: 0.5em;
}

.project-meta {
  color: #888;
  font-size: 0.8em;
  margin-top: 0.25em;
  letter-spacing: 0.3px;
}

.project-thumb {
  width: 100%;
  height: auto;
  border: 2px solid #2d3a3f;
  border-radius: 4px;
  margin-bottom: 0.75em;
  box-shadow: 0 0 4px rgba(0, 255, 255, 0.05);
  transition: border-color 0.3s ease;
}

.project-card:hover .project-thumb {
  border-color: #4dd0e1;
}

.section-label {
  grid-row: span 2;
  background-color: var(--highlight);
  color: var(--paper);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: url('assets/blueprint-texture.png') repeat;
  opacity: 0.03; /* <-- Adjust this to make it more or less visible */
  pointer-events: none;
  z-index: -1;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.modal-slideshow img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;  /* ✅ Shows entire image with letterboxing if needed */
  display: block;
  margin: auto;
}

.modal-details h2 {
  margin-top: 0.5rem;
  font-size: 2rem;
  border-bottom: 1px solid #444;
  padding-bottom: 0.5rem;
}

.modal-role,
.modal-venue,
.modal-credit,
.modal-desc {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #ccc;
}

.close-button {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: #f0f0f0;
}

.project-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.project-modal.active {
  display: flex;
}

.modal-slideshow img.slide {
  display: none;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  margin:auto;
  transition: opacity 0.5s ease-in-out;
}

.modal-slideshow img.slide.active {
  display: block;
}

.slideshow-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 10px;
  z-index: 2;
  pointer-events: none;
}

.slideshow-controls button {
  pointer-events: all;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 1.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
}

.slideshow-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-slideshow-wrapper {
  flex-shrink: 0;
  height:300px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 1rem auto;
  border: 2px solid var(--accent-color, #00aaff); /* theme-able border */
  border-radius: 8px;
  background-color: #111;
  overflow: hidden;
  position: relative;
  display: flex;
}

.modal-slideshow {
  width: 100%;
  max-width: 600px;
  height: 300px;
  margin: 0 auto 1rem;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* ✅ This prevents it from shrinking */
  background-color: #111; /* Or whatever makes it look clean */
}


@media (max-width: 768px) {
  .slideshow-controls {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  z-index: 2;
}

  .slideshow-controls button {
    font-size: 2rem;
    padding: 0.25rem 0.75rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
  }

  .modal-slideshow {
    flex-shrink: 0;
    height: 200;
    max-width: 400px;
    width: 100%;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    display: flex;
  }

  .modal-slideshow img.slide {
    max-width: auto;
    max-height: 200;
    object-fit: contain;
    display: none;
    transition: opacity 0.5s ease-in-out;
  }

  .modal-slideshow img.slide.active {
    display: block;
  }

  .slide-prev {
    position: absolute;
    left: 10px;
  }

  .slide-next {
    position: absolute;
    right: 10px;
  }
}


.modal-info {
  overflow-y: auto;
  padding: 1rem;
  flex-grow: 1;
  min-height: 0;
  font-size: 0.95rem;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-color);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.modal-section {
  margin-top: 1.2rem;
  line-height: 1.6;
}

.modal-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--accent-color, #4fc3f7); /* light blue by default */
}

.modal-section.yours ul,
.modal-section.team ul {
  list-style: none;
  padding-left: 0;
}

.modal-section.yours li::before {
  content: "★ ";
  color: gold;
}

.modal-section.team li::before {
  content: "– ";
  color: #aaa;
}

.modal-section.details p {
  margin: 0.2rem 0;
  color: #ccc;
}

.modal-section.writeup h4 {
  margin-bottom: 0.4rem;
}

.modal-section.writeup p {
  text-align: justify;
}

.modal-content > .modal-slideshow {
  flex-shrink: 0;
}

.modal-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}
.modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.modal-section.team ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5em;
}

.modal-section.team li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95em;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1); /* optional for a subtle line */
  padding: 2px 0;
}

.modal-section.team .credit-title {
  flex: 0 0 auto;
  padding-right: 1em;
  color: #ccc;
  list-style: none;
}

.modal-section.team .credit-name {
  flex: 1;
  text-align: right;
  color: #fff;
  list-style: none;
}

.sub-note {
  font-size: 0.75rem;
  font-weight: normal;
  color: #999;
  margin-left: 10px;
}

.mobile-exit-btn {
  display: none; /* Hidden by default */
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10000;
  background-color: var(--highlight); /* or whatever color you want */
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.8rem;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Show only on small screens */
@media (max-width: 768px) {
  .mobile-exit-btn {
    display: block;
  }
}


/* --- Resume Modal Specific Styles --- */
.resume-modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.resume-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.resume-modal.fade-out {
  opacity: 0;
  pointer-events: none;
}

.resume-modal-content {
  position: relative;
  width: 90%;
  height: 90%;
  background: #1a1a1a;
  border: 2px solid var(--highlight);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.resume-iframe {
  width: 100%;
  height: 100%;
  border: none;
  flex: 1;
}

.resume-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 2rem;
  color: var(--highlight);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.worklight {
  grid-column: 4 / 5;
  grid-row: 3 / 4;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

@media (max-width: 600px) {
  .modal-section.team ul {
    padding: 0;
    margin: 0 0 1.5rem 0;
    list-style: none;
  }

  .modal-section.team li {
    display: grid;
    grid-template-columns: 1fr max-content;
    align-items: start;
    gap: 0.75em;
    width: 100%;
    padding: 0.15em 0;
  }

  .credit-title {
    grid-column: 1;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .credit-name {
    grid-column: 2;
    text-align: right;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    min-width: 0;
  }
}


/* --- testing --- */
@media (max-width: 768px) {
  .modal-section.team li::before {
    content: none !important;
  }
  .modal-section.team li::after {
    content: none !important;
  }
  .modal-section.team li {
    border-bottom: 1px dotted #aaa;
  }
  .modal-section.team li:last-child {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .nav-links.pill-scroll {
    display: flex !important;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.6rem;
    scrollbar-width: thin;
    scrollbar-color: var(--highlight) transparent;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    width: 100%;
    box-sizing: border-box;
    background: none;
    margin: 0;
    position: relative;
  }
  .nav-links.pill-scroll li {
    flex: 0 0 auto;
    display: block;
  }
  .nav-links.pill-scroll a {
    display: inline-block;
    background: #232d2e;
    color: var(--text-light);
    border: none;
    border-radius: 999px;
    padding: 0.48rem 1.15rem;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.18s, color 0.18s, box-shadow 0.2s;
    white-space: nowrap;
    margin: 0;
    box-shadow: 0 2px 8px rgba(62,95,100,0.10);
    outline: none;
    letter-spacing: 0.5px;
  }
  .nav-links.pill-scroll a:hover,
  .nav-links.pill-scroll a:focus {
    background: var(--highlight);
    color: #fff;
    box-shadow: 0 0 0 2px var(--highlight), 0 2px 8px rgba(62,95,100,0.14);
  }
  .nav-links.pill-scroll a.active,
  .nav-links.pill-scroll a[aria-current="page"] {
    background: var(--highlight);
    color: #fff;
    box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(62,95,100,0.20);
  }
}

@media (max-width: 768px) {
  /* Optional: Always show scroll bar for mobile nav */
  .nav-links.pill-scroll::-webkit-scrollbar {
    height: 6px;
  }
  .nav-links.pill-scroll::-webkit-scrollbar-thumb {
    background: var(--highlight);
    border-radius: 6px;
  }
  .nav-links.pill-scroll::-webkit-scrollbar-track {
    background: transparent;
  }
}

.worklight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-direction: row;
  width: 100%;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.worklight-label {
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #e0f7fa;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worklight-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  min-width: 34px;
  min-height: 18px;
  margin: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.worklight-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.worklight-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #444;
  border-radius: 999px;
  transition: background 0.3s;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
}

.worklight-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  background: #e0f7fa;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

.worklight-switch input:checked + .worklight-slider {
  background: var(--highlight);
}

.worklight-switch input:checked + .worklight-slider::before {
  transform: translateX(16px);
  background: #fffbea;
}

/* Focus ring for accessibility */
.worklight-switch input:focus + .worklight-slider {
  outline: 2px solid #4dd0e1;
  outline-offset: 2px;
}

/* Responsive: Stack pill under label on mobile */
@media (max-width: 600px) {
  .worklight {
    flex-direction: column;
    gap: 0.7rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }
}

.titleblock-grid .worklight {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  padding: 0 0.5rem;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.worklight-label {
  font-size: 1em;
  color: #e0f7fa;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worklight-switch {
  display: inline-block !important;
  width: 34px !important;
  height: 18px !important;
  min-width: 34px !important;
  min-height: 18px !important;
  flex-shrink: 0;
  vertical-align: middle;
}

.worklight-slider {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #444;
  transition: background 0.3s;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

.worklight-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.worklight-switch .worklight-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  background: #e0f7fa;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}

.worklight-switch input:checked + .worklight-slider {
  background: var(--highlight);
}
.worklight-switch input:checked + .worklight-slider::before {
  transform: translateX(16px);
  background: #fffbea;
}

/* MOBILE: stack vertically */
@media (max-width: 600px) {
  .titleblock-grid .worklight {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }
}


/* -- WORKLIGHT CSS --*/
body.worklight-on .page-section,
body.worklight-on .featured-projects,
body.worklight-on .resume-modal-content,
body.worklight-on .project-modal .modal-content,
body.worklight-on .project-card,
body.worklight-on .modal-info,
body.worklight-on .modal-section,
body.worklight-on .project-info {
  background: var(--bg-drafting-paper) !important;
  color: var(--text-graphite) !important;
  border-color: var(--highlight) !important;
  font-family: 'IBM Plex Mono', monospace !important;
}

body.worklight-on .project-card,
body.worklight-on .project-info,
body.worklight-on .project-role,
body.worklight-on .project-meta {
  background-color: var(--light-card-bg) !important;
  color: var(--text-graphite) !important;
}

body.worklight-on .modal-content,
body.worklight-on .modal-section,
body.worklight-on .modal-info {
  background-color: var(--bg-drafting-paper) !important;
  color: var(--text-graphite) !important;
}

body.worklight-on h2,
body.worklight-on h3,
body.worklight-on h4,
body.worklight-on .modal-title,
body.worklight-on .section-title,
body.worklight-on .featured-projects h2,
body.worklight-on .section-subgroup h3 {
  color: var(--highlight) !important;
  border-color: var(--highlight) !important;
}

/* If you want even softer cards in light mode: */
body.worklight-on .project-card {
  background: var(--worklight-card) !important;
  color: var(--worklight-text) !important;
  border-color: var(--worklight-highlight) !important;
}

/* Optional: keep the main nav, site nav, and outer backgrounds dark */
body.worklight-on .site-nav,
body.worklight-on .titleblock-wrapper {
  background: var(--bg-dark) !important;
  color: var(--text-light) !important;
  border-color: var(--highlight) !important;
}

body.worklight-on .credit-title,
body.worklight-on .credit-name {
  color: var(--worklight-text) !important;
}

.page-section, .modal-content, .project-card {
  transition: background 0.4s, color 0.4s, border 0.4s;
}

body.worklight-on .page-section,
body.worklight-on .modal-content {
  background-color: var(--bg-drafting-paper) !important; /* this is the slightly darker gray, e.g. #babbba */
  color: var(--worklight-text) !important;
  border-color: var(--worklight-highlight) !important;
}

body.worklight-on .modal-section.team ul li {
  border-bottom: 1px dotted var(--worklight-highlight) !important;
}


body.worklight-on .project-info,
body.worklight-on .project-role,
body.worklight-on .project-meta {
  background: transparent !important;
  color: var(--worklight-text) !important;
}

body.worklight-on .project-role {
  background-color: var(--worklight-card) !important;
  color: var(--worklight-highlight) !important;
  border-color: var(--worklight-highlight) !important;
}

body.worklight-on .project-meta {
  color: var(--worklight-faint) !important;
}

body.worklight-on .modal-content {
  background: var(--bg-drafting-paper) !important;
  background-color: var(--bg-drafting-paper) !important;
  color: var(--worklight-text) !important;
}

body.worklight-on .modal-content,
body.worklight-on .modal-info,
body.worklight-on .modal-body {
  background: var(--bg-drafting-paper) !important;
  background-color: var(--bg-drafting-paper) !important;
  color: var(--worklight-text) !important;
  border-color: var(--worklight-highlight) !important;
}

body.worklight-on .modal-slideshow-wrapper,
body.worklight-on .modal-slideshow {
  background: #c7c7c7 !important;
  border-color: var(--worklight-highlight) !important;
}

/* ---- Worklight Body Text = Pure Black ---- */
body.worklight-on .page-section,
body.worklight-on .featured-projects,
body.worklight-on .modal-content,
body.worklight-on .modal-info,
body.worklight-on .modal-section,
body.worklight-on .modal-body,
body.worklight-on .project-info,
body.worklight-on .project-card,
body.worklight-on .modal-section.details,
body.worklight-on .modal-section.details p,
body.worklight-on .project-role,
body.worklight-on .resume-disclaimer,
body.worklight-on .bionic-switch-wrapper,
body.worklight-on .project-meta {
  color: #111 !important;
}

/* Keep teal for headers and accents */
body.worklight-on h2,
body.worklight-on h3,
body.worklight-on h4,
body.worklight-on .modal-title,
body.worklight-on .section-title,
body.worklight-on .sub-note,
body.worklight-on .featured-projects h2,
body.worklight-on .section-subgroup h3,
body.worklight-on .project-info h4,
body.worklight-on .modal-section h4 {
  color: #2f474b !important;
}

body.worklight-on .contact-icons img {
  filter: brightness(0) invert(0) !important; /* Black, not white */
}

/* Worklight mode: make resume buttons dark with light border/text */
body.worklight-on .resume-buttons button,
body.worklight-on .resume-buttons .button-link {
  background: #383f3e !important;      /* A deep charcoal, not pure black */
  color: #f5f6f7 !important;           /* White-ish text for contrast */
  border: 2px solid var(--worklight-highlight) !important;
}

body.worklight-on .resume-buttons button:hover,
body.worklight-on .resume-buttons .button-link:hover {
  background: var(--worklight-highlight) !important;
  color: #fff !important;
  border-color: #111 !important;      /* Slightly darker for hover */
}