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

body {
  font-family: 'Michroma', sans-serif;
  color: #000;
  background-color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Fixed Header - GUARANTEED Complete Fade */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  display: flex;
  align-items: center;
  background: none;
}

/* The gradient mask that WILL fade completely */
.header-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to bottom, 
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,0.95) 10%,
    rgba(255,255,255,0.85) 20%,
    rgba(255,255,255,0.7) 30%,
    rgba(255,255,255,0.5) 40%,
    rgba(255,255,255,0.3) 50%,
    rgba(255,255,255,0.15) 60%,
    rgba(255,255,255,0.05) 70%,
    rgba(255,255,255,0) 80%);
  pointer-events: none;
  z-index: -1;
}

.header-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  position: relative;
  z-index: 2; /* Ensure content is above gradient */
}

.logo {
  font-family: 'Michroma', sans-serif; /* KEPT AS MICHROMA */
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0px;
}

nav {
  display: flex;
}

nav a {
  font-family: 'Space Grotesk', system-ui, sans-serif; /* CHANGED FONT */
  margin-left: 30px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0px;
  transition: opacity 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 3; /* Ensure links are clickable */
}

nav a:hover, nav a.active {
  opacity: 0.7;
}

/* Homepage Hero Section */
#home {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: auto;
}

.hero-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 300vw;
  height: 300vh;
  min-width: 3000px;
  min-height: 3000px;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-name {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4.5vw;
  font-weight: bold;
  letter-spacing: 3px;
  z-index: 100;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  width: 90%;
  overflow: hidden;
}

/* Work Section */
#work-content {
  max-width: 1200px;
  margin: 120px auto 80px;
  padding: 0 20px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.work-item {
  position: relative;
  cursor: pointer;
}

.work-item img {
  width: 100%;
  display: block;
  transition: opacity 0.3s ease;
}

.overlay {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  text-align: center;
  pointer-events: none;
}

.overlay-text {
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.5px;
  font-family: 'Michroma', sans-serif;
}

.work-item.active img {
  opacity: 0.4;
}

.work-item.active .overlay {
  opacity: 1;
}

/* Contact Section */
#contact-content {
  max-width: 900px;
  margin: 120px auto 80px;
  padding: 0 20px;
}

#contact-content h2 {
  font-size: 24px;
  margin-bottom: 30px;
  font-weight: normal;
  margin-top: 40px;
}

#contact-content a {
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid #000;
  cursor: pointer;
}

#contact-content a:hover {
  opacity: 0.7;
}

/* Contact Page Centering */
.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
}

.contact-container a {
  font-family: 'Michroma', sans-serif;
  color: #000;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.contact-container a:hover {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* CV Section - Completely Redesigned */
#cv-content {
  max-width: none;
  margin: 120px auto 80px;
  padding: 0;
}

.cv-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* CV Section headings */
.cv-section {
  margin-top: 2.5rem;
}

.cv-section h2 {
  font-family: 'Michroma', sans-serif;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: clamp(14px, 1.8vw, 15px);
  margin: 0 0 1rem 0;
  font-weight: normal;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

/* CV Entries: tidy grid with a date column */
.cv-items {
  display: grid;
  row-gap: 1rem;
}

/* Default entry style - two columns */
.entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  column-gap: 20px;
  align-items: start;
  margin-bottom: 0.5rem;
}

/* Full-width entries for Education and Press */
.entry-full-width {
  display: block; /* Override grid */
  margin-bottom: 0.5rem;
}

.entry-year {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  letter-spacing: .06em;
  font-size: 13px;
  line-height: 1.6;
  opacity: .8;
  text-transform: uppercase;
  padding-top: 2px;
  font-weight: 300;
}

.entry-body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: .01em;
  font-weight: 300;
}

