/* ==========================================================================
   Piotr Piotrowski Portfolio - Architectural Design System
   Typography: Tenor Sans
   Monochrome Minimalist Luxury Aesthetic (Dark & Light Invertible Themes)
   ========================================================================== */

/* --- CSS Variables & Design Tokens (Dark Default) --- */
:root {
  --font-primary: 'Tenor Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --color-bg: #000000;
  --color-bg-alt: #090909;
  --color-surface: rgba(12, 12, 12, 0.94);
  --color-surface-glass: rgba(0, 0, 0, 0.90);
  
  --color-text: #ffffff;
  --color-text-dim: #c5c5c5;
  --color-text-muted: #959595;
  --color-accent: #ffffff;
  
  --color-status-realisation: #ffffff;
  --color-status-inprogress: #e5a93c;
  --color-status-competition: #8ab4f8;
  
  --border-color: rgba(255, 255, 255, 0.40);
  --border-subtle: rgba(255, 255, 255, 0.22);
  
  --sidebar-width: 380px;
  --header-height-mobile: 68px;
  
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-speed: 0.4s;
}

/* --- Light Theme Inversion Variables --- */
body.theme-light {
  --color-bg: #ffffff;
  --color-bg-alt: #f8f8f8;
  --color-surface: rgba(250, 250, 250, 0.95);
  --color-surface-glass: rgba(255, 255, 255, 0.94);
  
  --color-text: #0e0e0e;
  --color-text-dim: #454545;
  --color-text-muted: #727272;
  --color-accent: #000000;
  
  --color-status-realisation: #000000;
  --color-status-inprogress: #b8770b;
  --color-status-competition: #2a52be;
  
  --border-color: rgba(0, 0, 0, 0.28);
  --border-subtle: rgba(0, 0, 0, 0.14);
}

/* --- Global Reset & Base Setup --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: 0.02em;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.6);
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-speed) ease, color 0.25s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

img, video {
  display: block;
  max-width: 100%;
}

/* --- Brand Typography --- */
.brand-logo, .mobile-brand-logo {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  color: var(--color-text);
  font-size: 28px;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 400;
  transition: color 0.25s ease;
}

.logo-name {
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   1. MOBILE-FIRST ARCHITECTURE (< 992px)
   ========================================================================== */

.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height-mobile);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.35s ease, border-color 0.35s ease;
}

body.theme-light .mobile-header {
  background: rgba(255, 255, 255, 0.90);
}

.mobile-menu-btn {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  padding: 8px;
  z-index: 110;
}

.hamburger-line {
  display: block;
  height: 1.5px;
  background-color: var(--color-text);
  transition: transform 0.35s var(--ease-out-expo), opacity 0.3s ease, width 0.35s ease, background-color 0.3s ease;
  transform-origin: center;
}

.hamburger-line.line-1 { width: 28px; }
.hamburger-line.line-2 { width: 20px; }
.hamburger-line.line-3 { width: 28px; }

.mobile-menu-btn.active .hamburger-line.line-1 {
  width: 26px;
  transform: translateY(7.5px) rotate(45deg);
}
.mobile-menu-btn.active .hamburger-line.line-2 {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-btn.active .hamburger-line.line-3 {
  width: 26px;
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background-color: var(--color-bg);
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-height-mobile) + 20px) 24px 32px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.55s var(--ease-out-expo), opacity 0.45s ease, visibility 0.55s, background-color 0.35s ease;
  overflow-y: auto;
}

.mobile-menu-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  gap: 36px;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mobile-nav-item {
  width: 100%;
  border-bottom: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo), border-color 0.3s ease;
}

.mobile-menu-drawer.open .mobile-nav-item {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-btn {
  width: 100%;
  text-align: left;
  padding: 18px 0;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.25s ease;
}

.mobile-nav-btn .expand-indicator {
  font-size: 16px;
  color: var(--color-text-dim);
  transition: transform 0.3s var(--ease-out-expo), color 0.25s ease;
}

.mobile-nav-item.active .mobile-nav-btn .expand-indicator {
  transform: rotate(90deg);
  color: var(--color-accent);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out-expo);
  padding-left: 12px;
}

.mobile-nav-item.active .mobile-submenu {
  max-height: 480px;
  padding-bottom: 14px;
}

.mobile-submenu-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 0;
  font-size: 16px;
  color: var(--color-text-dim);
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-submenu-btn:hover,
.mobile-submenu-btn.active {
  color: var(--color-text);
  transform: translateX(4px);
}

.mobile-drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.mobile-copyright {
  font-size: 13px;
  color: var(--color-text-muted);
}

.app-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}

.sidebar {
  display: none;
}

