/* ============================================================
   GENIKO — Modern UI 2026
   Refined design system: tokens, glass nav, layered hero,
   elegant cards, smooth motion. All legacy class names preserved.
   ============================================================ */

:root {
  /* Brand */
  --navy: #0a0b0d;
  --navy-2: #16181b;
  --navy-3: #202228;
  --ink: #141517;
  --charcoal: #17191c;
  --charcoal-2: #202228;

  /* Surfaces */
  --paper: #f6f7f9;
  --paper-2: #ffffff;
  --paper-3: #eef1f4;
  --surface-1: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f1f3f6;

  /* Text */
  --text: #0e1622;
  --text-soft: #2a3547;
  --text-mute: #5b6776;
  --text-faint: #8693a3;
  --text-inverse: #eef3f8;
  --muted: #5b6776;
  --gray-400: #b9c5d1;
  --gray-500: #8f9aaa;
  --gray-600: #687381;

  /* Accent (warm crimson for engineering brand) */
  --primary: #a31f19;
  --primary-2: #c4271f;
  --primary-3: #de3b32;
  --primary-soft: rgba(163, 31, 25, 0.10);
  --primary-glow: rgba(196, 39, 31, 0.35);
  --accent: #d8a85b;       /* subtle warm gold for highlights */
  --accent-soft: rgba(216, 168, 91, 0.18);

  /* Lines */
  --line: rgba(7, 17, 31, 0.08);
  --line-strong: rgba(7, 17, 31, 0.16);
  --line-light: rgba(255, 255, 255, 0.10);
  --line-light-strong: rgba(255, 255, 255, 0.18);

  /* States */
  --success: #1f7a4c;
  --error: #9b2525;
  --warning: #c0851b;

  /* Radius scale */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Shadows — layered, soft, premium */
  --shadow-xs: 0 1px 2px rgba(7, 17, 31, 0.06);
  --shadow-sm: 0 4px 12px rgba(7, 17, 31, 0.06), 0 1px 3px rgba(7, 17, 31, 0.04);
  --shadow: 0 14px 40px -12px rgba(7, 17, 31, 0.18), 0 4px 12px rgba(7, 17, 31, 0.06);
  --shadow-strong: 0 30px 70px -18px rgba(7, 17, 31, 0.28), 0 10px 24px rgba(7, 17, 31, 0.10);
  --shadow-glow: 0 0 0 1px rgba(196, 39, 31, 0.18), 0 18px 50px -12px rgba(196, 39, 31, 0.32);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --d-fast: 0.18s;
  --d: 0.28s;
  --d-slow: 0.5s;

  /* Layout */
  --container: 1200px;
  --container-tight: 1080px;
  --section-y: 110px;
  --header-h: 84px;

  /* Gradients */
  --grad-navy: linear-gradient(135deg, #0a0b0d 0%, #16181b 50%, #24262c 100%);
  --grad-navy-soft: linear-gradient(180deg, #16181b 0%, #0a0b0d 100%);
  --grad-paper: linear-gradient(180deg, #fbfcfd 0%, #f3f5f8 100%);
  --grad-primary: linear-gradient(135deg, #a31f19 0%, #c4271f 60%, #de3b32 100%);
}

/* ----- Reset / base ----- */
* { box-sizing: border-box; }
*::selection { background: var(--primary); color: #fff; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

/* Custom scrollbar */
html { scrollbar-width: thin; scrollbar-color: var(--text-faint) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c1cad4, #9aa5b3);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--primary), var(--primary-2)); background-clip: padding-box; }

/* Typography */
p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1rem;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 16px;
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--text);
  font-weight: 800;
}

h1 {
  max-width: 14ch;
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  letter-spacing: -0.035em;
  font-weight: 850;
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.95rem);
  letter-spacing: -0.028em;
}

h3 {
  font-size: 1.22rem;
  font-weight: 750;
  letter-spacing: -0.012em;
}

h4 { font-size: 1rem; font-weight: 750; }

::-moz-selection { background: var(--primary); color: #fff; }

/* ----- Container & sections ----- */
.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: var(--section-y) 0;
  background: var(--paper);
  overflow: clip;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 400px at 0% 0%, rgba(196, 39, 31, 0.04), transparent 60%),
    radial-gradient(700px 380px at 100% 100%, rgba(7, 17, 31, 0.05), transparent 60%);
  pointer-events: none;
}

/* Subtle dotted backdrop on light sections */
.section > .container { position: relative; z-index: 1; }

.section-dark {
  color: var(--text-inverse);
  background: var(--grad-navy);
}

.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 460px at 12% 18%, rgba(196, 39, 31, 0.18), transparent 55%),
    radial-gradient(700px 420px at 100% 100%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 56px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000, #000 70%, transparent);
}

.section-dark p,
.section-dark .project-meta,
.section-dark small {
  color: #b9c5d1;
}

/* Section heading */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 44px;
}

.section-head h2 { max-width: 760px; }

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 14px 5px 12px;
  margin-bottom: 18px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(196, 39, 31, 0.16);
}

.section-dark .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #ffd5d2;
  backdrop-filter: blur(10px);
}

.section-dark .eyebrow::before,
.hero .eyebrow::before,
.page-hero .eyebrow::before {
  background: #ffd5d2;
  box-shadow: 0 0 0 4px rgba(255, 213, 210, 0.18);
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  z-index: 60;
  top: 0; right: 0; left: 0;
  border-bottom: 1px solid transparent;
  /* Highly transparent glass — only a hint of tint */
  background: rgba(10, 11, 13, 0.04);
  backdrop-filter: saturate(135%) blur(8px);
  -webkit-backdrop-filter: saturate(135%) blur(8px);
  transition: background var(--d) var(--ease), border-color var(--d) var(--ease), box-shadow var(--d) var(--ease);
}

.site-header.is-scrolled,
.site-header:focus-within {
  background: rgba(10, 11, 13, 0.18);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform var(--d) var(--ease);
}
.brand:hover { transform: translateY(-1px); }

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(196, 39, 31, 0.35));
  transition: filter var(--d) var(--ease), transform var(--d) var(--ease);
}
.brand:hover img { transform: rotate(-3deg); filter: drop-shadow(0 6px 18px rgba(196, 39, 31, 0.55)); }

.brand span { white-space: nowrap; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.018);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  color: #d6e0eb;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: color var(--d) var(--ease);
}

.main-nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--d) var(--ease), transform var(--d) var(--ease-spring);
  z-index: -1;
  box-shadow: 0 8px 22px -6px rgba(255, 255, 255, 0.45);
}

.main-nav a:hover { color: var(--navy); }
.main-nav a:hover::before { opacity: 1; transform: scale(1); }

.main-nav a.active {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 10px 26px -8px rgba(196, 39, 31, 0.6);
}
.main-nav a.active::before { opacity: 0; }

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

.theme-toggle,
.admin-theme-toggle,
.menu-toggle,
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.025);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: background var(--d) var(--ease), border-color var(--d) var(--ease), transform var(--d) var(--ease), color var(--d) var(--ease);
}

.theme-toggle:hover,
.admin-theme-toggle:hover,
.menu-toggle:hover,
.lang-toggle:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.lang-toggle.is-active {
  border-color: transparent;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 8px 18px -6px rgba(196, 39, 31, 0.55);
}

.menu-toggle { display: none; }

.mobile-nav {
  display: none;
  width: min(100% - 32px, 540px);
  margin: 0 auto 16px;
  padding: 10px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: rgba(10, 11, 13, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-strong);
}

.mobile-nav.open {
  display: grid;
  animation: dropIn 0.32s var(--ease-out);
}

.mobile-nav a {
  padding: 13px 14px;
  border-radius: var(--radius-xs);
  color: #f2f6fa;
  font-weight: 650;
  transition: background var(--d) var(--ease);
}

.mobile-nav a:hover { background: rgba(255, 255, 255, 0.08); }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  background: var(--navy);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 600px at 18% 30%, rgba(196, 39, 31, 0.22), transparent 60%),
    radial-gradient(700px 600px at 100% 100%, rgba(216, 168, 91, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: none;
}

.hero-slideshow,
.hero-slide,
.hero-grid { position: absolute; inset: 0; }

.hero-slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: grayscale(60%) contrast(1.05) brightness(0.95);
  transform: scale(1.06);
  transition: opacity 1.2s var(--ease-out), transform 8s var(--ease-out);
}

.hero-slide.active {
  opacity: 0.5;
  transform: scale(1);
}

