/* =====================================================================
   Paul Walter — Transport Economics | custom component layer
   Loaded after tailwind.css. Holds keyframes, components, overrides.
   ===================================================================== */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --shadow-tint: rgba(0, 125, 75, 0.16);
  --shadow-tint-soft: rgba(0, 125, 75, 0.10);
  --shadow-tint-strong: rgba(0, 125, 75, 0.24);

  --nav-h: 4.5rem;
}

/* ---------- base / page ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  min-height: 100dvh;
  overflow-x: hidden;
}
body.loaded { opacity: 1; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--color-primary-light); color: var(--color-text-dark); }

/* Film grain overlay — site-wide */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  transform: translateY(-150%);
  background: var(--color-primary);
  color: #fff;
  padding: 0.625rem 1.125rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- focus rings ---------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =====================================================================
   BUTTON SYSTEM
   --tx/--ty : magnetic offset written by JS on pointermove
   --mx/--my : cursor position for the spotlight (default centred)
   --glow    : 0..1 spotlight strength (animated on hover)
   --press   : 1 normal, <1 while held
   ===================================================================== */
@property --glow {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

.btn-primary,
button.btn-primary,
.btn-secondary {
  --tx: 0px;
  --ty: 0px;
  --mx: 50%;
  --my: 50%;
  --press: 1;
  --glow: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transform: translate(var(--tx), var(--ty)) scale(var(--press));
  /* Snappy, grounded feel: short durations, no floaty long transitions. */
  transition: transform 0.14s var(--ease-out),
              background-color 0.14s var(--ease-out),
              box-shadow 0.16s var(--ease-out),
              --glow 0.2s var(--ease-out);
}

/* cursor-following sheen — paints above the fill, below the text */
.btn-primary::before,
.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle 7rem at var(--mx) var(--my),
              rgba(255, 255, 255, 0.35), transparent 60%);
  opacity: var(--glow);
  pointer-events: none;
}

.btn-primary,
button.btn-primary {
  border: none;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 1px 2px var(--shadow-tint-soft),
              0 6px 16px -8px var(--shadow-tint);
}
@media (hover: hover) {
  .btn-primary:hover {
    background: var(--color-primary-hover);
    --glow: 1;
    box-shadow: 0 2px 4px var(--shadow-tint-soft),
                0 10px 24px -8px var(--shadow-tint-strong);
  }
}
.btn-primary:active { --press: 0.96; transition-duration: 0.08s; }
.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  opacity: 0.6;
  cursor: wait;
  --tx: 0px; --ty: 0px; --press: 1;
}

.btn-secondary {
  border: 1px solid var(--color-glass-border);
  background: var(--color-primary-tint);
  color: var(--color-primary);
  box-shadow: 0 4px 12px -8px var(--shadow-tint-soft);
}
.btn-secondary::before {
  background: radial-gradient(circle 7rem at var(--mx) var(--my),
              rgba(0, 125, 75, 0.16), transparent 60%);
}
@media (hover: hover) {
  .btn-secondary:hover {
    background: var(--color-primary-tint-hover);
    --glow: 1;
    box-shadow: 0 8px 20px -10px var(--shadow-tint);
  }
}
.btn-secondary:active { --press: 0.96; transition-duration: 0.08s; }

/* =====================================================================
   LIQUID GLASS — frosted translucent pill (works in every modern browser)
   ===================================================================== */
.liquid-glass {
  position: relative;
  isolation: isolate;
  background-color: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px) saturate(170%);
  backdrop-filter: blur(12px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8),
              inset 0 -8px 14px -10px rgba(0, 125, 75, 0.12),
              0 6px 18px -10px var(--shadow-tint);
  overflow: hidden;
}
/* diagonal top-left shine */
.liquid-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.08) 45%, transparent 70%);
  pointer-events: none;
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .liquid-glass { background-color: rgba(255, 255, 255, 0.85); }
}

/* The two real glass elements carry their own opaque tint from .lang-toggle /
   .btn-secondary — let the glass win, including on hover. */