.viewport-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--color-bg);
  transition: background-color 0.35s ease;
}

.video-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s var(--ease-out-expo), filter 0.8s var(--ease-out-expo), opacity 0.6s ease;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
  transition: background 0.35s ease;
}

body.theme-light .video-overlay {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.4) 100%);
}

.viewport-stage.content-active .hero-video {
  filter: brightness(0.2) blur(8px);
  transform: scale(1.04);
}

body.theme-light .viewport-stage.content-active .hero-video {
  filter: brightness(0.7) blur(10px) contrast(0.9);
}

.content-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background-color: var(--color-surface-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.99);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo), visibility 0.5s, background-color 0.35s ease;
  display: flex;
  flex-direction: column;
}

.viewport-stage.content-active .content-stage {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.content-stage:has(.has-fullscreen-map),
.content-stage:has(.vector-world-map-fullscreen) {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
}

.stage-body {
  padding: 40px 16px 40px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stage-body.has-fullscreen-map,
.stage-body:has(.vector-world-map-fullscreen) {
  padding: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  height: 100% !important;
  flex: 1;
  overflow: hidden;
}

/* ==========================================================================
   2. DESKTOP MEDIA QUERY (>= 992px)
   ========================================================================== */

@media (min-width: 992px) {
  .mobile-header {
    display: none;
  }
  
  .mobile-menu-drawer {
    display: none;
  }

  .app-layout {
    flex-direction: row;
    height: 100vh;
    overflow: hidden;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--color-bg);
    padding: 48px 40px 36px;
    border-right: 1px solid var(--border-color);
    position: relative;
    z-index: 50;
    flex-shrink: 0;
    overflow-y: auto;
    transition: background-color 0.35s ease, border-color 0.35s ease;
  }

  .brand-container {
    width: 100%;
    margin-bottom: 24px;
  }

  .brand-reveal-mask {
    overflow: hidden;
    padding-bottom: 8px;
  }

  .brand-logo {
    display: inline-block;
    font-size: 30px;
    letter-spacing: 0.05em;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 0.7s var(--ease-out-expo), opacity 0.7s ease, color 0.25s ease;
  }

  .brand-master-line {
    width: 100%;
    height: 1px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.75s var(--ease-out-expo), background-color 0.35s ease;
  }

  body.site-loaded .brand-master-line {
    transform: scaleX(1);
    transition-delay: 0.2s;
  }

  body.site-loaded .brand-logo {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.6s;
  }

  .desktop-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: 12px;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .nav-item {
    position: relative;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(-16px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo), border-color 0.3s ease;
  }

  body.site-loaded .nav-item {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(0.9s + (var(--item-idx, 0) * 0.12s));
  }

  .nav-btn {
    width: 100%;
    text-align: left;
    padding: 16px 0;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    transition: color 0.3s ease, padding-left 0.3s var(--ease-out-expo);
  }

  .nav-btn:hover {
    color: var(--color-accent);
    padding-left: 6px;
  }

  .nav-item.active .nav-btn {
    color: var(--color-accent);
    font-weight: 700;
  }

  .nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s var(--ease-out-expo), padding 0.35s ease;
    padding-left: 14px;
  }

  .nav-item.active .nav-submenu {
    max-height: 520px;
    padding-bottom: 16px;
  }

  .submenu-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 0;
    font-size: 15px;
    letter-spacing: 0.03em;
    color: var(--color-text-dim);
    position: relative;
    transition: color 0.25s ease, transform 0.25s var(--ease-out-expo);
  }

  .submenu-btn::before {
    content: '— ';
    opacity: 0;
    margin-right: 0px;
    transition: opacity 0.2s ease, margin-right 0.2s ease;
  }

  .submenu-btn:hover,
  .submenu-btn.active {
    color: var(--color-text);
    transform: translateX(6px);
  }

  .submenu-btn:hover::before,
  .submenu-btn.active::before {
    opacity: 1;
    margin-right: 6px;
  }

  .sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 24px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
  }

  body.site-loaded .sidebar-footer {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.6s;
  }

  .sidebar-copyright {
    font-size: 12px;
    color: var(--color-text-muted);
    letter-spacing: 0.03em;
  }

  .viewport-stage {
    flex: 1;
    height: 100vh;
  }

  .stage-body {
    padding: 0 32px 30px;
  }

  .stage-body:has(.vector-world-map-fullscreen) {
    padding: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: 100% !important;
    flex: 1;
  }
}

/* ==========================================================================
   3. THEME SWITCHER & LANGUAGE CONTROLS
   ========================================================================== */

