/* 3-Dees Visuals — Dual-Track Design System
   Spatial Studio (arch) · Digital Lab (web) */

@import url("site-grid.css");
/* Shared Digital Lab glow + pixel cursor (safe on arch — chrome is scoped) */
@import url("web-surface.css");

:root {
  --header-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Semantic tokens — overridden per theme */
  --theme-bg: #F4F4F2;
  --theme-bg-elevated: #ffffff;
  --theme-text: #161617;
  --theme-muted: #5c5c59;
  --theme-accent: #4A6E8D;
  --theme-accent-deep: #3B5267;
  --theme-line: rgba(22, 22, 23, 0.1);
  --theme-header-bg: rgba(244, 244, 242, 0.92);
  --theme-font: Inter, system-ui, sans-serif;
  --theme-font-display: "Space Grotesk", Inter, sans-serif;
  --theme-radius: 0;
  --theme-shadow: 0 8px 28px rgba(22, 22, 23, 0.08);
}

/* ——— Spatial Studio ——— */
body.theme-arch,
html[data-track="arch"] body {
  --theme-bg: #F4F4F2;
  --theme-bg-elevated: #ffffff;
  --theme-text: #161617;
  --theme-muted: #5c5c59;
  --theme-accent: #4A6E8D;
  --theme-accent-deep: #3B5267;
  --theme-line: rgba(22, 22, 23, 0.1);
  --theme-header-bg: rgba(244, 244, 242, 0.92);
  --theme-font: Inter, system-ui, sans-serif;
  --theme-font-display: "Space Grotesk", Inter, sans-serif;
  --theme-radius: 0;
  --theme-shadow: 0 8px 28px rgba(22, 22, 23, 0.08);
}

