/* Enhanced Gallery Website CSS */

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

body {
  margin: 0;
  font-family: 'Times New Roman', Georgia, serif;
  background: #f8f8f8;
  color: #000;
  line-height: 1.4;
  scroll-behavior: smooth;
  font-size: 14px;
  letter-spacing: 0.3px;
}

/* Home specific */
.home-body { background: #f4f4f4; }
.home-content { padding: 0 0 4rem; max-width: none; width: 100%; margin: 0; }
.home-hero { margin: 0; }
.home-hero + .home-hero { margin-top: 0; }
.hero-link { display: block; position: relative; text-decoration: none; }
.hero-link img { display: block; width: 100%; height: auto; margin: 0; }
.hero-caption { position: absolute; right: 12px; bottom: 12px; background: rgba(255,255,255,0.2); color: #000; padding: 6px 8px; font-family: Helvetica, Arial, sans-serif; font-size: 0.85rem; }
.hero-caption .year { color: #000; margin-right: 6px; }

/* Typography Hierarchy */
h1 {
  font-size: 2.5rem;
  font-weight: bold;
  letter-spacing: 2px;
  margin: 0;
  text-transform: uppercase;
}

h2 {
  font-size: 1rem;
  font-weight: normal;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 0 2rem 0;
  border: none;
}

/* Logo in the top bar */
.site-title img {
  height: 2.75rem;
  width: auto;
  margin: 0;
}

/* Layout */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  padding: 0.5rem 2rem 0 2rem;
  background: #f8f8f8;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 6rem; /* reduced header height */
}



.site-title h1 {
  font-size: 2.5rem;
  margin: 0;
  font-weight: bold;
  letter-spacing: 2px;
}

/* Vertically center the logo within the fixed-height topbar */
.site-title { display: flex; align-items: center; height: 100%; }

.site-title p {
  font-size: 0.85rem;
  color: #000;
  margin: 0.2rem 0 0 0;
  font-weight: normal;
  letter-spacing: 0.3px;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  height: 100%;
  padding-bottom: 0;
}

.main-nav a {
  text-decoration: none;
  color: #999;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.2s ease;
}

.main-nav a:hover {
  border-bottom: 1px solid #000;
}

.main-nav a.active { color: #000; border-bottom: 1px solid #000; }

/* homepage keeps black nav by default */
.home-body .main-nav a { color: #000; }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 6rem; /* sits just below reduced topbar */
  left: 2rem;
  width: 140px;
  padding: 0;
  background: transparent;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 0.85rem;
  z-index: 50;
}

/* Hide legacy mobile button everywhere (we toggle with topbar link now) */
.sidebar-toggle { display: none !important; }

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 0.3rem;
}

.sidebar a {
  color: #666;
  text-decoration: none;
  display: block;
  padding: 0.2rem 0;
  letter-spacing: 0.2px;
  transition: color 0.2s ease;
}

.sidebar a:hover {
  color: #000;
}

.sidebar a.active {
  color: #000;
  font-weight: normal;
}

/* Year sections in sidebar */
.sidebar .year { color: #666; font-weight: normal; margin: 1.5rem 0 0.5rem 0; font-size: 0.9rem; transition: color 0.2s ease; }

.sidebar .year:first-child {
  margin-top: 0;
}

/* Main Content */
.content {
  margin-left: 180px;
  padding: 2rem 2rem 4rem 2rem;
  max-width: 900px;
}

/* Project/Work sections */
.work {
  margin-bottom: 4rem;
  border-bottom: none;
  padding-bottom: 2rem;
  /* Ensure anchor links position section below sticky topbar */
  scroll-margin-top: 12rem;
}

.works-body .work.hidden { display: none; }

.work:last-child {
  border-bottom: none;
}

.work h2 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
  font-family: 'Times New Roman', Georgia, serif;
  font-weight: bold;
  color: #000000;
  border-bottom: 1px solid transparent;
}

.info {
  font-size: 0.8rem;
  font-family: 'Times New Roman', Georgia, serif;
  font-weight: normal;
  color: #808080;
  margin-bottom: 0.8rem;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.description {
  margin-bottom: 2rem;
  font-size: 0.9rem;
  font-family: 'Times New Roman', Georgia, serif;
  font-weight: normal;
  color: #000000;
  line-height: 1.6;
  max-width: 650px;
}

.description p {
  margin-bottom: 1.2rem;
}

.description p:last-child {
  margin-bottom: 0;
}

/* Image gallery styling */
.work-images {
  margin: 2rem 0;
}

.work-images img {
  margin-bottom: 1rem;
  width: 100%;
  height: auto;
} 

/* Ensure each work's lead image stretches to the content width even if the
   intrinsic image is smaller (e.g., when using lower-res PNGs) */
.work > img {
  width: 100%;
  height: auto;
}

/* Collapsible years in sidebar */
.year-toggle {
  background: none;
  border: none;
  color: #000;
  font: inherit;
  padding: 0.2rem 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.year-toggle::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 0; height: 0;
}
.year-toggle[aria-expanded="false"]::after {
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor; /* right-pointing */
}
.year-toggle[aria-expanded="true"]::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid currentColor; /* down-pointing */
}
.year-group { display: none; margin: 0.4rem 0 1rem 0; }
.year-group.open { display: block; }
.year-group a { color: #999; }
.year-group a.active { color: #000; }

/* Responsive video embeds */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  margin: 1rem 0 1rem 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}
.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Back to top: minimalist arrow + label (global) */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 0;
  background: transparent;
  color: #000;
  border: none;
  cursor: pointer;
  display: none;
  z-index: 999;
  font-family: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.3px;
  text-transform: lowercase;
  text-align: center;
}

#backToTop::before {
  content: "";
  display: block;
  margin: 0 auto 6px auto;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #000;
}

#backToTop:hover::before {
  border-bottom-color: #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content {
    margin-left: 160px;
    padding: 2rem 1.5rem;
  }
  .site-title img { height: 7rem; }
  .sidebar { top: 12rem; }
  .work { scroll-margin-top: 20rem; }
  
  .sidebar {
    width: 120px;
    left: 1.5rem;
  }
}