.footer-controls,
.mobile-footer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.theme-btn {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.theme-btn:hover {
  color: var(--color-text);
}

.theme-label-white,
.theme-label-black {
  padding: 0 2px;
  position: relative;
  cursor: pointer;
  transition: color 0.25s ease, font-weight 0.25s ease;
}

.theme-label-white.active,
.theme-label-black.active {
  color: var(--color-text);
  font-weight: 700;
}

.theme-label-white.active::after,
.theme-label-black.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 2px;
  right: 2px;
  height: 1px;
  background-color: var(--color-text);
}

.theme-sep {
  color: var(--border-subtle);
  font-size: 12px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-btn {
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 2px 4px;
  position: relative;
  transition: color 0.25s ease;
}

.lang-btn:hover {
  color: var(--color-text);
}

.lang-btn.active {
  color: var(--color-text);
  font-weight: 700;
}

.lang-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 4px;
  right: 4px;
  height: 1px;
  background-color: var(--color-text);
}

.lang-sep {
  color: var(--border-subtle);
  font-size: 11px;
}

/* ==========================================================================
   4. FULL-VIEWPORT INTERACTIVE VECTOR WORLD MAP
   ========================================================================== */

.vector-world-map-fullscreen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 68px);
  min-height: calc(100dvh - 68px);
  flex: 1;
  display: flex;
  flex-direction: column;
  border: none;
  background-color: #080808;
  overflow: hidden;
  animation: fadeInContent 0.7s var(--ease-out-expo) forwards;
  transition: background-color 0.35s ease;
}

@media (min-width: 992px) {
  .vector-world-map-fullscreen {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
  }
}

body.theme-light .vector-world-map-fullscreen {
  background-color: #f4f4f4;
}

/* --- Top Bar Overlay Controls (Title Left, Project Type Selection Menu Right) --- */
.map-floating-topbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(to bottom, rgba(6, 6, 6, 0.95) 0%, rgba(6, 6, 6, 0.8) 70%, rgba(6, 6, 6, 0) 100%);
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  pointer-events: none;
  transition: background 0.35s ease;
}

@media (min-width: 992px) {
  .map-floating-topbar {
    padding: 20px 28px;
  }
}

body.theme-light .map-floating-topbar {
  background: linear-gradient(to bottom, rgba(244, 244, 244, 0.96) 0%, rgba(244, 244, 244, 0.8) 70%, rgba(244, 244, 244, 0) 100%);
}

.map-title-block {
  pointer-events: auto;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.map-title-text {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.03em;
}

.map-project-tally {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.map-project-tally strong {
  color: var(--color-text);
  font-weight: 700;
}

/* Top-Right Project Type Selection Menu Wrapper */
.map-topbar-right-controls {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.map-floating-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.map-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(128, 128, 128, 0.1);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--color-text-dim);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.map-filter-pill:hover {
  background: rgba(128, 128, 128, 0.2);
  color: var(--color-text);
}

.map-filter-pill.active {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
  font-weight: 700;
}

.status-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.pip-realisation { background-color: var(--color-status-realisation); }
.pip-inprogress { background-color: var(--color-status-inprogress); }
.pip-competition { background-color: var(--color-status-competition); }

.map-studio-dropdown-wrap {
  pointer-events: auto;
}

.map-studio-select {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- Mobile Responsive Map Header Controls (<= 991px) --- */
@media (max-width: 991px) {
  .map-floating-topbar {
    top: var(--header-height-mobile, 68px);
    padding: 10px 14px 14px;
    gap: 8px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.88) 75%, rgba(0, 0, 0, 0) 100%);
  }

  body.theme-light .map-floating-topbar {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.88) 75%, rgba(255, 255, 255, 0) 100%);
  }

  .map-title-block {
    display: none;
  }

  .map-topbar-right-controls {
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .map-floating-filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding-bottom: 2px;
  }

  .map-floating-filters::-webkit-scrollbar {
    display: none;
  }

  .map-filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 11px;
    padding: 5px 10px;
  }

  .map-studio-dropdown-wrap {
    width: 100%;
  }

  .map-studio-select {
    width: 100%;
    font-size: 11px;
    padding: 6px 8px;
  }
}

/* --- SVG Canvas Stage --- */
.map-canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  overflow: hidden;
  background-color: #080808;
  cursor: grab;
  user-select: none;
}

body.theme-light .map-canvas-container {
  background-color: #f4f4f4;
}

.world-map-svg-element {
  width: 100%;
  height: 100%;
  display: block;
}

.map-ocean-surface {
  fill: #080808;
  transition: fill 0.35s ease;
}

body.theme-light .map-ocean-surface {
  fill: #f4f4f4;
}

.map-continents-layer {
  pointer-events: none;
}