/* Press items styling */
.press-item {
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.press-item:last-child {
  margin-bottom: 0;
}

/* CV Spacing rhythm */
.cv-section + .cv-section {
  margin-top: 3rem;
}

/* Press links styling */
.press-item a {
  color: #000;
  text-decoration: none;
  border-bottom: 1px solid #000;
  transition: opacity 0.3s ease;
  font-weight: 400;
}

.press-item a:hover {
  opacity: 0.7;
}

/* Keep the publication names normal weight */
.press-item {
  font-weight: 300;
}

/* Responsive tweaks for CV */
@media (max-width: 768px) {
  #cv-content {
    margin: 100px auto 60px;
  }
  
  .entry {
    grid-template-columns: 110px 1fr;
    column-gap: 15px;
  }
  
  .entry-body {
    font-size: 14px;
  }
  
  .entry-year {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .entry {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
    margin-bottom: 1rem;
  }
  
  .entry-year {
    order: -1;
    margin-bottom: 0.1rem;
    font-size: 11px;
  }
  
  .entry-full-width {
    /* No changes needed for full-width on mobile */
  }
  
  .cv-section h2 {
    font-size: 13px;
  }
  
  .cv-section {
    margin-top: 2rem;
  }
  
  .cv-section + .cv-section {
    margin-top: 2.5rem;
  }
}

/* DESKTOP STYLES - Ensure everything works on desktop */
/* These styles apply to ALL screen sizes by default */

/* Make sure navigation is always clickable */
nav a {
  position: relative;
  z-index: 1000;
}

/* Ensure header content is above gradient */
.header-content {
  position: relative;
  z-index: 1001;
}

/* Responsive tweaks - MOBILE ONLY */
@media (max-width: 768px) {
  .header-content {
    padding: 0 20px;
  }
  
  header {
    height: 70px;
  }
  
  .header-gradient {
    height: 70px;
    background: linear-gradient(to bottom, 
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,0.95) 15%,
      rgba(255,255,255,0.85) 30%,
      rgba(255,255,255,0.7) 45%,
      rgba(255,255,255,0.5) 60%,
      rgba(255,255,255,0.3) 75%,
      rgba(255,255,255,0.15) 85%,
      rgba(255,255,255,0) 95%);
  }
  
  nav a {
    margin-left: 15px;
    font-size: 12px;
  }
  
  .logo {
    font-size: 12px;
  }
  
  .hero-name {
    font-size: 8vw;
    width: 95%;
    white-space: normal;
    line-height: 1.2;
    padding: 0 10px;
  }
  
  .work-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  #work-content, #cv-content, #contact-content {
    margin: 100px auto 60px;
  }
  
  .hero-container {
    width: 400vw;
    height: 400vh;
    min-width: 2000px;
    min-height: 2000px;
  }
  
  /* Contact page mobile adjustments */
  .contact-container {
    height: calc(100vh - 70px);
    margin-top: 70px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 10vw;
    padding: 0 15px;
  }
  
  nav a {
    margin-left: 10px;
    font-size: 11px;
  }
  
  .logo {
    font-size: 11px;
  }
  
  .header-content {
    padding: 0 15px;
  }
  
  .contact-container a {
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .hero-name {
    font-size: 11vw;
  }
  
  nav a {
    margin-left: 8px;
    font-size: 10px;
  }
  
  .logo {
    font-size: 10px;
  }
}

/* DESKTOP SPECIFIC ENHANCEMENTS */
@media (min-width: 769px) {
  /* Ensure desktop navigation is properly spaced */
  nav a {
    margin-left: 30px;
    font-size: 14px;
  }
  
  .logo {
    font-size: 14px;
  }
  
  /* Make sure desktop header is proper height */
  header {
    height: 80px;
  }
  
  .header-gradient {
    height: 80px;
  }
  
  /* Desktop content margins */
  #work-content, #cv-content, #contact-content {
    margin: 120px auto 80px;
  }
  
  /* Contact page desktop adjustments */
  .contact-container {
    height: calc(100vh - 80px);
    margin-top: 80px;
  }
  .email-link {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
}