.hero-slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Lighter overlay so the slideshow images are clearly visible */
  background:
    linear-gradient(90deg, rgba(10, 11, 13, 0.78), rgba(10, 11, 13, 0.42) 50%, rgba(10, 11, 13, 0.78)),
    linear-gradient(180deg, rgba(10, 11, 13, 0.05), rgba(10, 11, 13, 0.55));
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.42;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
  animation: floatGrid 22s linear infinite;
  z-index: 1;
}

@keyframes floatGrid {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(72px, 72px, 0); }
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 150px 0 80px;
}

.hero-content h1 {
  margin-bottom: 22px;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.hero-content > .eyebrow { animation: floatIn 0.7s var(--ease-out) both; }
.hero-content h1 { animation: floatIn 0.85s 0.08s var(--ease-out) both; }
.hero-content > p { animation: floatIn 0.9s 0.16s var(--ease-out) both; }
.hero-content .hero-actions { animation: floatIn 0.9s 0.24s var(--ease-out) both; }
.hero-content .stats-row { animation: floatIn 0.95s 0.32s var(--ease-out) both; }

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

.hero-content p {
  max-width: 60ch;
  color: #d3dee9;
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 36px 0 38px;
}

/* Animated scroll cue (positioned on hero, hidden on small screens) */
.hero::before { z-index: 1; }

.scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  transform: translateX(-50%);
  opacity: 0.8;
  pointer-events: none;
}

.scroll-cue::after {
  content: "";
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 4px;
  animation: scrollCue 1.8s var(--ease-out) infinite;
}

@keyframes scrollCue {
  0% { transform: translateY(-9px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(11px); opacity: 0; }
}

@media (max-width: 768px) {
  .scroll-cue { display: none; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn,
.btn-small,
.ref-link,
.career-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1;
  white-space: nowrap;
  isolation: isolate;
  transition: transform var(--d) var(--ease), background var(--d) var(--ease),
              border-color var(--d) var(--ease), color var(--d) var(--ease),
              box-shadow var(--d) var(--ease);
}

.btn { min-height: 50px; padding: 0 22px; font-size: 0.95rem; }

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.16), transparent 40%);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--d) var(--ease);
}
.btn:hover::after { opacity: 1; }

.btn:hover,
.btn-small:hover,
.ref-link:hover,
.career-btn:hover { transform: translateY(-2px); }

.btn-primary,
.career-btn {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(196, 39, 31, 0.55), 0 2px 6px rgba(0,0,0,0.08);
}

.btn-primary:hover,
.career-btn:hover {
  box-shadow: 0 18px 38px -10px rgba(196, 39, 31, 0.7), 0 4px 12px rgba(0,0,0,0.1);
  background: linear-gradient(135deg, #b62321 0%, #d22d23 60%, #e8413a 100%);
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.14);
}

/* On light sections, adapt secondary */
.section:not(.section-dark) .btn-secondary,
.contact-cta-actions:not(.contact-cta .contact-cta-actions) {
  /* keep dark secondary for hero/CTA */
}

.btn-one-line { white-space: nowrap; }

/* Underlined text link with animated arrow */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 750;
  font-size: 0.95rem;
  position: relative;
  transition: color var(--d) var(--ease);
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform-origin: 0 0;
  transform: scaleX(0.3);
  opacity: 0.5;
  transition: transform var(--d) var(--ease-out), opacity var(--d) var(--ease);
}

.text-link:hover::after { transform: scaleX(1); opacity: 1; }
.text-link:hover { color: var(--primary-2); }

.section-dark .text-link,
.hero .text-link { color: #fff; }

/* ============================================================
   STATS
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 820px;
  gap: 14px;
  margin-top: 38px;
}

.stat-card {
  position: relative;
  min-height: 138px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform var(--d) var(--ease), border-color var(--d) var(--ease), background var(--d) var(--ease);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 80px; height: 2px;
  background: var(--grad-primary);
  opacity: 0.85;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(200px 200px at 80% 80%, rgba(196, 39, 31, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity var(--d) var(--ease);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
}
.stat-card:hover::after { opacity: 1; }

.stat-card strong,
.stat-card span {
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 0%, #cfd2d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card p {
  margin: 12px 0 0;
  color: #cad6e2;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ============================================================
   TWO COLUMN
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: start;
}

.two-col > .reveal > p {
  max-width: 68ch;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text-soft);
}

.feature-panel { display: grid; gap: 14px; }

/* ============================================================
   CARDS (universal)
   ============================================================ */
.feature-item,
.card,
.project-card,
.team-card,
.reference-item,
.contact-panel,
.contact-form,
.license-card,
.career-card,
.admin-card,
.admin-form-card,
.admin-table-card,
.settings-block,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
  transition: transform var(--d) var(--ease), border-color var(--d) var(--ease), box-shadow var(--d) var(--ease), background var(--d) var(--ease);
}

.feature-item {
  position: relative;
  min-height: 168px;
  padding: 26px;
  overflow: hidden;
}

.feature-item::before,
.card::before,
.license-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--d) var(--ease);
}

.feature-item:hover::before,
.card:hover::before,
.license-card:hover::before { opacity: 1; }

.feature-item:hover,
.license-card:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 39, 31, 0.28);
  box-shadow: var(--shadow);
}

.feature-item h3,
.card h3,
.license-card h3 { color: var(--navy); }

/* Dark variants */
.section-dark .feature-item,
.section-dark .card,
.section-dark .reference-item,
.section-dark .career-card {
  border-color: var(--line-light);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.section-dark .feature-item:hover,
.section-dark .card:hover,
.section-dark .reference-item:hover,
.section-dark .career-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.section-dark .feature-item h3,
.section-dark .card h3,
.section-dark .reference-item span,
.section-dark .career-card h3 { color: #fff; }

/* ----- Service / generic card ----- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  min-height: 250px;
  padding: 26px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(196, 39, 31, 0.30);
  box-shadow: var(--shadow);
}

.card-icon,
.license-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 20px;
  border: 1px solid rgba(196, 39, 31, 0.22);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(196, 39, 31, 0.14), rgba(196, 39, 31, 0.06));
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 900;
  transition: transform var(--d) var(--ease), background var(--d) var(--ease);
}

.card:hover .card-icon,
.license-card:hover .license-icon {
  transform: rotate(-6deg) scale(1.06);
  background: linear-gradient(135deg, rgba(196, 39, 31, 0.22), rgba(196, 39, 31, 0.10));
}

/* ----- Project card ----- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  overflow: hidden;
  background: #fff;
}

.project-card:hover {
  transform: translateY(-7px);
  border-color: rgba(196, 39, 31, 0.32);
  box-shadow: var(--shadow-strong);
}

.project-card a { display: grid; height: 100%; }

.project-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #d3dde6, #aab8c5);
}

.project-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7, 17, 31, 0.55));
  z-index: 1;
  opacity: 0.85;
  transition: opacity var(--d) var(--ease);
}

.project-card:hover .project-image::before { opacity: 0.65; }

.project-image::after {
  content: "→";
  position: absolute;
  inset: auto 18px 18px auto;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  z-index: 2;
  transform: translateY(8px) scale(0.85);
  opacity: 0;
  transition: transform var(--d) var(--ease-spring), opacity var(--d) var(--ease);
}

.project-card:hover .project-image::after {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.project-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.6s var(--ease-out);
}

.project-card:hover .project-image img {
  transform: scale(1.08);
  filter: saturate(1.1) contrast(1.05);
}

.project-body {
  display: grid;
  align-content: start;
  min-height: 230px;
  padding: 24px;
  gap: 4px;
}

.project-meta {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-body h3 { color: var(--navy); }

.project-body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
}

/* ----- Filters ----- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: var(--shadow-xs);
  width: max-content;
  max-width: 100%;
}

.filters a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  transition: background var(--d) var(--ease), color var(--d) var(--ease), transform var(--d) var(--ease);
}

.filters a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.filters a.active {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 8px 18px -6px rgba(196, 39, 31, 0.5);
}

/* ----- Team ----- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.team-card {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  background: var(--charcoal);
  border-color: transparent;
  box-shadow: var(--shadow);
}

.team-card img {
  width: 100%; height: 100%;
  min-height: 400px;
  object-fit: cover;
  filter: grayscale(0.3) contrast(1.04);
  transition: transform 0.6s var(--ease-out), filter 0.45s var(--ease);
}

.team-card:hover img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1);
}

.team-overlay {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  padding: 70px 22px 22px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(10, 11, 13, 0.55) 35%, rgba(10, 11, 13, 0.96));
  transition: padding var(--d) var(--ease);
}

.team-overlay h3 { color: #fff; margin-bottom: 6px; }
.team-overlay p { color: #d7e2ed; margin-bottom: 8px; font-size: 0.92rem; }

.team-email {
  display: inline-flex;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffd5d2 !important;
  transition: color var(--d) var(--ease);
}
.team-email:hover { color: #fff !important; }

/* ----- Ticker ----- */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.section-dark .ticker {
  border-color: var(--line-light);
  background: rgba(255, 255, 255, 0.03);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 14px;
  padding: 22px 0;
  animation: tickerMove 38s linear infinite;
}

.ticker:hover .ticker-track { animation-play-state: paused; }

.ticker-track span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-xs);
  transition: transform var(--d) var(--ease), border-color var(--d) var(--ease);
}