/* Clean, Constant Thin Border - Lighter, Clear Architectural Outlines */
.map-land-path {
  fill: #151515;
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 0.75px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: fill 0.35s ease, stroke 0.35s ease;
}

body.theme-light .map-land-path {
  fill: #e6e6e6;
  stroke: rgba(0, 0, 0, 0.32);
}

.graticule-line {
  stroke: rgba(255, 255, 255, 0.10);
  stroke-width: 0.5px;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 3 4;
  pointer-events: none;
  transition: stroke 0.35s ease;
}

body.theme-light .graticule-line {
  stroke: rgba(0, 0, 0, 0.10);
}

.graticule-line.equator,
.graticule-line.prime-meridian {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 0.7px;
}

body.theme-light .graticule-line.equator,
body.theme-light .graticule-line.prime-meridian {
  stroke: rgba(0, 0, 0, 0.18);
}

/* --- Uniform Clean Project Pins (Constant Physical Size) --- */
.map-pins-layer {
  pointer-events: auto;
}

.map-pin-node {
  cursor: pointer;
  outline: none;
}

.pin-hitbox {
  fill: transparent;
  cursor: pointer;
}

.pin-halo-ring {
  fill: rgba(0, 0, 0, 0.65);
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 0.8px;
  vector-effect: non-scaling-stroke;
  opacity: 0.7;
  transition: opacity 0.2s ease, stroke 0.2s ease, fill 0.3s ease;
}

body.theme-light .pin-halo-ring {
  fill: rgba(255, 255, 255, 0.7);
  stroke: rgba(0, 0, 0, 0.4);
}

/* Uniform Dot - Invertible Color */
.pin-dot {
  fill: #f4f4f4;
  transition: fill 0.2s ease;
}

body.theme-light .pin-dot {
  fill: #111111;
}

.map-pin-node:hover .pin-halo-ring,
.map-pin-node.is-active .pin-halo-ring {
  stroke: var(--color-accent);
  stroke-width: 1.5px;
  opacity: 1;
}

.map-pin-node:hover .pin-dot,
.map-pin-node.is-active .pin-dot {
  fill: var(--color-accent);
}

/* --- Floating Project Data Rectangle beside Hovered Dot --- */
.project-hover-card {
  position: absolute;
  z-index: 45;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: var(--color-surface);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  padding: 14px 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out-expo), transform 0.2s var(--ease-out-expo), background 0.35s ease;
  transform: translateY(4px);
}

body.theme-light .project-hover-card {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
  border-color: var(--border-color);
}

.project-hover-card.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.hover-card-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hover-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hover-card-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hover-card-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.hover-card-close-btn:hover {
  color: var(--color-text);
}

.hover-status-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border: 1px solid var(--border-subtle);
}

.hover-year {
  font-size: 11px;
  color: var(--color-text-muted);
}

.hover-project-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin: 0;
}

.hover-meta-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.meta-label {
  color: var(--color-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.meta-value {
  color: var(--color-text);
  font-weight: 300;
}

.hover-studio-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-text);
  font-weight: 400;
  border-bottom: 1px dotted var(--border-color);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hover-studio-link:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

.link-arrow {
  font-size: 11px;
}

.hover-monograph-btn {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  border: 1px solid var(--color-accent);
  transition: background 0.2s ease, color 0.2s ease;
}

.hover-monograph-btn:hover {
  background: transparent;
  color: var(--color-text);
}

/* --- Mobile Responsive Project Hover Card directly beside Dot --- */
@media (max-width: 767px) {
  .project-hover-card {
    width: 275px;
    max-width: calc(100vw - 20px);
    z-index: 60;
    padding: 12px 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
  }

  .hover-card-close-btn {
    display: block !important;
  }

  .hover-project-title {
    font-size: 14.5px !important;
  }

  .hover-meta-row {
    font-size: 11.5px !important;
  }

  .hover-monograph-btn {
    padding: 7px 10px !important;
    font-size: 11px !important;
  }
}

/* --- Bottom Navigation Bar (Region Focus Shortcuts) --- */
.map-bottom-controls {
  position: absolute;
  bottom: 24px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}

@media (min-width: 992px) {
  .map-bottom-controls {
    bottom: 28px;
    left: 28px;
    right: 28px;
  }
}

.region-shortcuts-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: var(--color-surface);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.region-bar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  padding: 0 6px;
}