.lang-toggle.liquid-glass,
.btn-secondary.liquid-glass {
  background-color: rgba(255, 255, 255, 0.4);
}
@media (hover: hover) {
  .lang-toggle.liquid-glass:hover,
  .btn-secondary.liquid-glass:hover {
    background-color: rgba(255, 255, 255, 0.6);
  }
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out),
              backdrop-filter 0.3s var(--ease-out);
}
.navbar.scrolled {
  background: var(--color-nav-scrolled);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset,
              0 6px 24px -12px var(--shadow-tint);
}
.nav-inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text-dark);
}
.nav-logo-img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  filter: brightness(0);
}
.nav-logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s var(--ease-out);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease-out);
}
@media (hover: hover) {
  .nav-link:hover { color: var(--color-primary); }
  .nav-link:hover::after { transform: scaleX(1); }
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--color-glass-border);
  border-radius: 50px;
  background: var(--color-primary-tint);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.lang-toggle:active { transform: scale(0.97); }
.lang-toggle .lang-sep { opacity: 0.4; }
.lang-toggle .lang-en,
.lang-toggle .lang-de {
  transition: color 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}
.lang-toggle[data-lang="en"] .lang-en { color: var(--color-primary); }
.lang-toggle[data-lang="en"] .lang-de { opacity: 0.5; }
.lang-toggle[data-lang="de"] .lang-de { color: var(--color-primary); }
.lang-toggle[data-lang="de"] .lang-en { opacity: 0.5; }

/* hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text-dark);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s var(--ease-out);
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile overlay menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(242, 249, 245, 0.7);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.mobile-link {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--color-text-dark);
  transition: color 0.2s var(--ease-out);
}
@media (hover: hover) {
  .mobile-link:hover { color: var(--color-primary); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg-tint);
  padding: var(--nav-h) 1.5rem 4rem;
  text-align: center;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }

.hero-dotgrid {
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(rgba(0, 125, 75, 0.18) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 0%, transparent 75%);
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  /* Light blur only — the radial gradient already does the softening. Heavy
     blur pushed the opaque core into the section's overflow clip and left a
     hard-edged green smear in the corners. Fade to a zero-alpha of the SAME
     green (not the `transparent` keyword, which interpolates through
     transparent-black and leaves a muddy grey halo). */
  filter: blur(40px);
  will-change: transform;
}
.hero-blob-1 {
  width: 42rem;
  height: 42rem;
  top: -8rem;
  left: -8rem;
  opacity: 0.5;
  background: radial-gradient(circle at 50% 50%, rgba(110, 204, 154, 0.7) 0%, rgba(110, 204, 154, 0) 64%);
  animation: blob-drift-1 20s ease-in-out infinite alternate;
}
.hero-blob-2 {
  width: 38rem;
  height: 38rem;
  bottom: -10rem;
  right: -8rem;
  opacity: 0.42;
  background: radial-gradient(circle at 50% 50%, rgba(0, 125, 75, 0.6) 0%, rgba(0, 125, 75, 0) 64%);
  animation: blob-drift-2 24s ease-in-out infinite alternate;
}
@keyframes blob-drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(3rem, 2rem) scale(1.08); }
}
@keyframes blob-drift-2 {
  from { transform: translate(0, 0) scale(1.04); }
  to   { transform: translate(-2.5rem, -2rem) scale(0.94); }
}

.hero-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--color-primary);
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(242, 249, 245, 0.1) 0%, rgba(242, 249, 245, 0.25) 55%, rgba(242, 249, 245, 0.78) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 60rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-headline {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  font-size: clamp(3.25rem, 10.5vw, 8rem);
  letter-spacing: -0.035em;
  line-height: 0.92;
  color: var(--color-text-dark);
}

/* rotating word in a single grid cell so width never jumps */
.hero-rotator {
  display: grid;
  place-items: center;
}
.hero-rotator .hero-word {
  grid-area: 1 / 1;
  color: var(--color-primary);
  opacity: 0;
  white-space: nowrap;
  will-change: transform, opacity, filter;
}
.hero-rotator .hero-word.is-active { opacity: 1; }
.hero-static { display: block; }

.hero-subtitle {
  margin: 1.75rem auto 0;
  max-width: 46ch;
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  font-weight: 300;
  color: var(--color-text-muted);
}