.ticker-track span:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.section-dark .ticker-track span {
  border-color: var(--line-light);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

@keyframes tickerMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ----- Reference list ----- */
.reference-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 20px;
}

.reference-item:hover {
  transform: translateY(-3px);
  border-color: rgba(196, 39, 31, 0.32);
  box-shadow: var(--shadow);
}

.reference-item > div { min-width: 0; }

.reference-item span {
  display: block;
  color: var(--navy);
  font-weight: 800;
  overflow-wrap: anywhere;
  letter-spacing: -0.012em;
}

.reference-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ref-link {
  min-height: 38px;
  padding: 0 14px;
  border-color: rgba(196, 39, 31, 0.26);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 750;
}

.ref-link:hover {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(196, 39, 31, 0.5);
}

/* ============================================================
   PAGE HERO
   ============================================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 168px 0 92px;
  color: #fff;
  background: var(--grad-navy);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 500px at 15% 30%, rgba(196, 39, 31, 0.22), transparent 55%),
    radial-gradient(500px 360px at 88% 100%, rgba(216, 168, 91, 0.10), transparent 60%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(180deg, #000, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000, #000 60%, transparent);
  pointer-events: none;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: 6%;
  bottom: -64px;
  width: 320px;
  height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  transform: skewX(-18deg);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
  max-width: 880px;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.page-hero p {
  max-width: 760px;
  color: #d7e1eb;
  font-size: 1.08rem;
  line-height: 1.7;
}

/* ============================================================
   PROJECT DETAIL — EDITORIAL (IPM-inspired)
   ============================================================ */
.project-editorial {
  position: relative;
  padding-top: var(--header-h);
}

.project-editorial-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 78vh;
  min-height: 480px;
  overflow: hidden;
  background: var(--navy);
}

.project-editorial-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  animation: heroImgEntry 1.4s var(--ease-out) both;
}

@keyframes heroImgEntry {
  from { transform: scale(1.12); opacity: 0; }
  to { transform: scale(1.02); opacity: 1; }
}

.project-editorial-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.45) 0%, rgba(10, 11, 13, 0) 30%, rgba(10, 11, 13, 0) 55%, rgba(10, 11, 13, 0.85) 100%);
  pointer-events: none;
}

.project-editorial-hero-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 36px 0 44px;
  color: #fff;
}

.project-editorial-hero-content .container { display: grid; gap: 18px; }

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-bottom: 12px;
  padding: 6px 14px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  transition: background var(--d) var(--ease), transform var(--d) var(--ease);
}
.project-back-link:hover { background: rgba(255, 255, 255, 0.18); transform: translateX(-3px); }

.project-editorial-hero-content h1 {
  max-width: 16ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4.6vw, 4rem);
  letter-spacing: -0.03em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  backdrop-filter: blur(8px);
}

.project-tag.is-accent {
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: 0 6px 18px -6px rgba(196, 39, 31, 0.55);
}

.project-tag svg {
  width: 14px; height: 14px;
  opacity: 0.9;
}

/* Body grid — description + sticky metadata */
.project-editorial-body {
  padding: 80px 0;
  background: var(--paper);
}

.project-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 56px;
  align-items: start;
}

.project-body-content {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-soft);
  max-width: 68ch;
}

.project-body-content p { margin-bottom: 18px; color: var(--text-soft); }

.project-meta-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.project-meta-card h4 {
  margin: 0 0 18px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.project-meta-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.project-meta-list li:last-child { padding-bottom: 0; border-bottom: none; }

.project-meta-list .meta-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.project-meta-list .meta-value {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
}

/* Editorial gallery */
.gallery-editorial {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.gallery-editorial .gallery-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--steel-2);
  box-shadow: var(--shadow-xs);
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease);
}

.gallery-editorial .gallery-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.gallery-editorial .gallery-frame:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-editorial .gallery-frame:hover img { transform: scale(1.06); }

/* Mosaic pattern: 1st item full-width, then 2-col, then 3-col */
.gallery-editorial .gallery-frame:nth-child(1) { grid-column: span 6; aspect-ratio: 21 / 9; }
.gallery-editorial .gallery-frame:nth-child(2) { grid-column: span 3; aspect-ratio: 4 / 3; }
.gallery-editorial .gallery-frame:nth-child(3) { grid-column: span 3; aspect-ratio: 4 / 3; }
.gallery-editorial .gallery-frame:nth-child(n+4) { grid-column: span 2; aspect-ratio: 1 / 1; }

/* Other projects */
.related-projects {
  padding: 80px 0 100px;
  background: var(--surface-3);
  border-top: 1px solid var(--line);
}

.related-projects .section-head { margin-bottom: 32px; }

.related-projects .project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 992px) {
  .project-editorial-hero { aspect-ratio: 16 / 11; min-height: 400px; }
  .project-body-grid { grid-template-columns: 1fr; gap: 36px; }
  .project-meta-card { position: static; }
  .gallery-editorial { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery-editorial .gallery-frame:nth-child(n+4) { grid-column: span 2; }
  .related-projects .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .project-editorial-hero { aspect-ratio: 4 / 5; min-height: 360px; }
  .project-editorial-hero-content { padding: 24px 0 28px; }
  .gallery-editorial { grid-template-columns: 1fr; }
  .gallery-editorial .gallery-frame:nth-child(1),
  .gallery-editorial .gallery-frame:nth-child(2),
  .gallery-editorial .gallery-frame:nth-child(3),
  .gallery-editorial .gallery-frame:nth-child(n+4) { grid-column: span 1; aspect-ratio: 4 / 3; }
  .related-projects .project-grid { grid-template-columns: 1fr; }
}

/* Light mode tweaks */
body.light-mode .project-editorial-body { background: var(--paper); }
body.light-mode .related-projects { background: #eef1f5; border-top-color: var(--line); }

/* ============================================================
   PROJECT DETAIL — legacy classes kept for compat
   ============================================================ */
.project-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 32px;
  align-items: start;
}

.project-detail-image,
.project-detail-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.project-detail-image { overflow: hidden; }

.project-detail-image img {
  width: 100%; height: 100%;
  min-height: 480px;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.project-detail-image:hover img { transform: scale(1.03); }

.project-detail-content { padding: 32px; }

.detail-list {
  display: grid;
  gap: 10px;
  padding: 0 0 22px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.detail-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.detail-list strong {
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 110px;
}

.rich-text {
  color: var(--text-soft);
  line-height: 1.75;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.project-gallery-item {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease), border-color var(--d) var(--ease);
}

.project-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(196, 39, 31, 0.32);
}

.project-gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.project-gallery-item:hover img { transform: scale(1.06); }

/* ============================================================
   LICENSES
   ============================================================ */
.licenses-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.license-card {
  position: relative;
  min-height: 230px;
  padding: 26px;
  overflow: hidden;
}

.licenses-note {
  max-width: 920px;
  margin: 32px 0 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  color: var(--text-soft);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 26px;
  align-items: stretch;
}

.contact-panel,
.contact-form {
  padding: 32px;
}

.contact-mail-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.contact-panel h2,
.contact-form h2 { color: var(--navy); }

.contact-form label { color: var(--navy); }

.contact-panel a {
  color: var(--primary);
  font-weight: 800;
}

.contact-panel p {
  color: var(--text-soft);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.contact-panel p strong {
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 92px;
}

.map-embed {
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-3);
  box-shadow: var(--shadow-xs);
}

.map-embed iframe { display: block; width: 100%; }

.contact-email-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.005em;
}

.contact-cta-section {
  position: relative;
  background: var(--grad-navy);
  overflow: hidden;
}
.contact-cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 400px at 10% 20%, rgba(196, 39, 31, 0.18), transparent 60%),
    radial-gradient(500px 360px at 95% 95%, rgba(216, 168, 91, 0.10), transparent 60%);
}

.contact-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  color: #fff;
  z-index: 1;
}

.contact-cta h2 { color: #fff; }
.contact-cta p { max-width: 720px; color: #d5e0ea; font-size: 1.05rem; }

.contact-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

/* ============================================================
   CAREER
   ============================================================ */
.career-section { padding: var(--section-y) 0; background: var(--paper); }

.career-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1.15fr);
  gap: 32px;
}