.region-shortcut-btn {
  padding: 4px 8px;
  font-size: 11px;
  color: var(--color-text-dim);
  background: rgba(128, 128, 128, 0.08);
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.region-shortcut-btn:hover {
  background: rgba(128, 128, 128, 0.2);
  color: var(--color-text);
}

.region-shortcut-btn.active {
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 700;
}

/* --- Mobile Responsive Map Bottom Controls (<= 991px) --- */
@media (max-width: 991px) {
  .map-bottom-controls {
    bottom: 12px;
    left: 8px;
    right: 8px;
    width: calc(100% - 16px);
  }

  .region-shortcuts-bar {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    gap: 3px;
    padding: 3px 5px;
  }

  .region-shortcuts-bar::-webkit-scrollbar {
    display: none;
  }

  .region-bar-label {
    display: none;
  }

  .region-shortcut-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 10px;
    padding: 5px 8px;
  }
}

.map-interaction-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  pointer-events: none;
  display: none;
}

@media (min-width: 900px) {
  .map-interaction-hint {
    display: block;
  }
}

/* ==========================================================================
   ARCHITECTURE INTRO MANIFESTO STAGE
   ========================================================================== */

.stage-body:has(.architecture-intro-stage) {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 100% !important;
  padding: 40px 24px 60px !important;
  max-width: 100% !important;
  margin: 0 !important;
  flex: 1 !important;
}

@media (max-width: 991px) {
  .stage-body:has(.architecture-intro-stage) {
    padding: 80px 20px 60px !important;
    display: block !important;
    height: auto !important;
  }
}

.architecture-intro-stage {
  width: 100%;
  max-width: 1550px;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 120px);
  min-height: calc(100dvh - 120px);
  padding: 20px 10px 30px;
  animation: fadeInContent 0.6s var(--ease-out-expo) forwards;
}

@media (min-width: 992px) {
  .architecture-intro-stage {
    padding: 40px 30px 40px;
    min-height: 82vh;
  }
}

.architecture-statement-wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.5vh, 48px);
  max-width: 1450px;
}

.architecture-statement-p {
  font-size: clamp(22px, 2.7vw, 42px);
  line-height: 1.42;
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

body.theme-light .architecture-statement-p {
  color: #111111;
}

.architecture-projects-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  padding-top: 40px;
  margin-top: auto;
}

.architecture-map-btn {
  background: transparent;
  border: none;
  padding: 10px 0;
  cursor: pointer;
  outline: none;
  color: var(--color-text);
  font-family: inherit;
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.25s var(--ease-out-expo), color 0.25s ease, letter-spacing 0.25s ease;
}

.architecture-map-btn:hover {
  color: var(--color-accent);
  letter-spacing: 0.08em;
  transform: translateX(6px);
}

body.theme-light .architecture-map-btn {
  color: #000000;
}

body.theme-light .architecture-map-btn:hover {
  color: #555555;
}

/* ==========================================================================
   DIGITALISATION LIVE CODING ANIMATION STAGE (BORDERLESS & CENTERED)
   ========================================================================== */

.content-stage:has(.digitalisation-stage-wrapper) {
  display: flex !important;
  flex-direction: column !important;
}

.stage-body:has(.digitalisation-stage-wrapper) {
  padding: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100% !important;
}

@media (max-width: 991px) {
  .stage-body:has(.digitalisation-stage-wrapper) {
    padding: 70px 16px 60px !important;
    display: block !important;
    height: auto !important;
  }
}

.digitalisation-stage-wrapper {
  width: 100%;
  max-width: min(1680px, 94vw);
  margin: auto;
  padding: 30px 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  animation: fadeInContent 0.6s var(--ease-out-expo) forwards;
}

@media (max-width: 991px) {
  .digitalisation-stage-wrapper {
    padding: 10px 0 40px;
    min-height: auto;
  }
}

@media (min-width: 992px) {
  .digitalisation-stage-wrapper {
    padding: 40px 32px 50px;
  }
}

.digitalisation-code-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  align-items: start;
  justify-content: center;
}

.code-column-left,
.code-column-right {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.code-column-left .code-pre,
.code-column-right .code-pre {
  width: 100%;
  text-align: left;
}

@media (min-width: 1280px) {
  .digitalisation-code-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(50px, 4.5vw, 90px);
    max-width: 100%;
    margin: 0;
  }

  .code-column-left {
    justify-content: flex-end;
    width: 100%;
  }

  .code-column-right {
    justify-content: flex-start;
    width: 100%;
  }

  .code-column-left .code-pre,
  .code-column-right .code-pre {
    width: auto;
    text-align: left;
  }
}

.code-column {
  background: transparent;
  border: none;
  padding: 0;
  position: relative;
  overflow: visible;
  min-width: 0;
}

body.theme-light .code-column {
  background: transparent;
  border: none;
}

