:root {
  --bg-color: #FFFFFF;
  --default-text: #111111;
  --footer-color: #111111;

  /* Typography */
  --font-family: 'Instrument Serif', Georgia, serif;

  /* Exactly 90px on standard 1440px Mac display */
  --side-margin: clamp(1.5rem, 6.25vw, 90px);
}

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

body {
  background-color: var(--bg-color);
  color: var(--default-text);
  font-family: var(--font-family);
  min-height: 100vh;
  transition: background-color 0.4s ease;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   1. LANDING PAGE
   ========================================= */
.landing-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem var(--side-margin);
  position: relative;
  z-index: 2;
}

.project-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.8rem 2.2rem;
  max-width: 860px;
  margin: 0 auto;
}

.nav-item {
  font-size: clamp(2rem, 3vw, 2.9rem);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.nav-item.italic {
  font-style: italic;
}

.project-nav:hover .nav-item {
  opacity: 0.25;
}

.project-nav .nav-item:hover {
  opacity: 1;
  color: var(--active-link-color, #FFFFFF);
}

/* Hover Preview */
.image-stage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, 65vw);
  height: min(440px, 65vh);
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-stage img.visible {
  opacity: 1;
  transform: scale(1);
}

.footer {
  width: 100%;
  overflow: hidden;
}

.brand-name {
  font-size: clamp(3.5rem, 10vw, 10.5rem);
  font-weight: 400;
  color: var(--footer-color);
  transition: color 0.4s ease;
  line-height: 0.85;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* =========================================
   2. DETAIL PAGES (SHARED)
   ========================================= */
.project-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(15px);
}

.project-view.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Page Themes */
.theme-experience {
  background-color: #B7791F;
  --theme-bg: #B7791F;
  --theme-watermark: #F6D8A8;
}

.theme-rover {
  background-color: #A3A0C8;
  --theme-bg: #A3A0C8;
  --theme-watermark: #ABB8C0;
}

.theme-competitions {
  background-color: #2C7A7B;
  --theme-bg: #2C7A7B;
  --theme-watermark: #B2F5EA;
}

.theme-projects {
  background-color: #702459;
  --theme-bg: #702459;
  --theme-watermark: #FED7E2;
}

.theme-contact {
  background-color: #262626;
  --theme-bg: #262626;
  --theme-watermark: #4A4A4A;
}

/* Fixed Header */
.detail-header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  padding: 1.8rem var(--side-margin) 1.2rem var(--side-margin);
  background: linear-gradient(to bottom, var(--theme-bg) 85%, transparent);
}

.back-btn {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: clamp(3.2rem, 4.4vw, 4.8rem);
  color: #FFFFFF;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: opacity 0.2s;
  display: inline-block;
}

.back-btn:hover {
  opacity: 0.8;
}

/* View Content */
.view-content {
  width: 100%;
  padding-left: var(--side-margin);
  padding-right: var(--side-margin);
  padding-top: 6.5rem;
  padding-bottom: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Watermarks */
.watermark-wrapper {
  width: 100%;
  overflow: hidden;
  line-height: 0.85;
  margin: 0.5rem 0;
}

.watermark-title {
  display: block;
  white-space: nowrap;
  font-size: clamp(3.8rem, 11.2vw, 11.8rem);
  font-weight: 400;
  color: var(--theme-watermark);
  letter-spacing: 0.01em;
  user-select: none;
  line-height: 0.85;
}

/* Images */
.image-block {
  width: 100%;
  display: flex;
  justify-content: center;
}

.stroke-10 {
  display: block;
  width: 100%;
  height: auto;
  border: 10px solid #FFFFFF;
  box-sizing: border-box;
}

/* Rows & Grid */
.detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 6rem);
  margin: 1.5rem 0;
}

.detail-row.align-start {
  align-items: start;
}

.text-block p {
  font-size: clamp(2.5rem, 3.4vw, 3.8rem);
  line-height: 1.15;
  color: #111111;
  font-weight: 400;
}

.text-block em {
  font-style: italic;
}

/* Action Links */
.action-links {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.link-italic {
  font-size: clamp(2.6rem, 3.6vw, 4.1rem);
  font-style: italic;
  color: #FFFFFF;
  text-decoration: none;
  width: fit-content;
  line-height: 1.15;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.link-italic:hover {
  opacity: 0.8;
  transform: translateX(5px);
}

.bottom-action-row {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-bottom: 2rem;
}

.bottom-back-btn {
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: clamp(2.8rem, 3.8vw, 4.2rem);
  color: #FFFFFF;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bottom-back-btn:hover {
  opacity: 0.8;
  transform: translateX(4px);
}

/* =========================================
   3. COMPETITIONS SPECIFICS
   ========================================= */
.theme-competitions em {
  font-style: italic;
  color: inherit;
}

.theme-competitions .contest-heading em,
.theme-competitions .stacked-contests em {
  color: #FFFFFF;
}

.theme-competitions .right-column-flex p,
.theme-competitions .right-column-flex em {
  color: #111111;
}

.competitions-full-block {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  margin: 1rem 0;
}

.contest-entry .contest-heading {
  font-size: clamp(22px, 2.78vw, 40px);
  line-height: 1.15;
  color: #111111;
  font-weight: 400;
}

.contest-entry .contest-body {
  font-size: clamp(22px, 2.78vw, 40px);
  line-height: 1.18;
  color: #111111;
  padding-left: clamp(1.5rem, 3vw, 3.5rem);
  margin-top: 0.5rem;
  font-weight: 400;
}

.theme-competitions .detail-row.align-start .text-block p {
  font-size: clamp(22px, 2.78vw, 40px);
  line-height: 1.16;
}

.stacked-contests {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.right-column-flex {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.bottom-action-link {
  margin-top: clamp(3rem, 7vw, 8.5rem);
}

/* =========================================
   4. PROJECTS SPECIFICS
   ========================================= */
.theme-projects em {
  color: #FFFFFF;
  font-style: italic;
}

.theme-projects a.white-link {
  text-decoration: none;
}

.theme-projects a.white-link:hover {
  text-decoration: underline;
}

.projects-list-block {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin: 1rem 0;
}

.projects-list-block p {
  font-size: clamp(22px, 2.7vw, 38px);
  line-height: 1.18;
  color: #111111;
}

.stacked-capabilities {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.stacked-capabilities p {
  font-size: clamp(22px, 2.7vw, 38px);
  line-height: 1.18;
  color: #111111;
}

/* =========================================
   5. CONTACT SPECIFICS (COMPACT)
   ========================================= */
.contact-view-compact {
  overflow-y: auto;
}

.contact-content-flex {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-links-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  margin: auto 0;
  padding: 3rem 0;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2.5rem clamp(2.5rem, 6vw, 6rem);
}

.contact-main-link {
  font-size: clamp(3rem, 6vw, 6.2rem);
  color: #FFFFFF;
  text-decoration: none;
  line-height: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-main-link.italic {
  font-style: italic;
}

.contact-main-link:hover {
  opacity: 0.75;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 850px) {
  .detail-row {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .detail-row.reverse {
    display: flex;
    flex-direction: column-reverse;
  }
}