@media (max-width: 768px) {
  .site-title img { height: 2.5rem; }
  .sidebar { top: auto; }
  .topbar { height: auto; padding: 1.25rem; }
  .work { scroll-margin-top: 12rem; }
  .about-mobile-hide { display: none; }
  
  .site-title h1 {
    font-size: 2rem;
    letter-spacing: 1px;
  }
  
  .main-nav {
    gap: 1.5rem;
  }
  
  .sidebar { position: static; width: 100%; padding: 0; background: transparent; margin: 0 0 1rem 0; }
  .works-nav { position: relative; }
  .works-nav::after { content: ""; display: inline-block; margin-left: 4px; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transform-origin: 50% 40%; transition: transform 0.2s ease; vertical-align: middle; }
  .works-nav.is-open::after { transform: rotate(180deg); }
  .drawer-content { max-height: 0; overflow: hidden; opacity: 0; padding: 0 1rem; background: #f0f0f0; transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease; }
  .drawer-content.open { max-height: 80vh; opacity: 1; padding: 0.5rem 1rem 1rem; }
  .year-toggle { font-weight: bold; }
  
  .sidebar ul {
    display: block;
    gap: 0;
  }
  
  .sidebar .year {
    margin: 0;
  }
  
  .content {
    margin-left: 0;
    padding: 1rem 1.5rem 3rem;
  }
  
  .work {
    margin-bottom: 3rem;
  }
  
  #backToTop {
    bottom: 20px;
    right: 20px;
    padding: 0.6rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .site-title img { height: 2.25rem; }
  .sidebar { top: auto; }
  .topbar {
    padding: 1rem;
  }
  .work { scroll-margin-top: 9rem; }
  
  .site-title h1 {
    font-size: 1.8rem;
  }
  
  .main-nav {
    gap: 1rem;
  }
  
  .main-nav a {
    font-size: 0.85rem;
  }
  
  .content {
    padding: 1rem;
  }
  
  .sidebar {
    padding: 1rem;
  }
} 

/* About page layout */
.about-container {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 2rem;
}

.about-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-sidebar a {
  color: #666;
  text-decoration: none;
  display: block;
  padding: 0.35rem 0;
}

.about-sidebar a.active,
.about-sidebar a:hover { color: #000; }

.about-content { max-width: 900px; }
.about-section { margin-bottom: 2.5rem; }
.about-section h1 { font-size: 1.2rem; margin-bottom: 1rem; }
.about-section h2 { font-size: 1rem; margin-bottom: 0.8rem; font-weight: bold; }

.about-list { list-style: none; padding: 0; margin: 0; }
.about-list li { display: grid; grid-template-columns: 170px 1fr; gap: 1rem; margin-bottom: 0.8rem; }
.about-year { color: #666; }
.about-title { font-family: 'Times New Roman', Georgia, serif; color: #000; }
.about-meta { color: #808080; font-size: 0.9rem; }
.about-tag { color: #666; font-size: 0.75rem; margin-bottom: 0.2rem; display: block; }

.bio-intro { display: grid; grid-template-columns: 160px 1fr; gap: 1.25rem; align-items: start; }
.bio-photo { width: 160px; height: auto; display: block; }
.bio-intro.vertical { grid-template-columns: 1fr; }
.bio-intro.vertical .bio-photo { width: 220px; }

@media (max-width: 768px) {
  .about-container { grid-template-columns: 1fr; }
  .about-list li { grid-template-columns: 1fr; }
}