.code-pre {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: clamp(16px, 1.6vw, 23px);
  line-height: 1.8;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: normal;
  overflow: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.code-pre::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

@media (min-width: 1200px) {
  .code-pre {
    white-space: nowrap;
  }
}

.code-line {
  min-height: 1.8em;
  display: block;
}

.code-line.empty-line {
  height: 1.25em;
}

/* Syntax Highlighting & Specific Hierarchy */
.code-kw {
  color: var(--color-text-dim);
  font-weight: 400;
}

.code-class-name {
  font-weight: 700 !important;
  color: var(--color-accent) !important;
  letter-spacing: -0.01em;
}

.code-func-name {
  font-style: italic !important;
  font-weight: 600;
  color: var(--color-text) !important;
}

.code-call {
  color: var(--color-text-dim);
  transition: color 0.2s ease;
}

.code-line:hover .code-call {
  color: var(--color-accent);
}

/* Blinking Terminal Cursor */
.typing-cursor {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 700;
  margin-left: 2px;
  animation: cursorBlink 0.9s infinite step-start;
  vertical-align: baseline;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Bottom Centre Enquire Button with Flashing Cursor */
.digitalisation-enquire-wrap {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo), visibility 0.6s;
  pointer-events: none;
}

.digitalisation-enquire-wrap.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.digitalisation-enquire-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: clamp(20px, 2.0vw, 29px);
  font-weight: 700;
  color: var(--color-text);
  background: transparent;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  letter-spacing: 0.03em;
  outline: none;
  transition: font-weight 0.15s ease, letter-spacing 0.15s ease, transform 0.2s ease;
}

.digitalisation-enquire-btn:hover {
  font-weight: 900;
  -webkit-text-stroke: 0.5px currentColor;
  letter-spacing: 0.06em;
  background: transparent;
  border: none;
  color: var(--color-text);
  transform: scale(1.03);
}

.enquire-btn-text {
  font-weight: inherit;
}

.enquire-btn-cursor {
  color: var(--color-accent);
  font-weight: inherit;
  animation: cursorBlink 0.9s infinite step-start;
}

/* ==========================================================================
   5. J. MAYER H. EDITORIAL MAGAZINE-STYLE PROJECT PAGE
   ========================================================================== */

.editorial-project-page {
  display: flex;
  flex-direction: column;
  gap: 60px;
  animation: fadeInContent 0.7s var(--ease-out-expo) forwards;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 10px;
}

.editorial-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editorial-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}

.editorial-title {
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text);
  line-height: 1.1;
  text-transform: none;
}

.editorial-master-rule {
  width: 100%;
  height: 1px;
  background-color: var(--border-color);
  margin-top: 16px;
}

.editorial-facts-ribbon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
  .editorial-facts-ribbon {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }
}

.fact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.fact-value {
  font-size: 15px;
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.4;
}

.editorial-intro-container {
  padding: 10px 0 20px;
}

.editorial-lead-text {
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.6;
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.editorial-img-box {
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  width: 100%;
}

.editorial-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(106%);
  transform: scale(1);
  transition: filter 0.6s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.editorial-img-box:hover img,
.editorial-img-box:focus img,
.editorial-img-box.active-in-view img {
  filter: grayscale(0%) contrast(103%) brightness(1.02);
  transform: scale(1.02);
}

.media-caption {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-text-dim);
  margin-top: 10px;
  line-height: 1.4;
  font-weight: 300;
}

.editorial-hero-spread {
  width: 100%;
  margin: 10px 0;
}

.editorial-hero-spread .editorial-img-box {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.editorial-asymmetric-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  margin: 20px 0;
}

@media (min-width: 860px) {
  .editorial-asymmetric-row {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
  }
  
  .editorial-asymmetric-row.align-right-text {
    grid-template-columns: 0.9fr 1.1fr;
  }
  
  .editorial-asymmetric-row.align-right-text .editorial-text-col {
    order: 2;
  }
  
  .editorial-asymmetric-row.align-right-text .editorial-media-col {
    order: 1;
  }
}

.editorial-text-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editorial-subheading {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.editorial-paragraph {
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text-dim);
  font-weight: 300;
}

.editorial-quote-card {
  border-left: 2px solid var(--color-accent);
  padding: 12px 0 12px 20px;
  margin: 8px 0;
}

.editorial-quote-card p {
  font-size: 19px;
  font-style: italic;
  line-height: 1.6;
  color: var(--color-text);
}

.editorial-media-col .portrait-box {
  aspect-ratio: 2 / 3;
  max-width: 440px;
  margin: 0 auto;
}

.editorial-mixed-format-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  margin: 20px 0;
}

@media (min-width: 860px) {
  .editorial-mixed-format-row {
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
  }
}

.editorial-mixed-format-row .landscape-box {
  aspect-ratio: 16 / 11;
}

