/* ==========================================================================
   TRANTIK — Editorial Minimalism Stylesheet
   Local Fonts: itf Fatimah Arabic (300, 400, 500, 700, 900)
   ========================================================================== */

@font-face {
  font-family: 'itf Fatimah Arabic';
  src: url('assets/fonts/itfFatimahArabic-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'itf Fatimah Arabic';
  src: url('assets/fonts/itfFatimahArabic-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'itf Fatimah Arabic';
  src: url('assets/fonts/itfFatimahArabic-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'itf Fatimah Arabic';
  src: url('assets/fonts/itfFatimahArabic-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'itf Fatimah Arabic';
  src: url('assets/fonts/itfFatimahArabic-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F5F0;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #ECEAE3;
  --ink: #14161A;
  --ink-muted: #5A5E66;
  --ink-faint: #8C9099;
  --line: rgba(20, 22, 26, 0.11);
  --line-strong: rgba(20, 22, 26, 0.22);
  --accent: #223244;
  --glass-bg: rgba(246, 245, 240, 0.78);
  --glass-border: rgba(20, 22, 26, 0.10);
  --monolith-bg: #121419;
  --monolith-surface: rgba(255, 255, 255, 0.04);
  --monolith-border: rgba(255, 255, 255, 0.12);

  --font-ar: 'itf Fatimah Arabic', system-ui, -apple-system, sans-serif;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1240px;
}

body.theme-dark {
  --bg: #0F1116;
  --bg-elevated: #171A21;
  --bg-subtle: #1A1D24;
  --ink: #F2F1EC;
  --ink-muted: #A4A8B2;
  --ink-faint: #6F7480;
  --line: rgba(242, 241, 236, 0.12);
  --line-strong: rgba(242, 241, 236, 0.24);
  --glass-bg: rgba(15, 17, 22, 0.76);
  --glass-border: rgba(242, 241, 236, 0.12);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-ar);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
  transition: background-color 0.75s var(--ease-editorial), color 0.75s var(--ease-editorial);
}

html[lang="en"] body {
  font-family: var(--font-en);
  line-height: 1.65;
}

/* Subtle paper grain */
.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress hairline */
.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 2px;
  width: 0%;
  background: var(--ink);
  z-index: 120;
  transition: background-color 0.6s ease;
}

/* Subtle desktop cursor */
.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 150;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--bg);
  background: transparent;
  transition: width 0.35s var(--ease-editorial),
              height 0.35s var(--ease-editorial),
              background-color 0.35s var(--ease-editorial),
              border-color 0.35s var(--ease-editorial),
              opacity 0.3s ease;
}

.cursor-ring.is-labeled {
  width: auto;
  min-width: 84px;
  height: 30px;
  padding: 0 14px;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

@media (hover: none), (pointer: coarse) {
  .cursor-ring, .cursor-dot { display: none !important; }
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding 0.4s var(--ease-editorial), background-color 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  padding: 12px 0;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border-bottom-color: var(--glass-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.brand-link:hover {
  opacity: 0.75;
}

/* Logo colour versions: black on light pages, white on dark */
.logo-dark { display: none !important; }
body.theme-dark .logo-light { display: none !important; }
body.theme-dark .logo-dark { display: block !important; }

.brand-mark {
  height: 28px;
  width: auto;
  display: block;
}

.brand-wordmark {
  height: 13px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  transition: color 0.3s ease;
}

.nav-links a .nav-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  appearance: none;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.lang-toggle:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

/* ==========================================================================
   Section Scaffolding
   ========================================================================== */
.editorial-section {
  padding-block: clamp(88px, 11vw, 152px);
  border-top: 1px solid var(--line);
  position: relative;
}

.editorial-section:first-of-type {
  border-top: none;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(200px, 3fr) minmax(0, 9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.section-meta {
  position: sticky;
  top: 108px;
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.section-index::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--line-strong);
}

.section-title {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.section-subtitle-en {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   01 — Hero
   ========================================================================== */
.hero-section {
  min-height: 100svh;
  padding-top: clamp(128px, 15vh, 176px);
  padding-bottom: clamp(64px, 8vw, 112px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 6vw, 76px);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.hero-top-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 7.5fr) minmax(280px, 4.5fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: end;
}

.hero-headline {
  font-size: clamp(2.45rem, 5.4vw, 4.65rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 28px;
}

html[lang="en"] .hero-headline {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero-lead {
  font-size: clamp(1.08rem, 1.55vw, 1.32rem);
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink-muted);
  max-width: 640px;
}

/* Hero logo, placed directly on the page */
.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 12px;
}

.hero-logo img {
  width: min(340px, 85%);
  height: auto;
  display: block;
}

/* Liquid Glass TRANTIK Monolith Card (no longer used) */
.glass-monolith {
  position: relative;
  border-radius: 22px;
  background: radial-gradient(120% 120% at 20% 10%, #232732 0%, #111318 65%, #0B0C10 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: clamp(32px, 4vw, 48px);
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 28px 60px -24px rgba(15, 17, 22, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease-editorial);
}

.glass-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.14), transparent 60%);
  transition: opacity 0.4s ease;
}

.monolith-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(242, 241, 236, 0.52);
  letter-spacing: 0.08em;
}

.monolith-logo-wrap {
  padding-block: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(24px);
}

.monolith-logo {
  width: min(240px, 82%);
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.45));
}

.monolith-bottom {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 0.78rem;
  color: rgba(242, 241, 236, 0.68);
}

/* Highlighted 2012 & +12 Architectural Figures */
.hero-figures {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.figure-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.figure-num {
  font-family: var(--font-ar);
  font-size: clamp(2.4rem, 4.4vw, 3.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}

html[lang="en"] .figure-num {
  font-family: var(--font-en);
  font-weight: 600;
}

.figure-label {
  font-size: 0.92rem;
  color: var(--ink-muted);
  font-weight: 400;
}

/* ==========================================================================
   02 — About Us
   ========================================================================== */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 780px;
}

.about-lead {
  font-size: clamp(1.32rem, 2.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.75;
  color: var(--ink);
}

.about-secondary {
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink-muted);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   03 — Our Expertise
   ========================================================================== */
.expertise-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.expertise-row {
  display: grid;
  grid-template-columns: 64px minmax(180px, 4fr) minmax(0, 6fr);
  gap: 24px;
  padding-block: clamp(24px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding-inline-start 0.4s var(--ease-editorial), background-color 0.4s ease;
}

.expertise-row:hover {
  padding-inline-start: 14px;
  background-color: rgba(20, 22, 26, 0.02);
}

body.theme-dark .expertise-row:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.expertise-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.expertise-title {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.expertise-desc {
  font-size: 1rem;
  color: var(--ink-muted);
  line-height: 1.8;
}

/* ==========================================================================
   04 — Our Journey
   ========================================================================== */
.journey-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(44px, 6vw, 72px);
}

.journey-card {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding-top: clamp(28px, 3.5vw, 40px);
  border-top: 1px solid var(--line);
  align-items: start;
}

.journey-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.journey-year {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 2.8vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.journey-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}

/* Past project logos in the timeline */
.journey-logo {
  height: 110px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

/* Original Project Logo Slot (Click or Drag-and-Drop) */
.project-logo-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.35s var(--ease-editorial);
}

.project-logo-slot:hover {
  border-color: var(--ink);
  border-style: solid;
  transform: translateY(-2px);
}

.project-logo-slot.has-media {
  border-style: solid;
  border-color: var(--line);
  padding: 14px;
}

.project-logo-slot img {
  max-width: 84%;
  max-height: 76%;
  object-fit: contain;
  display: none;
}

.project-logo-slot.has-media img {
  display: block;
}

.project-logo-slot.has-media .slot-placeholder {
  display: none;
}

.slot-placeholder {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.slot-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}

.slot-hint {
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.slot-reset {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  font-size: 0.68rem;
  padding: 3px 9px;
  cursor: pointer;
  display: none;
  font-family: inherit;
}

.project-logo-slot.has-media .slot-reset {
  display: inline-flex;
}

.journey-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 680px;
}

.journey-title {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.journey-text {
  font-size: 1.04rem;
  line-height: 1.9;
  color: var(--ink-muted);
}

/* ==========================================================================
   05 — Philosophy (Scroll-Triggered Dark Editorial Band)
   ========================================================================== */
.philosophy-section {
  padding-block: clamp(110px, 14vw, 184px);
}

.philosophy-thesis {
  font-size: clamp(2.2rem, 4.8vw, 4.1rem);
  font-weight: 900;
  line-height: 1.28;
  margin-bottom: 36px;
  letter-spacing: -0.015em;
}

.thesis-word {
  display: inline-block;
  opacity: 0.22;
  transition: opacity 0.45s var(--ease-editorial);
}

.thesis-word.is-lit {
  opacity: 1;
}

.philosophy-body {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.95;
  color: var(--ink-muted);
  max-width: 720px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(64px, 8vw, 108px) 44px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.footer-logo {
  width: 200px;
  height: auto;
  display: block;
}

.footer-statement {
  max-width: 440px;
  color: var(--ink-muted);
  font-size: 0.96rem;
  line-height: 1.8;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.back-to-top {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: opacity 0.3s ease;
}

.footer-legal {
  margin-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.back-to-top:hover {
  opacity: 0.65;
}

/* ==========================================================================
   Type scale, spacing & paragraph alignment (cleanup)
   ========================================================================== */
.hero-section {
  min-height: auto;
  padding-top: clamp(132px, 16vh, 180px);
  padding-bottom: clamp(56px, 6vw, 88px);
}

.hero-main-grid {
  grid-template-columns: 1fr;
}

.hero-headline {
  font-size: clamp(2.2rem, 4.2vw, 3.5rem);
  line-height: 1.3;
  margin-bottom: 24px;
  max-width: 15ch;
}

html[lang="en"] .hero-headline {
  max-width: 22ch;
  line-height: 1.12;
}

.editorial-section {
  padding-block: clamp(72px, 8vw, 112px);
}

.hero-figures {
  margin-top: clamp(48px, 5vw, 72px);
  padding-top: 28px;
}

.figure-num {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
}

.figure-label {
  font-size: 0.9rem;
  line-height: 1.7;
}

.about-lead {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.9;
}

.philosophy-section {
  padding-block: clamp(88px, 10vw, 136px);
}

.philosophy-thesis {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  margin-bottom: 28px;
}

/* One body size for all paragraphs, justified so both edges line up */
.hero-lead,
.about-lead,
.about-secondary,
.expertise-desc,
.journey-text,
.philosophy-body,
.footer-statement {
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
}

.hero-lead,
.about-secondary,
.journey-text,
.philosophy-body {
  font-size: clamp(1.02rem, 1.2vw, 1.12rem);
  line-height: 1.95;
  max-width: 680px;
}

.about-lead {
  max-width: 680px;
}

.expertise-desc {
  font-size: 0.98rem;
  line-height: 1.85;
}

/* Timeline rows: same label style and same logo size on every row */
.journey-aside {
  gap: 20px;
  align-items: flex-start;
}

.journey-year,
.journey-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding-top: 0.55em;
}

.journey-logo {
  width: 170px;
  height: 110px;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.journey-title {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  margin-bottom: 4px;
}

.journey-body {
  gap: 12px;
}

/* ==========================================================================
   Current projects
   ========================================================================== */
.projects-intro {
  font-size: clamp(1.02rem, 1.2vw, 1.12rem);
  line-height: 1.95;
  color: var(--ink-muted);
  max-width: 680px;
  margin-bottom: 32px;
  text-align: justify;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  transition: border-color 0.3s ease, transform 0.35s var(--ease-editorial);
}

.project-card.is-live {
  border-color: var(--line-strong);
  background: var(--bg-elevated);
}

.project-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.project-status {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-muted);
}

.project-card.is-live .project-status {
  background: #1F7A4D;
  border-color: #1F7A4D;
  color: #fff;
}

.project-name {
  font-family: var(--font-en);
  font-size: clamp(1.2rem, 1.7vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: start;
}

.project-desc {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--ink-muted);
}

.project-link {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.project-link:hover { opacity: 0.7; }

@media (max-width: 760px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Hero background video
   ========================================================================== */
.hero-has-media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 88svh;
  justify-content: flex-end;
  /* text colours inside the dark hero */
  --ink: #F6F5F0;
  --ink-muted: rgba(246, 245, 240, 0.82);
  --ink-faint: rgba(246, 245, 240, 0.62);
  --line: rgba(246, 245, 240, 0.22);
  --line-strong: rgba(246, 245, 240, 0.4);
  color: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* shown if there is no video or poster yet */
  background:
    radial-gradient(80% 90% at 80% 20%, #2a3446 0%, transparent 60%),
    radial-gradient(70% 80% at 10% 90%, #1d3a33 0%, transparent 60%),
    #0F1116;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(10, 12, 16, 0.88) 0%, rgba(10, 12, 16, 0.55) 45%, rgba(10, 12, 16, 0.45) 100%);
}

.hero-content {
  position: relative;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* Animated canvas background + optional video */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-video {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-media.has-video .hero-video { opacity: 1; }
.hero-media.has-video .hero-canvas { display: none; }

.hero-overlay {
  background: linear-gradient(to top, rgba(10, 12, 16, 0.75) 0%, rgba(10, 12, 16, 0.15) 55%, rgba(10, 12, 16, 0.25) 100%);
}

/* Liquid glass panel behind the headline */
.hero-glass {
  position: relative;
  max-width: 780px;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 52px);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.hero-glass-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 60% at 85% -10%, rgba(255, 255, 255, 0.28) 0%, transparent 55%),
    linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.07) 50%, transparent 60%);
}

.hero-glass .hero-headline,
.hero-glass .hero-lead {
  position: relative;
  max-width: none;
}

.hero-glass .hero-lead { margin: 0; }

@media (max-width: 760px) {
  .hero-glass {
    border-radius: 20px;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
  }
}

/* Glass panel: compact size and tidy alignment */
.hero-glass {
  max-width: 620px;
  padding: clamp(24px, 3vw, 36px) clamp(22px, 3vw, 40px);
  border-radius: 22px;
}

.hero-glass .hero-headline {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.35;
  margin-bottom: 16px;
  text-wrap: balance;
}

html[lang="en"] .hero-glass .hero-headline {
  line-height: 1.15;
}

.hero-glass .hero-lead {
  font-size: clamp(0.98rem, 1.1vw, 1.05rem);
  line-height: 1.9;
  text-align: justify;
  text-align-last: start;
}

@media (max-width: 760px) {
  .journey-logo { width: 140px; height: 84px; }
  .journey-aside { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
}

.footer-email {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.footer-email:hover { opacity: 0.7; }

/* Header colours while over the hero */
body.over-hero .site-header {
  --ink: #F6F5F0;
  --ink-muted: rgba(246, 245, 240, 0.8);
  --ink-faint: rgba(246, 245, 240, 0.6);
  --line-strong: rgba(246, 245, 240, 0.4);
  --glass-bg: rgba(12, 14, 18, 0.55);
  --glass-border: rgba(246, 245, 240, 0.12);
}

body.over-hero .site-header .logo-light { display: none !important; }
body.over-hero .site-header .logo-dark { display: block !important; }

/* ==========================================================================
   Scroll Reveal Motion
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease-editorial), transform 0.85s var(--ease-editorial);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .section-grid,
  .hero-main-grid {
    grid-template-columns: 1fr;
  }

  .section-meta {
    position: static;
  }

  .expertise-row {
    grid-template-columns: 44px 1fr;
    gap: 12px 18px;
  }

  .expertise-desc {
    grid-column: 2;
  }

  .journey-card {
    grid-template-columns: 1fr;
  }

  .project-logo-slot {
    max-width: 240px;
  }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 66px;
    inset-inline: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s var(--ease-editorial);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-btn {
    display: inline-flex;
  }

  .hero-figures {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