.hero-ctas {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.hero-ctas .btn-secondary { color: var(--color-primary); }

/* scroll indicator — minimal bouncing chevron */
.scroll-indicator {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color 0.2s var(--ease-out);
}
@media (hover: hover) {
  .scroll-indicator:hover { color: var(--color-primary); }
}
.scroll-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.scroll-chevron {
  font-size: 0.85rem;
  color: var(--color-primary);
  animation: scroll-bounce 1.8s var(--ease-in-out) infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(6px); opacity: 1; }
}

@media (max-width: 768px) {
  .hero-blob-1 { width: 22rem; height: 22rem; }
  .hero-blob-2 { width: 20rem; height: 20rem; }
}

/* =====================================================================
   SHARED SECTION TYPOGRAPHY
   ===================================================================== */
.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.section-h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text-dark);
}

/* =====================================================================
   ABOUT
   ===================================================================== */
/* Distinct white band — contrasts the mint sections above and below, lifted
   with hairline green borders and a soft tinted shadow. */
.about {
  position: relative;
  padding: 7rem 1.5rem;
  background: #ffffff;
  border-top: 1px solid var(--color-glass-border);
  border-bottom: 1px solid var(--color-glass-border);
  box-shadow: 0 -24px 48px -36px var(--shadow-tint),
              0 24px 48px -36px var(--shadow-tint);
}
.about-inner {
  position: relative;
  max-width: 50rem;
  margin: 0 auto;
  text-align: center;
}
/* short centred accent rule above the eyebrow */
.about-inner .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.about-inner .eyebrow::before,
.about-inner .eyebrow::after {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--color-primary);
  opacity: 0.45;
}
.about-lead {
  margin: 0 auto 1.5rem;
  max-width: 62ch;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-weight: 300;
  line-height: 1.4;
  color: var(--color-text-dark);
}
.about-body {
  margin: 0 auto 2.5rem;
  max-width: 62ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* =====================================================================
   PORTFOLIO
   ===================================================================== */
.portfolio {
  padding: 7rem 1.5rem;
  background: var(--color-bg-tint);
}
.portfolio-inner { max-width: 50rem; margin: 0 auto; }
.portfolio-head { text-align: center; margin-bottom: 3rem; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}
@media (max-width: 640px) {
  .project-grid { grid-template-columns: 1fr; }
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(0, 125, 75, 0.06);
  box-shadow: 0 1px 2px var(--shadow-tint-soft),
              0 18px 40px -24px var(--shadow-tint);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 2px 4px var(--shadow-tint-soft),
                0 30px 60px -28px var(--shadow-tint-strong);
  }
}