/* ——— Digital Lab (Editorial High-End / warm canvas) ——— */
body.theme-web,
html[data-track="web"] body {
  --theme-bg: #F4F0EA;
  --theme-bg-elevated: #FFFCF8;
  --theme-text: #161617;
  --theme-muted: #6B6670;
  --theme-accent: #00A8A8;
  --theme-accent-glow: #66FCF1;
  --theme-accent-deep: #008080;
  --theme-line: rgba(22, 22, 23, 0.1);
  --theme-header-bg: rgba(244, 240, 234, 0.86);
  --theme-font: Inter, system-ui, sans-serif;
  --theme-font-display: "Space Grotesk", Inter, sans-serif;
  --theme-radius: 4px;
  --theme-shadow: 0 12px 36px rgba(22, 22, 23, 0.08);
  --theme-glow-teal: rgba(0, 168, 168, 0.09);
  --theme-glow-warm: rgba(200, 160, 120, 0.1);
  --web-grid-line: rgba(0, 128, 128, 0.09);
  --web-grid-opacity: 0.9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--theme-bg);
  color: var(--theme-text);
  font-family: var(--theme-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

body.theme-web,
html[data-track="web"] body {
  color-scheme: light;
  background-color: var(--theme-bg);
  color: var(--theme-text);
  background-image:
    radial-gradient(ellipse 85% 55% at 72% 18%, var(--theme-glow-teal), transparent 58%),
    radial-gradient(ellipse 70% 50% at 12% 78%, var(--theme-glow-warm), transparent 55%);
}

.theme-web .page-hero,
.theme-web .page-intro,
.theme-web .section-label,
.theme-web .filter-buttons,
.theme-web .projects-grid,
.theme-web .cta-band,
.theme-web .track-footer {
  color: var(--theme-text);
}

.theme-web .page-intro {
  color: var(--theme-muted);
}

body.theme-web h1,
body.theme-web h2,
body.theme-web h3,
html[data-track="web"] body h1,
html[data-track="web"] body h2,
html[data-track="web"] body h3 {
  color: var(--theme-text);
}

body.theme-web p,
html[data-track="web"] body p {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--theme-accent);
  color: #0a0a0c;
  font-size: 13px;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ——— Dual-track header ——— */
.track-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--theme-header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.track-header--arch {
  border-bottom: 1px solid var(--theme-line);
}

.track-header--web {
  border-bottom: 1px solid var(--theme-line);
  box-shadow: 0 4px 18px rgba(22, 22, 23, 0.04);
}

.track-header[hidden] {
  display: none !important;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--theme-font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo-image {
  height: 34px;
  width: auto;
}

.theme-web .logo-image {
  filter: none;
}

.theme-web .section-label {
  font-family: Inter, sans-serif;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.logo__slash {
  color: var(--theme-muted);
  font-weight: 500;
}

.logo__track {
  color: var(--theme-accent);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.theme-arch .logo__track {
  color: var(--theme-muted);
  font-family: "Architects Daughter", cursive;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.95rem;
}

.main-nav {
  flex: 1;
  min-width: 0;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 18px;
}

.main-nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--theme-muted);
  padding: 6px 0;
  transition: color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--theme-text);
}

.theme-arch .main-nav a.active {
  border-bottom: 1px solid var(--theme-text);
}

.theme-web .main-nav a.active {
  box-shadow: inset 0 -1px 0 var(--theme-accent);
  color: var(--theme-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.track-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  font-family: var(--theme-font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid var(--theme-line);
  background: transparent;
  color: var(--theme-muted);
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease-out);
}

.track-switch:hover {
  color: var(--theme-text);
  border-color: var(--theme-text);
  transform: translateY(-1px);
}

.theme-web .track-switch {
  border-color: rgba(0, 168, 168, 0.35);
  color: var(--theme-accent-deep);
  border-radius: 8px;
  background: rgba(255, 252, 248, 0.6);
}

.theme-web .track-switch:hover {
  background: rgba(0, 168, 168, 0.08);
  border-color: var(--theme-accent);
  color: var(--theme-text);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  font-family: var(--theme-font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--theme-text);
  background: var(--theme-text);
  color: var(--theme-bg);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}

.cta-button:hover {
  background: transparent;
  color: var(--theme-text);
  transform: translateY(-1px);
}

.theme-web .cta-button {
  border-color: rgba(0, 168, 168, 0.45);
  background: transparent;
  color: var(--theme-text);
  border-radius: 999px;
  font-family: Inter, sans-serif;
}

.theme-web .cta-button:hover {
  background: rgba(0, 168, 168, 0.1);
  border-color: var(--theme-accent);
  color: var(--theme-accent-deep);
}

.theme-web .cta-button.solid {
  background: var(--theme-accent-deep);
  border-color: var(--theme-accent-deep);
  color: #F4F0EA;
}

.theme-web .cta-button.solid:hover {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: #0a0a0c;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--theme-line);
  width: 42px;
  height: 42px;
  font-size: 1.15rem;
  color: var(--theme-text);
  cursor: pointer;
}

/* ——— Page sections ——— */
.standard-section {
  padding: 80px 20px;
}

.section-label {
  font-family: var(--theme-font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--theme-accent);
  margin: 0 0 12px;
}

.page-hero {
  padding: 72px 20px 40px;
  text-align: left;
}

.page-hero h1 {
  font-family: var(--theme-font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  line-height: 1.1;
}

.page-intro {
  font-size: 1.05rem;
  color: var(--theme-muted);
  max-width: 640px;
  line-height: 1.65;
  margin: 0;
}

/* ——— Projects grid ——— */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 40px;
}

.filter-buttons button {
  background: transparent;
  border: 1px solid var(--theme-line);
  color: var(--theme-muted);
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  border-radius: var(--theme-radius);
}

.filter-buttons button:hover,
.filter-buttons button.active {
  color: var(--theme-text);
  border-color: var(--theme-text);
}

.theme-web .filter-buttons button {
  border-color: var(--theme-line);
  color: var(--theme-muted);
  border-radius: 999px;
}

.theme-web .filter-buttons button:hover,
.theme-web .filter-buttons button.active {
  color: #0a0a0c;
  background: linear-gradient(180deg, #66FCF1 0%, #00A8A8 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(0, 168, 168, 0.22);
}

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

.project-item {
  overflow: hidden;
  background: var(--theme-bg-elevated);
  border: 1px solid var(--theme-line);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.3s ease;
  color: var(--theme-text);
}

.project-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--theme-shadow);
}

.theme-web .project-item {
  background: var(--theme-bg-elevated);
  border-color: var(--theme-line);
  border-radius: 8px;
}

.theme-web .project-item:hover {
  border-color: rgba(0, 168, 168, 0.45);
}

.project-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.project-title {
  padding: 16px;
  flex: 1;
  background: var(--theme-bg-elevated);
  color: var(--theme-text);
}

.project-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-accent);
  border: 1px solid var(--theme-accent);
  padding: 3px 9px;
  margin-bottom: 10px;
  border-radius: 999px;
}

.project-title h3 {
  font-family: var(--theme-font-display);
  font-size: 1.15rem;
  margin: 0;
  font-weight: 600;
  color: var(--theme-text);
}

.project-title p {
  font-size: 0.9rem;
  color: var(--theme-muted);
  margin: 8px 0 0;
  line-height: 1.5;
}

.cta-band {
  padding: 72px 20px;
  text-align: center;
  border-top: 1px solid var(--theme-line);
  background: transparent;
  color: var(--theme-text);
}