.career-intro {
  position: sticky;
  top: 116px;
  align-self: start;
}

.career-list { display: grid; gap: 14px; }

.career-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
}

.career-card:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 39, 31, 0.30);
  box-shadow: var(--shadow);
}

.career-card h3 { color: var(--navy); margin-bottom: 6px; }
.career-card p { margin-bottom: 4px; font-size: 0.92rem; color: var(--text-soft); }

.career-btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.88rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  color: #d9e4ef;
  background: var(--grad-navy);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 460px at 0% 0%, rgba(196, 39, 31, 0.10), transparent 55%),
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 64px 64px;
  mask-image: linear-gradient(180deg, transparent, #000 30%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%);
  pointer-events: none;
}

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.85fr) minmax(180px, 0.6fr);
  gap: 40px;
  padding: 72px 0 44px;
}

.site-footer h3,
.site-footer h4 { color: #fff; }

.site-footer h4 {
  margin-bottom: 18px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffd5d2;
}

.site-footer p,
.site-footer a {
  color: #c7d4e0;
  transition: color var(--d) var(--ease);
}

.site-footer p { margin-bottom: 10px; line-height: 1.65; }
.site-footer a:hover { color: #fff; }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.social-link {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  transition: background var(--d) var(--ease), transform var(--d) var(--ease), border-color var(--d) var(--ease), box-shadow var(--d) var(--ease);
}

.social-link:hover {
  border-color: transparent;
  background: var(--grad-primary);
  transform: translateY(-3px) rotate(-4deg);
  box-shadow: 0 12px 24px -8px rgba(196, 39, 31, 0.6);
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line-light);
  color: #aebdcc;
  font-size: 0.88rem;
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   PAGE LOADER — premium first-visit reveal
   ============================================================ */
.page-loader {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 26px;
  background:
    radial-gradient(900px 700px at 50% 45%, rgba(196, 39, 31, 0.22), transparent 65%),
    radial-gradient(600px 500px at 50% 100%, rgba(216, 168, 91, 0.10), transparent 60%),
    var(--grad-navy);
  overflow: hidden;
}

.page-loader::before,
.page-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Subtle scan-line / vignette */
.page-loader::before {
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 75%);
}

.page-loader::after {
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.45));
}

.page-loader.is-active { display: grid; }

.page-loader.is-hidden {
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.loader-inner {
  position: relative;
  display: grid;
  place-items: center;
  width: 160px; height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(196, 39, 31, 0.16), transparent 65%);
  z-index: 1;
}

/* Spinning gradient ring */
.loader-inner::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid transparent;
  border-top-color: var(--primary-2);
  border-right-color: var(--primary);
  border-radius: 50%;
  animation: loaderSpin 1.6s linear infinite;
  filter: drop-shadow(0 0 12px rgba(196, 39, 31, 0.5));
}

/* Soft slow halo ring */
.loader-inner::after {
  content: "";
  position: absolute;
  inset: -28px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(216, 168, 91, 0.55);
  border-radius: 50%;
  animation: loaderSpin 3.2s linear infinite reverse;
}

/* Concentric expanding rings (use empty span elements) */
.loader-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 160px; height: 160px;
  margin: -80px 0 0 -80px;
  border: 1.5px solid rgba(196, 39, 31, 0.45);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7);
  animation: loaderRing 2.4s var(--ease-out) infinite;
}

.loader-ring:nth-child(2) { animation-delay: 0.6s; }
.loader-ring:nth-child(3) { animation-delay: 1.2s; }
.loader-ring:nth-child(4) { animation-delay: 1.8s; }

.loader-logo {
  width: 96px; height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(196, 39, 31, 0.55));
  animation:
    loaderEntry 1.4s var(--ease-spring) both,
    loaderPulse 2.4s var(--ease) 1.4s infinite;
}

/* Brand text under loader with letter stagger */
.loader-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  gap: 4px;
  margin-top: 6px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 850;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 4px 18px rgba(196, 39, 31, 0.35);
}

.loader-brand span {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  animation: loaderLetter 0.6s var(--ease-out) forwards;
  animation-delay: calc(0.55s + var(--i, 0) * 0.06s);
}

.loader-tagline {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  opacity: 0;
  animation: loaderFadeIn 0.7s var(--ease-out) 1s forwards;
}

@keyframes loaderSpin { to { transform: rotate(360deg); } }

@keyframes loaderEntry {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-25deg);
    filter: drop-shadow(0 0 30px rgba(196, 39, 31, 0.85)) blur(6px);
  }
  60% {
    opacity: 1;
    transform: scale(1.08) rotate(6deg);
    filter: drop-shadow(0 10px 30px rgba(196, 39, 31, 0.65)) blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: drop-shadow(0 8px 24px rgba(196, 39, 31, 0.55));
  }
}

@keyframes loaderPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 8px 24px rgba(196, 39, 31, 0.55));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 12px 30px rgba(196, 39, 31, 0.7));
  }
}

@keyframes loaderRing {
  0% { opacity: 0; transform: scale(0.55); }
  20% { opacity: 0.85; }
  100% { opacity: 0; transform: scale(2.2); }
}

@keyframes loaderLetter {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loaderFadeIn { to { opacity: 1; } }

/* ============================================================
   SCROLL PROGRESS BAR (NEW)
   ============================================================ */
.scroll-progress {
  position: fixed;
  z-index: 70;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: var(--grad-primary);
  box-shadow: 0 0 12px rgba(196, 39, 31, 0.5);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ============================================================
   BACK TO TOP (NEW)
   ============================================================ */
.back-to-top {
  position: fixed;
  z-index: 55;
  right: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  background: rgba(10, 11, 13, 0.92);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity var(--d) var(--ease), transform var(--d) var(--ease-spring), background var(--d) var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--grad-primary);
  border-color: transparent;
  transform: translateY(-3px) scale(1.05);
}

/* ============================================================
   DARK THEME (default) — overrides for surfaces that were
   previously light/white. Light-mode toggle removes these.
   ============================================================ */
body:not(.light-mode):not(.admin-body):not(.login-body) {
  background: #0e0f11;
  color: var(--text-inverse);
}

/* Public sections — dark by default */
body:not(.light-mode):not(.admin-body) .section {
  background:
    radial-gradient(900px 500px at 0% 0%, rgba(196, 39, 31, 0.06), transparent 60%),
    radial-gradient(700px 460px at 100% 100%, rgba(196, 39, 31, 0.04), transparent 60%),
    linear-gradient(180deg, #141517 0%, #0e0f11 100%);
}

body:not(.light-mode):not(.admin-body) .section::before {
  background:
    radial-gradient(800px 460px at 12% 18%, rgba(196, 39, 31, 0.10), transparent 55%),
    radial-gradient(700px 420px at 100% 100%, rgba(255, 255, 255, 0.04), transparent 60%),
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(180deg, #000, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000, #000 70%, transparent);
}

body:not(.light-mode):not(.admin-body) .section h1,
body:not(.light-mode):not(.admin-body) .section h2,
body:not(.light-mode):not(.admin-body) .section h3,
body:not(.light-mode):not(.admin-body) .section h4 { color: #fff; }

body:not(.light-mode):not(.admin-body) .section p,
body:not(.light-mode):not(.admin-body) .section .two-col > .reveal > p { color: #b9c5d1; }

/* Cards in dark default */
body:not(.light-mode):not(.admin-body) .feature-item,
body:not(.light-mode):not(.admin-body) .card,
body:not(.light-mode):not(.admin-body) .project-card,
body:not(.light-mode):not(.admin-body) .reference-item,
body:not(.light-mode):not(.admin-body) .career-card,
body:not(.light-mode):not(.admin-body) .license-card,
body:not(.light-mode):not(.admin-body) .contact-panel,
body:not(.light-mode):not(.admin-body) .contact-form {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--text-inverse);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}

body:not(.light-mode):not(.admin-body) .feature-item:hover,
body:not(.light-mode):not(.admin-body) .card:hover,
body:not(.light-mode):not(.admin-body) .reference-item:hover,
body:not(.light-mode):not(.admin-body) .career-card:hover,
body:not(.light-mode):not(.admin-body) .license-card:hover {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.22);
}

body:not(.light-mode):not(.admin-body) .project-card { background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)); }
body:not(.light-mode):not(.admin-body) .project-card:hover { background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)); border-color: rgba(196, 39, 31, 0.45); }