.editorial-mixed-format-row .portrait-box {
  aspect-ratio: 2 / 3;
}

.editorial-duo-portraits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 20px 0;
}

@media (min-width: 640px) {
  .editorial-duo-portraits {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

.editorial-duo-portraits .portrait-box {
  aspect-ratio: 2 / 3;
}

.editorial-credits-section {
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
  margin-top: 40px;
}

.credits-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.credit-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.credit-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.credit-val {
  font-size: 15px;
  color: var(--color-text);
  font-weight: 400;
  line-height: 1.5;
}

.editorial-next-banner {
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out-expo);
}

.editorial-next-banner:hover {
  transform: translateX(8px);
}

.next-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}

.next-project-title {
  font-size: clamp(24px, 3.5vw, 36px);
  color: var(--color-text);
  font-weight: 400;
  margin-top: 6px;
}

.next-arrow {
  font-size: 32px;
  color: var(--color-text);
  transition: transform 0.3s var(--ease-out-expo);
}

.editorial-next-banner:hover .next-arrow {
  transform: translateX(8px);
}

/* ==========================================================================
   6. STANDARD CATEGORY OVERVIEW & VIEWS (About, Enquire)
   ========================================================================== */

.project-showcase {
  display: flex;
  flex-direction: column;
  gap: 40px;
  animation: fadeInContent 0.6s var(--ease-out-expo) forwards;
}

.project-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.project-category-tag {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
  margin-bottom: 8px;
}

.project-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--color-text);
  line-height: 1.2;
}

.project-media-container {
  width: 100%;
  position: relative;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background-color: var(--color-bg-alt);
}

.project-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: grayscale(100%) contrast(108%);
  transition: transform 0.6s var(--ease-out-expo), filter 0.5s ease;
}

.project-image:hover {
  filter: grayscale(0%) contrast(104%);
  transform: scale(1.02);
}

.project-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .project-details-grid {
    grid-template-columns: 1.8fr 1fr;
    gap: 48px;
  }
}

.project-description {
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-dim);
  font-weight: 300;
}

.project-metadata {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 1px solid var(--border-color);
  padding-left: 24px;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.meta-value {
  font-size: 15px;
  color: var(--color-text);
  font-weight: 400;
}

.category-overview {
  display: flex;
  flex-direction: column;
  gap: 36px;
  animation: fadeInContent 0.6s var(--ease-out-expo) forwards;
}

.category-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.category-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  margin-bottom: 8px;
}

.category-subtitle {
  font-size: 17px;
  color: var(--color-text-dim);
  font-weight: 300;
  max-width: 720px;
}

.projects-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.project-card {
  border: 1px solid var(--border-color);
  background: var(--color-surface);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out-expo), border-color 0.35s ease, background 0.35s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent);
  background: var(--color-surface);
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--color-bg-alt);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(108%);
  transition: transform 0.5s var(--ease-out-expo), filter 0.5s ease;
}

.project-card:hover .card-img-wrap img {
  transform: scale(1.05);
  filter: grayscale(0%) contrast(104%);
}

.card-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.card-title {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-text);
}

.about-view {
  display: flex;
  flex-direction: column;
  gap: 40px;
  animation: fadeInContent 0.6s var(--ease-out-expo) forwards;
}

.about-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.about-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 400;
  margin-bottom: 6px;
}

.about-role {
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
  text-transform: uppercase;
}

.about-narrative {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 840px;
}

.about-paragraph {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text-dim);
  font-weight: 300;
}

.disciplines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.discipline-card {
  border: 1px solid var(--border-subtle);
  background: rgba(128, 128, 128, 0.03);
  padding: 24px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.discipline-card:hover {
  border-color: var(--border-color);
  background: rgba(128, 128, 128, 0.08);
}

.discipline-number {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.discipline-title {
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--color-text);
}

.discipline-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-dim);
  font-weight: 300;
}

.stage-body:has(.enquire-view) {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100% !important;
  padding: 40px 24px 60px !important;
}

@media (max-width: 991px) {
  .stage-body:has(.enquire-view) {
    padding: 70px 16px 60px !important;
    display: block !important;
    height: auto !important;
  }
}

.enquire-view {
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: fadeInContent 0.6s var(--ease-out-expo) forwards;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.enquire-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.enquire-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  margin-bottom: 8px;
}

.enquire-subtitle {
  font-size: 16px;
  color: var(--color-text-dim);
  font-weight: 300;
  line-height: 1.6;
}

.enquire-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(128, 128, 128, 0.04);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-accent);
  background: rgba(128, 128, 128, 0.09);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

body.theme-light .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-select option {
  background-color: var(--color-bg);
  color: var(--color-text);
  padding: 10px;
}

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

