/* VIVID MASS components — shared across pages */

/* === NAV === */
.site-nav {
  position: sticky;
  top: 0;
  background-color: var(--bg-nav);
  z-index: 100;
  padding: 0.85rem 0;
}

.site-nav.bordered {
  border-bottom: 1px solid var(--border-color);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-family: var(--font-title);
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  white-space: nowrap;
}

.brand-light {
  font-weight: 300;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-divider {
  width: 1px;
  height: 1.25rem;
  background: var(--border-color);
  margin: 0 0.75rem;
}

.nav-links a,
.nav-links button.theme-toggle {
  font-family: var(--font-title);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
}

.nav-links a.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
}

[data-theme="light"] .nav-links a:not(.active) {
  color: var(--text-primary);
}

[data-theme="light"] .site-nav {
  border-bottom: 1px solid var(--border-color);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  margin-right: 0.25rem;
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #1a1614;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-bg:not([style*="background-image"]) {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero-bg[style*="background-image"] {
  background-size: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(2, 1, 1, 0.88) 0%,
    rgba(2, 1, 1, 0.62) 42%,
    rgba(2, 1, 1, 0.4) 100%
  );
}

.hero-sidebar {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left center;
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light-grey);
  white-space: nowrap;
  z-index: 2;
}

.hero-sidebar-brand {
  color: var(--orange);
}

.hero-deco {
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: min(140px, 16vw);
  height: auto;
  opacity: 0.9;
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem var(--container-pad) 4rem calc(var(--container-pad) + 2.5rem);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-label {
  font-family: var(--font-title);
  font-size: 0.85rem;
  color: var(--orange);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.hero-headline {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1.05;
  color: var(--hero-text);
  margin-bottom: 1.25rem;
  max-width: 14ch;
}

.hero-tagline {
  font-family: var(--font-title);
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--orange);
  line-height: 1.45;
  max-width: 22ch;
}

/* === SECTION HEADERS === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3.5rem 0 1.5rem;
  font-family: var(--font-title);
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--section-accent);
  letter-spacing: 0.04em;
}

.section-header a {
  color: var(--section-accent);
}

.section-header a:hover {
  text-decoration: underline;
}

/* === PROJECTS === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border-color);
}

.project-card {
  background-color: var(--bg-card);
  color: var(--text-on-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 2.75rem;
  min-height: 300px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  z-index: 1;
}

.project-card-header {
  font-family: var(--font-title);
  font-size: 0.85rem;
  margin-bottom: 0.1rem;
  line-height: 1.3;
}

.project-card-header .id {
  font-weight: 700;
  margin-right: 0.35rem;
}

.project-card-category {
  font-size: 0.7rem;
  color: var(--text-on-card-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.project-card-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  margin: 0.25rem 0 0.5rem;
  padding: 0.5rem;
}

.project-card-image img {
  max-height: 180px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.project-card-image img.is-broken {
  display: none;
}

.project-card-image img.is-broken + .project-card-placeholder {
  display: block;
}

.project-card-placeholder {
  width: 80%;
  height: 120px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  display: none;
}

.project-card-image .project-card-placeholder:only-child {
  display: block;
}

.project-card-year {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-family: var(--font-title);
  font-size: 0.85rem;
}

.project-card-plus {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  color: var(--orange);
  font-family: var(--font-title);
  font-size: 1.1rem;
}

/* === PROCESS === */
.process-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.bio-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  background: var(--bg-input);
}

.bio-photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    var(--bg-input);
  background-size: 16px 16px, 16px 16px, auto;
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.bio-text {
  font-size: 0.95rem;
  line-height: 1.65;
}

.bio-text p + p {
  margin-top: 1rem;
}

.iframe-container {
  width: 100%;
  height: 520px;
  border: 1px solid var(--border-color);
  background: var(--bg-nav);
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border-color);
}

.service-card {
  aspect-ratio: 1;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  gap: 0.75rem;
}

.service-card svg {
  width: 56px;
  height: 56px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card span {
  font-family: var(--font-title);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.35;
  max-width: 12em;
}

.contact-form h3 {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-family: var(--font-title);
}

/* Schematic / blueprint form (mockup) */
.form-schematic .form-field {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0;
  border: 1px solid var(--border-color);
  border-bottom: none;
}

.form-schematic .form-field-message {
  grid-template-columns: 5.5rem 1fr;
  align-items: start;
}

.form-schematic .form-field:last-of-type {
  border-bottom: 1px solid var(--border-color);
}

.form-schematic label {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  margin: 0;
  font-family: var(--font-title);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-right: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .form-schematic label {
  background: rgba(0, 0, 0, 0.03);
}

.form-schematic input,
.form-schematic textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--bg-input);
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.form-schematic textarea {
  min-height: 110px;
  resize: vertical;
}

.form-schematic .form-actions {
  margin-top: 1.25rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.btn-send {
  background: var(--btn-send-bg);
  color: var(--btn-send-text);
  padding: 0.55rem 2rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.btn-send:hover {
  opacity: 0.85;
}

.form-status {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  color: var(--orange);
}

/* === MODAL === */
#project-modal {
  margin: auto;
  width: 92vw;
  max-width: 1100px;
  height: 88vh;
  background-color: var(--bg-main);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 2rem;
  position: relative;
}

#project-modal::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}

.modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.modal-meta {
  margin-bottom: 0.5rem;
}

#modal-category {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.slideshow-area {
  flex: 1;
  background: var(--bg-card);
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 200px;
  overflow: hidden;
}

.slideshow-area img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-nav.prev { left: 0.5rem; }
.slideshow-nav.next { right: 0.5rem; }

.slideshow-counter {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-on-card-muted);
}

.slideshow-empty {
  color: var(--text-on-card-muted);
  font-size: 0.9rem;
}

/* === FOOTER === */
.site-footer {
  padding: 2rem 0;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links a span.nav-num { display: none; }

  .hero-sidebar { display: none; }
  .hero-deco { display: none; }
  .hero-content { padding-left: var(--container-pad); }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .process-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-divider { margin: 0 0.35rem; }
}