body:not(.light-mode):not(.admin-body) .feature-item h3,
body:not(.light-mode):not(.admin-body) .card h3,
body:not(.light-mode):not(.admin-body) .license-card h3,
body:not(.light-mode):not(.admin-body) .career-card h3,
body:not(.light-mode):not(.admin-body) .contact-panel h2,
body:not(.light-mode):not(.admin-body) .contact-form h2,
body:not(.light-mode):not(.admin-body) .reference-item span { color: #fff; }

body:not(.light-mode):not(.admin-body) .feature-item p,
body:not(.light-mode):not(.admin-body) .card p,
body:not(.light-mode):not(.admin-body) .license-card p,
body:not(.light-mode):not(.admin-body) .career-card p,
body:not(.light-mode):not(.admin-body) .reference-item small,
body:not(.light-mode):not(.admin-body) .contact-panel p { color: #b9c5d1; }

body:not(.light-mode):not(.admin-body) .contact-panel p strong { color: #fff; }
body:not(.light-mode):not(.admin-body) .contact-panel a { color: #ffd5d2; }

body:not(.light-mode):not(.admin-body) .project-body h3 { color: #fff; }
body:not(.light-mode):not(.admin-body) .project-body p { color: #b9c5d1; }
body:not(.light-mode):not(.admin-body) .project-meta { color: #ffb5af; }

/* Project images get a slightly different background while loading */
body:not(.light-mode):not(.admin-body) .project-image {
  background: linear-gradient(135deg, #24262c, #141517);
}

/* Filters bar in dark default */
body:not(.light-mode):not(.admin-body) .filters {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
body:not(.light-mode):not(.admin-body) .filters a { color: #d6e0eb; }
body:not(.light-mode):not(.admin-body) .filters a:hover { background: rgba(196, 39, 31, 0.18); color: #ffd5d2; }
body:not(.light-mode):not(.admin-body) .filters a.active { background: var(--grad-primary); color: #fff; }

/* Ticker in dark default */
body:not(.light-mode):not(.admin-body) .ticker {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.10);
}
body:not(.light-mode):not(.admin-body) .ticker-track span {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.10);
  color: #fff;
}

/* Project editorial body — was light, now dark */
body:not(.light-mode):not(.admin-body) .project-editorial-body {
  background:
    radial-gradient(700px 500px at 0% 0%, rgba(196, 39, 31, 0.06), transparent 60%),
    linear-gradient(180deg, #141517 0%, #0e0f11 100%);
}
body:not(.light-mode):not(.admin-body) .project-editorial-body h2 { color: #fff; }
body:not(.light-mode):not(.admin-body) .project-body-content { color: #c8d3df; }
body:not(.light-mode):not(.admin-body) .project-body-content p { color: #c8d3df; }
body:not(.light-mode):not(.admin-body) .project-body-content > p[style*="font-weight:600"] { color: #fff !important; }
body:not(.light-mode):not(.admin-body) .rich-text { color: #c8d3df; }

body:not(.light-mode):not(.admin-body) .project-meta-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}
body:not(.light-mode):not(.admin-body) .project-meta-card h4 { color: #ffd5d2; }
body:not(.light-mode):not(.admin-body) .project-meta-list .meta-label { color: #8ea0b3; }
body:not(.light-mode):not(.admin-body) .project-meta-list .meta-value { color: #fff; }
body:not(.light-mode):not(.admin-body) .project-meta-list li { border-color: rgba(255, 255, 255, 0.08); }

/* Related projects section */
body:not(.light-mode):not(.admin-body) .related-projects {
  background:
    radial-gradient(700px 500px at 100% 0%, rgba(196, 39, 31, 0.05), transparent 60%),
    linear-gradient(180deg, #0a0b0d 0%, #0e0f11 100%);
  border-top-color: rgba(255, 255, 255, 0.06);
}
body:not(.light-mode):not(.admin-body) .related-projects h2 { color: #fff; }

/* Career section */
body:not(.light-mode):not(.admin-body) .career-section {
  background:
    radial-gradient(700px 500px at 100% 100%, rgba(196, 39, 31, 0.05), transparent 60%),
    linear-gradient(180deg, #141517 0%, #0e0f11 100%);
}
body:not(.light-mode):not(.admin-body) .career-section h2 { color: #fff; }
body:not(.light-mode):not(.admin-body) .career-card h3 { color: #fff; }
body:not(.light-mode):not(.admin-body) .career-card p { color: #b9c5d1; }

/* Licenses note */
body:not(.light-mode):not(.admin-body) .licenses-note {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.10);
  border-left-color: var(--primary);
  color: #c8d3df;
}

/* Project detail (legacy) */
body:not(.light-mode):not(.admin-body) .project-detail-image,
body:not(.light-mode):not(.admin-body) .project-detail-content {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.10);
}
body:not(.light-mode):not(.admin-body) .detail-list li { color: #c8d3df; }
body:not(.light-mode):not(.admin-body) .detail-list strong { color: #fff; }
body:not(.light-mode):not(.admin-body) .detail-list { border-color: rgba(255, 255, 255, 0.08); }

/* Form inputs on public site */
body:not(.light-mode):not(.admin-body) .contact-form input,
body:not(.light-mode):not(.admin-body) .contact-form textarea,
body:not(.light-mode):not(.admin-body) .contact-form select {
  background: rgba(2, 8, 14, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Eyebrow on dark default sections — keep red text but allow on dark surface */
body:not(.light-mode):not(.admin-body) .section .eyebrow {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffd5d2;
  backdrop-filter: blur(10px);
}
body:not(.light-mode):not(.admin-body) .section .eyebrow::before {
  background: #ffd5d2;
  box-shadow: 0 0 0 4px rgba(255, 213, 210, 0.18);
}

/* Map embed */
body:not(.light-mode):not(.admin-body) .map-embed {
  background: rgba(2, 8, 14, 0.55);
  border-color: rgba(255, 255, 255, 0.10);
}

/* ============================================================
   THEME-SWITCH CROSSFADE
   Brief transition applied to common surfaces during a toggle.
   ============================================================ */
body.is-theme-switching,
body.is-theme-switching .site-header,
body.is-theme-switching .hero,
body.is-theme-switching .page-hero,
body.is-theme-switching .section,
body.is-theme-switching .section-dark,
body.is-theme-switching .contact-cta-section,
body.is-theme-switching .site-footer,
body.is-theme-switching .stat-card,
body.is-theme-switching .feature-item,
body.is-theme-switching .card,
body.is-theme-switching .project-card,
body.is-theme-switching .reference-item,
body.is-theme-switching .career-card,
body.is-theme-switching .license-card,
body.is-theme-switching .contact-panel,
body.is-theme-switching .contact-form,
body.is-theme-switching .ticker,
body.is-theme-switching .ticker-track span,
body.is-theme-switching .main-nav,
body.is-theme-switching .main-nav a,
body.is-theme-switching .theme-toggle,
body.is-theme-switching .lang-toggle,
body.is-theme-switching .menu-toggle,
body.is-theme-switching .back-to-top,
body.is-theme-switching .social-link {
  transition:
    background 0.5s var(--ease),
    background-color 0.5s var(--ease),
    color 0.5s var(--ease),
    border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease) !important;
}

/* ============================================================
   LIGHT MODE — comprehensive theme
   ============================================================ */
body.light-mode {
  background: linear-gradient(180deg, #ffffff, #f4f6f9);
  color: var(--text);
}

/* ---------- Header ---------- */
body.light-mode .site-header.is-scrolled,
body.light-mode .site-header:focus-within {
  background: rgba(255, 255, 255, 0.34);
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(7, 17, 31, 0.06);
}

body.light-mode .site-header.is-scrolled .brand,
body.light-mode .site-header:focus-within .brand { color: var(--navy); }

body.light-mode .site-header.is-scrolled .main-nav,
body.light-mode .site-header:focus-within .main-nav {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--line);
}

body.light-mode .site-header.is-scrolled .main-nav a,
body.light-mode .site-header:focus-within .main-nav a { color: var(--navy); }

body.light-mode .site-header.is-scrolled .main-nav a.active,
body.light-mode .site-header:focus-within .main-nav a.active { color: #fff; }

body.light-mode .site-header.is-scrolled .theme-toggle,
body.light-mode .site-header.is-scrolled .lang-toggle:not(.is-active),
body.light-mode .site-header.is-scrolled .menu-toggle,
body.light-mode .site-header:focus-within .theme-toggle,
body.light-mode .site-header:focus-within .lang-toggle:not(.is-active),
body.light-mode .site-header:focus-within .menu-toggle {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.32);
  color: var(--navy);
}

/* Always-glass header in light mode — highly transparent */
body.light-mode .site-header {
  background: rgba(255, 255, 255, 0.06);
  border-color: transparent;
}
body.light-mode .site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(7, 17, 31, 0.05);
}
body.light-mode .site-header:not(.is-scrolled) .brand { color: var(--navy); }
body.light-mode .site-header:not(.is-scrolled) .main-nav {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(7, 17, 31, 0.06);
  backdrop-filter: blur(8px);
}
body.light-mode .site-header:not(.is-scrolled) .main-nav a { color: var(--navy); }
body.light-mode .site-header:not(.is-scrolled) .theme-toggle,
body.light-mode .site-header:not(.is-scrolled) .lang-toggle:not(.is-active),
body.light-mode .site-header:not(.is-scrolled) .menu-toggle {
  border-color: rgba(7, 17, 31, 0.08);
  background: rgba(255, 255, 255, 0.12);
  color: var(--navy);
  backdrop-filter: blur(8px);
}

/* Mobile nav */
body.light-mode .mobile-nav {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
body.light-mode .mobile-nav a { color: var(--navy); }
body.light-mode .mobile-nav a:hover { background: rgba(7, 17, 31, 0.06); }

/* ---------- Hero ---------- */
body.light-mode .hero {
  color: var(--text);
  background: linear-gradient(180deg, #fafbfd 0%, #eef1f5 100%);
}

body.light-mode .hero::before {
  background:
    radial-gradient(800px 600px at 18% 30%, rgba(196, 39, 31, 0.10), transparent 60%),
    radial-gradient(700px 600px at 100% 100%, rgba(216, 168, 91, 0.06), transparent 60%);
}

body.light-mode .hero::after {
  border-color: rgba(7, 17, 31, 0.10);
  background:
    linear-gradient(45deg, transparent 49%, rgba(7, 17, 31, 0.08) 50%, transparent 51%),
    linear-gradient(135deg, transparent 49%, rgba(7, 17, 31, 0.06) 50%, transparent 51%);
  opacity: 0.4;
}

body.light-mode .hero-slide {
  filter: grayscale(15%) contrast(1.05) brightness(1.0);
}
body.light-mode .hero-slide.active { opacity: 0.55; }

body.light-mode .hero-slideshow::after {
  /* Lighter veil so the building photos are clearly visible */
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.30) 50%, rgba(255, 255, 255, 0.65)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(245, 247, 250, 0.55));
}

body.light-mode .hero-grid {
  background-image:
    linear-gradient(rgba(7, 17, 31, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 17, 31, 0.05) 1px, transparent 1px);
  opacity: 0.55;
}

body.light-mode .hero-content h1 { color: var(--navy); text-shadow: none; }
body.light-mode .hero-content p { color: var(--text-soft); }
body.light-mode .hero .text-link { color: var(--primary); }

body.light-mode .hero .eyebrow,
body.light-mode .page-hero .eyebrow,
body.light-mode .section-dark .eyebrow {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  backdrop-filter: none;
}
body.light-mode .hero .eyebrow::before,
body.light-mode .page-hero .eyebrow::before,
body.light-mode .section-dark .eyebrow::before {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(196, 39, 31, 0.16);
}

/* Stat cards (hero) */
body.light-mode .stat-card {
  border-color: var(--line);
  background: linear-gradient(160deg, #ffffff, #f3f5f8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
}
body.light-mode .stat-card strong,
body.light-mode .stat-card span {
  background: linear-gradient(180deg, var(--navy) 0%, #4a5468 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.light-mode .stat-card p { color: var(--muted); }
body.light-mode .stat-card:hover {
  background: linear-gradient(160deg, #ffffff, #eef1f5);
  border-color: rgba(196, 39, 31, 0.24);
}

/* Scroll cue */
body.light-mode .scroll-cue { border-color: rgba(7, 17, 31, 0.4); opacity: 0.7; }
body.light-mode .scroll-cue::after { background: var(--navy); }

/* Hero secondary button */
body.light-mode .hero .btn-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
  backdrop-filter: blur(10px);
}
body.light-mode .hero .btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- Page hero ---------- */
body.light-mode .page-hero {
  color: var(--text);
  background: linear-gradient(180deg, #fafbfd 0%, #eef1f5 100%);
}

body.light-mode .page-hero::before {
  background:
    radial-gradient(700px 500px at 15% 30%, rgba(196, 39, 31, 0.10), transparent 55%),
    radial-gradient(500px 360px at 88% 100%, rgba(216, 168, 91, 0.06), transparent 60%),
    linear-gradient(rgba(7, 17, 31, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(7, 17, 31, 0.04) 1px, transparent 1px) 0 0 / 56px 56px;
}

body.light-mode .page-hero::after { border-color: rgba(7, 17, 31, 0.16); }
body.light-mode .page-hero h1 { color: var(--navy); }
body.light-mode .page-hero p { color: var(--text-soft); }

/* ---------- Dark sections (now light) ---------- */
body.light-mode .section-dark {
  color: var(--text);
  background: linear-gradient(180deg, #f5f7fa 0%, #eef1f5 100%);
}

body.light-mode .section-dark::before {
  background:
    radial-gradient(800px 460px at 12% 18%, rgba(196, 39, 31, 0.08), transparent 55%),
    radial-gradient(700px 420px at 100% 100%, rgba(7, 17, 31, 0.04), transparent 60%),
    linear-gradient(rgba(7,17,31,0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(7,17,31,0.04) 1px, transparent 1px) 0 0 / 56px 56px;
}

body.light-mode .section-dark p,
body.light-mode .section-dark .project-meta,
body.light-mode .section-dark small { color: var(--muted); }

body.light-mode .section-dark h1,
body.light-mode .section-dark h2,
body.light-mode .section-dark h3,
body.light-mode .section-dark h4 { color: var(--navy); }

body.light-mode .section-dark .feature-item,
body.light-mode .section-dark .card,
body.light-mode .section-dark .reference-item,
body.light-mode .section-dark .career-card {
  border-color: var(--line);
  background: #ffffff;
  backdrop-filter: none;
  box-shadow: var(--shadow-sm);
}

body.light-mode .section-dark .feature-item:hover,
body.light-mode .section-dark .card:hover,
body.light-mode .section-dark .reference-item:hover,
body.light-mode .section-dark .career-card:hover {
  background: #ffffff;
  border-color: rgba(196, 39, 31, 0.30);
  box-shadow: var(--shadow);
}

body.light-mode .section-dark .feature-item h3,
body.light-mode .section-dark .card h3,
body.light-mode .section-dark .reference-item span,
body.light-mode .section-dark .career-card h3 { color: var(--navy); }

body.light-mode .section-dark .ticker {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}
body.light-mode .section-dark .ticker-track span {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
  box-shadow: var(--shadow-xs);
}

body.light-mode .section-dark .text-link { color: var(--primary); }

/* Team grid sits on dark/light section — keep card chrome consistent */
body.light-mode .section-dark .team-card {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

body.light-mode .team-card .team-overlay {
  color: #fff;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 11, 13, 0.58) 34%, rgba(10, 11, 13, 0.96) 100%);
}

body.light-mode .team-card .team-overlay h3 {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body.light-mode .team-card .team-overlay p {
  color: #d7e2ed;
}

body.light-mode .team-card .team-email {
  color: #ffd5d2 !important;
}

/* ---------- Contact CTA ---------- */
body.light-mode .contact-cta-section {
  background: linear-gradient(180deg, #f5f7fa 0%, #eef1f5 100%);
}
body.light-mode .contact-cta-section::before {
  background:
    radial-gradient(600px 400px at 10% 20%, rgba(196, 39, 31, 0.10), transparent 60%),
    radial-gradient(500px 360px at 95% 95%, rgba(216, 168, 91, 0.06), transparent 60%);
}
body.light-mode .contact-cta { color: var(--text); }
body.light-mode .contact-cta h2 { color: var(--navy); }
body.light-mode .contact-cta p { color: var(--text-soft); }
body.light-mode .contact-cta .btn-secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--navy);
}
body.light-mode .contact-cta .btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- Footer ---------- */
body.light-mode .site-footer {
  color: var(--text-soft);
  background: linear-gradient(180deg, #f3f5f8 0%, #e9edf2 100%);
  border-top: 1px solid var(--line);
}
body.light-mode .site-footer::before {
  background:
    radial-gradient(800px 460px at 0% 0%, rgba(196, 39, 31, 0.06), transparent 55%),
    linear-gradient(rgba(7,17,31,0.04) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(7,17,31,0.04) 1px, transparent 1px) 0 0 / 64px 64px;
}
body.light-mode .site-footer h3 { color: var(--navy); }
body.light-mode .site-footer h4 { color: var(--primary); }
body.light-mode .site-footer p,
body.light-mode .site-footer a { color: var(--text-soft); }
body.light-mode .site-footer a:hover { color: var(--primary); }
body.light-mode .social-link {
  border-color: var(--line);
  background: #ffffff;
  color: var(--navy);
  box-shadow: var(--shadow-xs);
}
body.light-mode .social-link:hover {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
}
body.light-mode .footer-bottom {
  border-color: var(--line);
  color: var(--text-faint);
}

/* ---------- Back to top ---------- */
body.light-mode .back-to-top {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--line);
  color: var(--navy);
  box-shadow: var(--shadow);
}
body.light-mode .back-to-top:hover {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
}

/* ---------- Page loader (light mode opening) ---------- */
body.light-mode .page-loader {
  background:
    radial-gradient(800px 600px at 50% 50%, rgba(196, 39, 31, 0.14), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #eef1f5 100%);
}
body.light-mode .loader-inner { border-color: rgba(7, 17, 31, 0.10); }
body.light-mode .loader-brand span { color: var(--navy); }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-body {
  --line: rgba(255, 255, 255, 0.10);
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 8% 0%, rgba(196, 39, 31, 0.10), transparent 60%),
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(180deg, #141517, #0a0b0d);
  color: #e8eef5;
}

.admin-topbar {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid var(--line-light);
  background: rgba(14, 15, 17, 0.86);
  backdrop-filter: blur(18px);
}

.admin-topbar-inner {
  display: flex;
  align-items: center;
  width: min(1380px, calc(100% - 32px));
  min-height: 76px;
  margin-inline: auto;
  gap: 18px;
}

.admin-brand-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 850;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 6px;
}

.admin-topnav a,
.admin-topnav summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  color: #d9e3ee;
  font-size: 0.88rem;
  font-weight: 650;
  list-style: none;
  transition: background var(--d) var(--ease), border-color var(--d) var(--ease), color var(--d) var(--ease);
}

.admin-topnav a:hover,
.admin-topnav a.is-active,
.admin-topnav summary:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-topnav a.is-active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(196, 39, 31, 0.5);
}

.admin-topnav summary::-webkit-details-marker { display: none; }

.admin-nav-group { position: relative; }

.admin-nav-group summary { cursor: pointer; }

.admin-nav-group summary::after {
  content: "";
  width: 7px; height: 7px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.admin-nav-group[open] summary,
.admin-nav-group.is-active summary {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  min-width: 220px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: rgba(16, 26, 39, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-strong);
  animation: dropIn 0.22s var(--ease-out);
}

.admin-nav-dropdown a { justify-content: flex-start; }

.admin-logout { color: #ffb5af !important; }

.admin-simple-wrap {
  width: min(1380px, calc(100% - 32px));
  margin-inline: auto;
  padding: 36px 0 88px;
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.admin-head h1 {
  margin-bottom: 8px;
  color: #fff;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}

.admin-head p { color: #aebdcc; }

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.admin-card {
  position: relative;
  min-height: 138px;
  padding: 24px;
  overflow: hidden;
  border-color: var(--line-light);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(10px);
}

.admin-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 60px; height: 2px;
  background: var(--grad-primary);
}

.admin-card::after {
  content: "";
  position: absolute;
  right: 18px; bottom: 18px;
  width: 56px; height: 56px;
  border-right: 2px solid rgba(255, 255, 255, 0.18);
  border-bottom: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 0 0 8px 0;
}

.admin-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
}

.admin-card strong {
  display: block;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #fff 0%, #c9d6e4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-card span {
  display: block;
  margin-top: 10px;
  color: #c8d4df;
  font-weight: 750;
  letter-spacing: 0.005em;
}

.admin-form-card,
.admin-table-card,
.settings-block {
  margin-bottom: 24px;
  padding: 24px;
  border-color: var(--line-light);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(10px);
}

.admin-form-card h2,
.settings-block h2 {
  color: #fff;
  font-size: 1.28rem;
  letter-spacing: -0.018em;
}

.admin-form-grid,
.settings-bilingual,
.settings-row-single {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-stat-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.admin-form-grid label,
.settings-block label,
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #dbe5ee;
  font-size: 0.85rem;
  font-weight: 750;
  letter-spacing: 0.005em;
}

.admin-form-grid label.lang-mk,
.settings-bilingual label.lang-mk {
  border-left: 3px solid rgba(196, 39, 31, 0.65);
  padding-left: 12px;
}

.admin-form-grid label.lang-en,
.settings-bilingual label.lang-en {
  border-left: 3px solid rgba(31, 107, 196, 0.62);
  padding-left: 12px;
}

.admin-muted-line {
  display: block;
  margin-top: 4px;
  color: var(--gray-400);
  font-size: 0.76rem;
  font-weight: 600;
}

.admin-form-grid input,
.admin-form-grid textarea,
.admin-form-grid select,
.settings-block input,
.settings-block textarea,
.settings-block select,
.contact-form input,
.contact-form textarea,
.contact-form select,
.login-card input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xs);
  outline: none;
  background: rgba(2, 8, 14, 0.55);
  color: #fff;
  font-size: 0.95rem;
  transition: border-color var(--d) var(--ease), box-shadow var(--d) var(--ease), background var(--d) var(--ease);
}

.admin-form-grid textarea,
.settings-block textarea,
.contact-form textarea {
  min-height: 112px;
  resize: vertical;
}

.admin-form-grid input:focus,
.admin-form-grid textarea:focus,
.admin-form-grid select:focus,
.settings-block input:focus,
.settings-block textarea:focus,
.settings-block select:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.login-card input:focus {
  border-color: rgba(196, 39, 31, 0.6);
  background: rgba(2, 8, 14, 0.75);
  box-shadow: 0 0 0 4px rgba(196, 39, 31, 0.18);
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.admin-table-card { overflow-x: auto; padding: 14px; }

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #dbe5ee;
  font-size: 0.88rem;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #9eacba;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-table tr:hover td { background: rgba(255, 255, 255, 0.04); }

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.actions form {
  display: inline-flex;
  margin: 0;
}

.admin-feature-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.admin-feature-toggle {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.admin-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-table-toolbar form {
  display: inline-flex;
  margin: 0;
}

.admin-order-form {
  display: inline-grid;
  gap: 4px;
  margin: 0;
}

.admin-order-input {
  width: 74px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 800;
}

.admin-order-form small {
  color: #8f9eae;
  font-size: 0.72rem;
  font-weight: 700;
}

.current-image-box {
  display: grid;
  gap: 8px;
  align-content: start;
  margin-bottom: 8px;
}

.remove-image-check {
  margin-top: 4px;
  color: #dbe5ee;
  font-size: 0.82rem;
  font-weight: 750;
}

.btn-small {
  min-height: 34px;
  padding: 0 12px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-small:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.btn-small.danger,
.danger {
  border-color: rgba(255, 181, 175, 0.3);
  background: rgba(155, 37, 37, 0.18);
  color: #ffcbc7;
}

.btn-small.danger:hover {
  background: rgba(155, 37, 37, 0.32);
  border-color: rgba(255, 181, 175, 0.5);
}

.alert-success,
.alert-error {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 750;
  letter-spacing: 0.005em;
  margin-bottom: 16px;
}

.alert-success {
  border: 1px solid rgba(31, 122, 76, 0.35);
  background: linear-gradient(135deg, rgba(31, 122, 76, 0.22), rgba(31, 122, 76, 0.10));
}

.alert-error {
  border: 1px solid rgba(155, 37, 37, 0.42);
  background: linear-gradient(135deg, rgba(155, 37, 37, 0.24), rgba(155, 37, 37, 0.10));
}

.settings-form { display: grid; gap: 6px; }

.settings-block {
  display: grid;
  gap: 16px;
}

.settings-block h2 {
  padding-bottom: 14px;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.settings-submit {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 18px;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: rgba(14, 15, 17, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
}

/* Login */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 500px at 50% 30%, rgba(196, 39, 31, 0.18), transparent 55%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--grad-navy);
}

.login-card {
  width: min(440px, 100%);
  padding: 36px;
  border-color: var(--line-light);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  color: #fff;
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.login-card h1 {
  max-width: none;
  color: #fff;
  font-size: 2rem;
  letter-spacing: -0.025em;
}

.login-logo {
  width: 88px; height: 88px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 22px rgba(196, 39, 31, 0.45));
}

.login-card p { color: #cbd8e4; }

.login-card label {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: #e8eef5;
  font-weight: 750;
}

.login-card .btn { width: 100%; margin-top: 22px; }

.admin-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  padding: 26px;
  border-right: 1px solid var(--line-light);
  background: rgba(14, 15, 17, 0.92);
}

.admin-brand {
  display: block;
  margin-bottom: 26px;
  color: #fff;
  font-weight: 850;
}

.admin-sidebar nav { display: grid; gap: 6px; }

.admin-sidebar nav a {
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  color: #d9e3ee;
  font-weight: 700;
  transition: background var(--d) var(--ease);
}

.admin-sidebar nav a:hover { background: rgba(255, 255, 255, 0.08); }

.admin-main { padding: 30px; }

/* Admin light mode */
body.admin-light {
  --line: rgba(7, 17, 31, 0.12);
  background: #f3f5f7 !important;
  color: var(--text) !important;
}

body.admin-light .admin-topbar,
body.admin-light .settings-submit {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
}

body.admin-light .admin-brand-inline,
body.admin-light .admin-topnav a,
body.admin-light .admin-topnav summary,
body.admin-light .admin-head h1,
body.admin-light .admin-form-card h2,
body.admin-light .settings-block h2 {
  color: var(--navy);
}

body.admin-light .admin-topnav a:hover,
body.admin-light .admin-nav-group.is-active summary,
body.admin-light .admin-topnav summary:hover,
body.admin-light .admin-nav-group[open] summary {
  border-color: var(--line);
  background: rgba(7, 17, 31, 0.06);
}

body.admin-light .admin-topnav a.is-active { color: #fff; }

body.admin-light .admin-nav-dropdown {
  border-color: var(--line);
  background: #fff;
}

body.admin-light .admin-card,
body.admin-light .admin-form-card,
body.admin-light .admin-table-card,
body.admin-light .settings-block {
  border-color: var(--line);
  background: #fff;
}

body.admin-light .admin-card strong {
  background: linear-gradient(180deg, var(--navy) 0%, #3a4a5e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.admin-light .admin-card span,
body.admin-light .admin-form-grid label,
body.admin-light .settings-block label,
body.admin-light .admin-table td {
  color: var(--text);
}

body.admin-light .settings-block h4,
body.admin-light .admin-form-card h4,
body.admin-light .upload-box p,
body.admin-light .upload-box strong {
  color: var(--navy) !important;
}

body.admin-light .admin-muted-line,
body.admin-light .upload-box-hint,
body.admin-light .upload-box-current {
  color: var(--muted) !important;
}

body.admin-light .admin-table th { color: var(--muted); }

body.admin-light .admin-table th,
body.admin-light .admin-table td,
body.admin-light .settings-block h2 {
  border-color: var(--line);
}

body.admin-light .admin-form-grid input,
body.admin-light .admin-form-grid textarea,
body.admin-light .admin-form-grid select,
body.admin-light .settings-block input,
body.admin-light .settings-block textarea,
body.admin-light .settings-block select {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

body.admin-light .admin-order-input {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

body.admin-light .admin-order-form small {
  color: var(--muted);
}

body.admin-light .btn-small {
  border-color: var(--line);
  background: #f4f6f8;
  color: var(--navy);
}

body.admin-light .admin-theme-toggle {
  border-color: var(--line);
  background: #fff;
  color: var(--navy);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1180px) {
  h1 { font-size: 4rem; }
  h2 { font-size: 2.55rem; }
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .card-grid,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-topbar-inner,
  .admin-topnav {
    align-items: flex-start;
  }
  .admin-topbar-inner {
    flex-direction: column;
    padding: 14px 0;
  }
  .admin-topnav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .admin-nav-dropdown {
    position: static;
    min-width: 100%;
    margin-top: 6px;
  }
}

@media (max-width: 992px) {
  :root { --section-y: 80px; }
  h1 { font-size: 3.4rem; }
  h2 { font-size: 2.2rem; }
  .hero { min-height: auto; }
  .hero-content { padding: 132px 0 80px; }
  .hero::after { width: 50%; opacity: 0.22; }
  .two-col,
  .project-detail,
  .contact-grid,
  .career-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .career-intro { position: static; }
  .project-grid,
  .licenses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root { --section-y: 64px; }
  .container,
  .admin-simple-wrap,
  .admin-topbar-inner {
    width: min(100% - 24px, 1180px);
  }
  h1, .page-hero h1 { font-size: 2.7rem; }
  h2 { font-size: 2rem; }
  .header-row { min-height: 72px; }
  .brand img { width: 50px; height: 50px; }
  .brand span {
    max-width: 148px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero-actions,
  .section-head,
  .footer-bottom,
  .career-card,
  .reference-item {
    flex-direction: column;
    align-items: stretch;
  }
  .contact-cta { grid-template-columns: 1fr; }
  .contact-cta-actions { justify-content: stretch; }
  .hero-actions .btn,
  .contact-cta-actions .btn,
  .career-btn,
  .ref-link {
    width: 100%;
  }
  .stats-row,
  .card-grid,
  .project-grid,
  .team-grid,
  .reference-list,
  .licenses-grid,
  .project-gallery,
  .admin-cards,
  .admin-form-grid,
  .settings-bilingual,
  .settings-row-single,
  .settings-stat-row {
    grid-template-columns: 1fr;
  }
  .stat-card { min-height: 116px; }
  .team-card,
  .team-card img { min-height: 360px; }
  .page-hero { padding: 132px 0 72px; }
  .project-detail-image img { min-height: 320px; }
  .filters {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    border-radius: var(--radius);
  }
  .admin-topnav {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .admin-topnav a,
  .admin-topnav summary {
    width: 100%;
    justify-content: flex-start;
  }
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

@media (max-width: 480px) {
  :root { --section-y: 56px; }
  .container,
  .admin-simple-wrap,
  .admin-topbar-inner {
    width: min(100% - 20px, 1180px);
  }
  h1, .page-hero h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  .header-actions { gap: 6px; }
  .theme-toggle,
  .lang-toggle,
  .menu-toggle {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
  }
  .hero-content { padding: 116px 0 64px; }
  .hero-content p,
  .page-hero p { font-size: 1rem; }
  .feature-item,
  .card,
  .project-body,
  .contact-panel,
  .contact-form,
  .license-card,
  .career-card,
  .admin-form-card,
  .admin-table-card,
  .settings-block,
  .login-card {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Drag & drop upload zone (admin forms)
   ============================================================ */
.dropzone {
  position: relative;
  display: block;
  margin-top: 8px;
  border: 1.5px dashed rgba(255, 255, 255, 0.20);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: rgba(255, 255, 255, 0.38); background: rgba(255, 255, 255, 0.04); }
.dropzone.is-drag { border-color: var(--primary-3); background: rgba(196, 39, 31, 0.12); }
.dropzone .dz-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-prompt { display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; }
.dropzone .dz-icon { color: var(--primary-3); line-height: 0; }
.dropzone .dz-text { font-size: 13px; color: #e6e6e6; }
.dropzone .dz-text u { color: #fff; text-underline-offset: 2px; }
.dropzone .dz-hint { font-size: 11px; color: var(--gray-500); }
.dropzone-preview { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.dropzone-preview:empty { display: none; }
.dz-thumb { width: 88px; }
.dz-thumb[draggable="true"] { cursor: grab; transition: opacity 0.15s ease, transform 0.15s ease; }
.dz-thumb[draggable="true"]:active { cursor: grabbing; }
.dz-thumb.is-sorting { opacity: 0.55; transform: scale(0.96); }
.dz-thumb img { width: 88px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18); display: block; }
.dz-file-ic { width: 88px; height: 64px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; letter-spacing: 1px; color: #cfd2d8; background: rgba(255, 255, 255, 0.04); }
.dz-thumb span { display: block; font-size: 10px; color: var(--gray-500); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.admin-light .dropzone { border-color: rgba(7, 17, 31, 0.18); background: rgba(7, 17, 31, 0.02); }
body.admin-light .dropzone:hover { border-color: rgba(7, 17, 31, 0.34); background: rgba(7, 17, 31, 0.04); }
body.admin-light .dropzone .dz-text { color: #1a2230; }
body.admin-light .dropzone .dz-text u { color: #000; }
body.admin-light .dz-file-ic { color: #44505f; background: rgba(7, 17, 31, 0.03); border-color: var(--line); }

/* Image-upload section boxes (projects form) — theme aware */
.upload-box {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.upload-box-title {
  margin-bottom: 12px;
  color: var(--gray-400);
  font-size: 13px;
}

.upload-box-title strong {
  color: #e2e2e2;
}

.upload-box-hint {
  margin: 10px 0 6px;
  color: var(--gray-500);
  font-size: 12px;
}

.upload-box-current {
  margin-top: 8px;
  color: var(--gray-400);
  font-size: 12px;
}

.upload-box-current a {
  color: var(--primary);
}

body.admin-light .upload-box {
  background: #f7f9fb;
  border-color: var(--line);
}
body.admin-light .upload-box p,
body.admin-light .upload-box label { color: #1a2230 !important; }