.hp-input-wrap {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 12px;
}

@media (min-width: 600px) {
  .form-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--color-accent);
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s var(--ease-out-expo);
}

.submit-btn:hover {
  background: transparent;
  color: var(--color-text);
  transform: translateY(-2px);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.direct-contact {
  font-size: 13px;
  color: var(--color-text-dim);
  letter-spacing: 0.04em;
}

.direct-contact a {
  color: var(--color-text);
  border-bottom: 1px solid var(--border-color);
}

.form-feedback {
  padding: 20px;
  border: 1px solid var(--border-color);
  background: rgba(128, 128, 128, 0.08);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  display: none;
  animation: fadeInContent 0.4s ease forwards;
}

.form-feedback.show {
  display: block;
}

/* ==========================================================================
   7. KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==========================================================================
   RESEARCH & PUBLICATIONS PAGE (Alternating Editorial Grid)
   ========================================================================== */

.stage-body:has(.research-page-wrapper) {
  padding: 40px 32px 90px !important;
  max-width: 1550px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

@media (max-width: 991px) {
  .stage-body:has(.research-page-wrapper) {
    padding: 75px 18px 60px !important;
  }
}

.research-page-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 50px;
  animation: fadeInContent 0.6s var(--ease-out-expo) forwards;
}

/* Header */
.research-header-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  gap: 24px;
  flex-wrap: wrap;
}

.research-header-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 880px;
}

.research-title {
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.research-subtitle {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.65;
  color: var(--color-text-dim);
  font-weight: 300;
}

.research-orcid-action {
  flex-shrink: 0;
}

.orcid-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  background: rgba(128, 128, 128, 0.06);
  color: var(--color-text);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.orcid-badge-btn:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.orcid-icon {
  width: 16px;
  height: 16px;
}

/* Alternating Entries List */
.research-entries-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

@media (min-width: 992px) {
  .research-entries-list {
    gap: 80px;
  }
}

.research-entry-card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 50px;
}

@media (min-width: 900px) {
  .research-entry-card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 52px;
    align-items: center;
    padding-bottom: 70px;
  }

  .research-entry-card.is-reversed {
    grid-template-columns: 1fr 1.05fr;
  }

  .research-entry-card.is-reversed .research-entry-media {
    order: 2;
  }

  .research-entry-card.is-reversed .research-entry-content {
    order: 1;
  }
}

/* Media Frame */
.research-entry-media {
  width: 100%;
}

.research-media-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.theme-light .research-media-frame {
  background: rgba(0, 0, 0, 0.02);
}

.research-media-img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  display: block;
  filter: grayscale(15%) contrast(102%);
  transition: transform 0.6s var(--ease-out-expo), filter 0.4s ease;
}

.research-entry-card:hover .research-media-img {
  transform: scale(1.02);
  filter: grayscale(0%) contrast(105%);
}

.research-media-frame.research-media-multi {
  padding: 10px;
}

.research-multi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  align-items: center;
}

.research-multi-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.01);
}

.research-multi-item .research-media-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
}

@media (max-width: 600px) {
  .research-multi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.research-media-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  text-transform: uppercase;
}

body.theme-light .research-media-badge {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(0, 0, 0, 0.25);
  color: #000000;
}

/* Content */
.research-entry-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.research-meta-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.research-type-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  font-weight: 700;
}

.research-date-tag {
  font-size: 12px;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
}

.research-entry-title {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.35;
  font-weight: 400;
  color: var(--color-text);
  margin: 0;
}

.research-entry-venue {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.research-entry-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-dim);
  font-weight: 300;
  margin: 0;
}



.research-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 3px;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.research-link-btn:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  transform: translateX(4px);
}



@keyframes targetArticlePulse {
  0% {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
  }
  60% {
    background-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

body.theme-light .research-entry-card.is-target-highlight {
  background-color: rgba(0, 0, 0, 0.04);
}

.research-entry-card.is-target-highlight {
  animation: targetArticlePulse 3s ease-out;
  border-radius: 4px;
}

/* Research Entry Actions & Direct Link Share */
.research-entry-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 14px;
}

.research-copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 2px 0;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
  font-family: inherit;
  opacity: 0.7;
}

.research-copy-link-btn:hover {
  color: var(--color-text-main);
  opacity: 1;
  background: transparent;
}

body.theme-light .research-copy-link-btn:hover {
  color: #000000;
}

.research-copy-link-btn.copied {
  color: #22c55e !important;
  opacity: 1 !important;
}

.research-copy-link-btn svg {
  transition: transform 0.2s ease;
}

.research-copy-link-btn:hover svg {
  transform: translateX(2px);
}