.cta-band h2 {
  font-family: var(--theme-font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px;
  color: var(--theme-text);
}

.cta-band p {
  color: var(--theme-muted);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.theme-web .cta-band {
  background:
    radial-gradient(ellipse 70% 80% at 50% 100%, rgba(0, 168, 168, 0.08), transparent 60%);
}

/* ——— About / Contact content ——— */
.mission-block {
  font-size: 1.15rem;
  color: var(--theme-muted);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 0 48px;
}

.team-section {
  display: flex;
  gap: 48px;
  align-items: center;
  margin: 48px 0;
}

.team-member {
  display: flex;
  gap: 48px;
  align-items: center;
  width: 100%;
}

.team-member-image {
  flex: 0 0 min(360px, 40%);
}

.team-member-image img {
  width: 100%;
  height: auto;
  border: 1px solid var(--theme-line);
}

.team-member-content h3 {
  font-family: var(--theme-font-display);
  font-size: 1.75rem;
  margin: 0 0 8px;
  color: var(--theme-accent);
}

.team-member .title {
  font-weight: 600;
  margin: 0 0 8px;
}

.about-degree {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--theme-bg-elevated);
  border: 1px solid var(--theme-line);
  border-radius: 50px;
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--theme-accent);
  margin: 0 0 16px;
}

.hku-logo {
  height: 22px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.team-member .bio {
  color: var(--theme-muted);
  line-height: 1.65;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.value-card {
  padding: 24px;
  border: 1px solid var(--theme-line);
  background: var(--theme-bg-elevated);
}

.value-card h3 {
  font-family: var(--theme-font-display);
  color: var(--theme-accent);
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.value-card p {
  margin: 0;
  color: var(--theme-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.testimonials p {
  color: var(--theme-muted);
  font-style: italic;
  line-height: 1.65;
  max-width: 720px;
  margin: 0 0 20px;
}

.contact-form-container {
  max-width: 560px;
  margin: 36px 0 0;
  padding: 32px;
  background: var(--theme-bg-elevated);
  border: 1px solid var(--theme-line);
  text-align: left;
}

.contact-form-container label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.contact-form-container input,
.contact-form-container select,
.contact-form-container textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--theme-line);
  border-radius: var(--theme-radius);
  background: var(--theme-bg);
  color: var(--theme-text);
  font-family: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

.contact-form-container input:focus,
.contact-form-container select:focus,
.contact-form-container textarea:focus {
  outline: none;
  border-color: var(--theme-accent);
}

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

.contact-form-container button[type="submit"] {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--theme-text);
  background: var(--theme-text);
  color: var(--theme-bg);
  font-family: var(--theme-font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.contact-form-container button[type="submit"]:hover {
  background: transparent;
  color: var(--theme-text);
}

.theme-web .contact-form-container button[type="submit"] {
  background: var(--theme-accent-deep);
  border-color: var(--theme-accent-deep);
  color: #F4F0EA;
  border-radius: 999px;
}

.theme-web .contact-form-container button[type="submit"]:hover {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  color: #0a0a0c;
}

.contact-details {
  margin-top: 36px;
}

.contact-details p {
  color: var(--theme-muted);
}

.contact-details a {
  color: var(--theme-accent);
}

/* ——— Footer ——— */
.track-footer {
  padding: 36px 0;
  border-top: 1px solid var(--theme-line);
  margin-top: 40px;
}

.track-footer[hidden] {
  display: none !important;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-content p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--theme-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--theme-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--theme-accent);
}

/* ——— Responsive ——— */
.nav-switch {
  display: none;
}

@media screen and (max-width: 900px) {
  .nav-switch {
    display: list-item;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--theme-line);
  }

  .nav-switch a {
    color: var(--theme-accent) !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--theme-header-bg);
    border-bottom: 1px solid var(--theme-line);
    backdrop-filter: blur(14px);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 20px;
    gap: 14px;
    justify-content: flex-start;
  }

  .header-content {
    position: relative;
    flex-wrap: wrap;
  }

  .track-switch {
    display: none;
  }

  .header-actions .cta-button {
    padding: 10px 14px;
  }

  .team-member {
    flex-direction: column;
    text-align: left;
  }

  .team-member-image {
    flex: none;
    width: 100%;
    max-width: 420px;
  }

  .page-hero,
  .standard-section,
  .cta-band {
    padding-left: 16px;
    padding-right: 16px;
  }

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

@media screen and (max-width: 560px) {
  .logo__track {
    display: none;
  }

  .logo__slash {
    display: none;
  }
}