.project-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  backdrop-filter: blur(6px) saturate(120%);
}
.project-overlay-label {
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  background: var(--color-primary-tint);
  border: 1px solid var(--color-glass-border);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.project-tag {
  margin-bottom: 1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.project-title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-dark);
}
.project-desc {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
}
.project-link i { transition: transform 0.2s var(--ease-out); }
@media (hover: hover) {
  .project-link:hover i { transform: translateX(4px); }
}
.project-link.is-muted {
  color: var(--color-text-muted);
  opacity: 0.7;
  cursor: default;
}

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact {
  padding: 7rem 1.5rem;
  background: var(--color-bg-tint);
}
.contact-inner {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}
.contact-intro {
  margin: 0 auto 2rem;
  max-width: 52ch;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.contact-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-in-out);
  text-align: left;
}
.contact-panel.is-open { max-height: 720px; }
.contact-panel-inner {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-glass-border);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: opacity 0.3s var(--ease-out);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 125, 75, 0.14);
  border-radius: 0.75rem;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text-dark);
  box-shadow: 0 1px 2px var(--shadow-tint-soft);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #94a3b8; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 125, 75, 0.15);
}
.form-submit { align-self: flex-start; margin-top: 0.4rem; }

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.form-info {
  margin: 0.25rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.form-error {
  margin: 0.25rem 0 0;
  color: #b91c1c;
  font-size: 0.9rem;
}

/* success state */
.contact-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1rem 0;
}
.success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  font-size: 1.35rem;
  transform: scale(0.95);
  opacity: 0;
  animation: pop-in 0.4s var(--ease-out) forwards;
}
@keyframes pop-in {
  to { transform: scale(1); opacity: 1; }
}
.success-title { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--color-text-dark); }
.success-text { margin: 0; max-width: 40ch; color: var(--color-text-muted); }
.contact-success .btn-secondary { margin-top: 0.5rem; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
  padding: 3.5rem 1.5rem 2rem;
  background: rgba(242, 249, 245, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-glass-border);
}
.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-name { margin: 0 0 0.25rem; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text-dark); }
.footer-role { margin: 0 0 0.5rem; color: var(--color-text-muted); }
.footer-faculty {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease-out);
}
@media (hover: hover) {
  .footer-faculty:hover { border-color: var(--color-primary); }
}
.footer-right { display: flex; gap: 0.75rem; }
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--color-primary-tint);
  color: var(--color-primary);
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
@media (hover: hover) {
  .footer-social:hover { transform: translateY(-3px); background: var(--color-primary-tint-hover); }
}
.footer-bottom {
  max-width: 72rem;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-glass-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

/* =====================================================================
   REVEAL (GSAP target — start hidden, fallback class reveals)
   ===================================================================== */
.reveal { opacity: 0; }
.reveal.revealed,
.no-gsap .reveal { opacity: 1; }

/* i18n fade swap */
.lang-fade { opacity: 0; transition: opacity 0.18s var(--ease-out); }

/* =====================================================================
   SHARED AMBIENT PAGE BACKGROUND (project1 / 404)
   ===================================================================== */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--color-bg-tint);
}
.page-bg .hero-dotgrid { position: absolute; inset: -10%; }
.page-bg .hero-blob-1 { top: -10rem; left: -8rem; }
.page-bg .hero-blob-2 { bottom: -12rem; right: -8rem; }

/* =====================================================================
   PROJECT DETAIL PAGE
   ===================================================================== */
.project-page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: calc(var(--nav-h) + 2.5rem) 1.5rem 4rem;
  display: flex;
  justify-content: center;
}
.liquid-panel {
  width: 100%;
  max-width: 60rem;
  padding: 2.5rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--color-glass-border);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset,
              0 30px 80px -40px var(--shadow-tint-strong);
}
@media (max-width: 560px) {
  .liquid-panel { padding: 1.5rem; }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  text-decoration: none;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.back-link i { transition: transform 0.2s var(--ease-out); }
@media (hover: hover) {
  .back-link:hover { color: var(--color-primary); }
  .back-link:hover i { transform: translateX(-4px); }
}

.project-page-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text-dark);
}
.project-page-lead {
  margin: 0 0 2rem;
  max-width: 62ch;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.pdf-viewer {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 28rem;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-glass-border);
  box-shadow: 0 1px 2px var(--shadow-tint-soft);
}
.pdf-object, .pdf-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

/* Maximize mode */
body.viewer-max { overflow: hidden; }
body.viewer-max .navbar { transform: translateY(-110%); }
body.viewer-max .footer,
body.viewer-max .back-link,
body.viewer-max .eyebrow,
body.viewer-max .project-page-title,
body.viewer-max .project-page-lead { display: none; }
body.viewer-max .project-page { padding: 0; }
body.viewer-max .liquid-panel {
  position: fixed;
  inset: 0;
  z-index: 1100;
  max-width: none;
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}
body.viewer-max .viewer-actions { margin-bottom: 1rem; }
body.viewer-max .pdf-viewer { flex: 1; height: auto; }

/* =====================================================================
   404
   ===================================================================== */
.notfound {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-h) 1.5rem 4rem;
  text-align: center;
}
.notfound-inner { max-width: 40rem; }
.notfound-code {
  margin: 0;
  font-size: clamp(7rem, 28vw, 18rem);
  font-weight: 800;
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--color-primary);
  opacity: 0.18;
}
.notfound-title {
  margin: -0.5rem 0 1rem;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-dark);
}
.notfound-text {
  margin: 0 auto 2rem;
  max-width: 46ch;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-blob, .hero-network, .scroll-chevron { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-rotator .hero-word { transition: opacity 0.4s linear; }
}
