/* =============================================================================
   paulthiele.com — shared stylesheet
   Sections
     1. Design tokens (custom properties)
     2. Base reset + typography
     3. Background (pastel blobs + 3D canvas container)
     4. Nav (liquid-glass pill)
     5. Hero (landing section)
     6. Sections + cards (projects, about, contact shared primitives)
     7. Project tile grid
     8. Project detail (per-project page)
     9. Footer
    10. Scroll reveal animations
    11. Responsive
   ============================================================================= */


/* -----------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #5c5c60;
  --orange: #ff7800;
  --orange-soft: #ffe1c2;
  --hl:  #ffff03;

  /* Liquid glass — iOS-26 style: low blur + high saturation + brightness */
  --glass-bg:       rgba(255,255,255,0.07);
  --glass-bg-alt:   rgba(255,255,255,0.05);
  --glass-bg-deep:  rgba(255,255,255,0.12);
  --glass-filter:      blur(10px) saturate(220%) brightness(1.10);
  --glass-filter-soft: blur(7px)  saturate(195%) brightness(1.07);

  --glass-shadow:
    0 16px 50px rgba(15,15,20,0.09),
    0 3px 14px rgba(15,15,20,0.04),
    inset 0 1.5px 0.5px rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(255,255,255,0.30),
    inset 0 0 0 1px rgba(255,255,255,0.22);

  --radius-lg: 34px;
  --radius-md: 24px;

  --ease-out-soft: cubic-bezier(0.2, 0.9, 0.2, 1);

  --container-max: 1280px;
  --section-padding-y: clamp(64px, 10vw, 140px);
  --page-padding-x: clamp(20px, 4vw, 48px);
}


/* -----------------------------------------------------------------------------
   2. Base + typography
   -------------------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

/* Custom display typeface — only the Bold cut is loaded. All headlines use 700. */
@font-face {
  font-family: 'Dystopian';
  src: url('/fonts/dystopian-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.display {
  font-family: 'Dystopian', 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

/* Yellow highlighter — used inline in headlines and body */
.hl {
  background-image: linear-gradient(
    110deg,
    transparent 0%,
    var(--hl) 4%,
    var(--hl) 96%,
    transparent 100%
  );
  background-size: 0% 60%;
  background-repeat: no-repeat;
  background-position: 0 85%;
  padding: 0 0.08em;
  display: inline-block;
  transform: rotate(-0.5deg);
  transition: background-size 1.1s var(--ease-out-soft);
}
.reveal.in .hl,
.in .hl,
.hero .hl { background-size: 100% 60%; }
.hero .headline .hl { transition-delay: 0.6s; }

/* Skip-link for keyboard users (visually hidden until focused) */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus { top: 10px; left: 10px; }


/* -----------------------------------------------------------------------------
   3. Background layers
   -------------------------------------------------------------------------- */

/* Pastel blobs — give the liquid glass something colorful to refract. */
.bg-blobs {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px) saturate(1.4);
  opacity: 0.90;
  will-change: transform;
  mix-blend-mode: multiply;
}
.blob-1 {
  width: 680px; height: 680px; top: -8%; left: -8%;
  background: radial-gradient(circle, #ff9fd0 0%, transparent 65%);
  animation: blob1 26s ease-in-out infinite;
}
.blob-2 {
  width: 820px; height: 820px; top: 25%; right: -18%;
  background: radial-gradient(circle, #99c2ff 0%, transparent 65%);
  animation: blob2 30s ease-in-out infinite;
}
.blob-3 {
  width: 620px; height: 620px; bottom: -8%; left: 28%;
  background: radial-gradient(circle, #ffd966 0%, transparent 65%);
  animation: blob3 34s ease-in-out infinite;
  /* Override multiply — yellow disappears on white with multiply blending.
     Normal blend + lower opacity gives the warm subtle glow from the wide desktop view. */
  mix-blend-mode: normal;
  opacity: 0.55;
}
.blob-4 {
  width: 520px; height: 520px; top: 55%; left: 10%;
  background: radial-gradient(circle, #c4a0ff 0%, transparent 65%);
  animation: blob1 28s ease-in-out infinite reverse;
}
@keyframes blob1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(80px,-50px) scale(1.12); }
  66%     { transform: translate(-40px,70px) scale(0.95); }
}
@keyframes blob2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-120px,60px) scale(1.1); }
}
@keyframes blob3 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(60px,-80px) scale(1.08); }
}

/* 3D canvas. On mobile it's constrained to the top half so it doesn't
   fight the headline for attention — see §11 Responsive. */
#canvas-container {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
}

/* Scroll progress bar along the very top edge */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--ink);
  z-index: 100;
  transition: width 0.05s linear;
}


/* -----------------------------------------------------------------------------
   4. Nav — fat + compact liquid-glass pill, centered, follows scroll
   -------------------------------------------------------------------------- */

/* Liquid-glass mixin. :where() has zero specificity so element-level
   `position` declarations always win over it. */
:where(.glass) { position: relative; }
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}
.glass::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.80) 0%,
      rgba(255,255,255,0.25) 30%,
      rgba(255,255,255,0.00) 55%),
    radial-gradient(140% 60% at 50% 0%,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.00) 55%);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}
.glass::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.6px;
  background: conic-gradient(from 130deg at 50% 50%,
    rgba(255,140,190,0.95)   0deg,
    rgba(255,200,230,0.60)  50deg,
    rgba(185,210,255,0.85) 110deg,
    rgba(255,255,255,0.95) 170deg,
    rgba(205,180,255,0.95) 230deg,
    rgba(255,195,150,0.90) 290deg,
    rgba(255,140,190,0.95) 360deg);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

nav {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: clamp(16px, 2.4vw, 28px);
  padding: 14px clamp(20px, 2.4vw, 28px) 14px 14px;
  z-index: 200;
  border-radius: 999px;
  width: max-content;
  max-width: min(760px, calc(100vw - 32px));
  white-space: nowrap;
  animation: navIn 1.2s var(--ease-out-soft) both;
  transition:
    padding 0.35s var(--ease-out-soft),
    top     0.35s var(--ease-out-soft),
    gap     0.35s var(--ease-out-soft),
    box-shadow 0.35s ease;
  will-change: top, padding;
}
nav.scrolled {
  top: 12px;
  padding: 10px 20px 10px 12px;
  gap: clamp(14px, 2vw, 22px);
}
nav.scrolled .logo-mark { width: 24px; height: 24px; }
nav.scrolled .logo       { font-size: 14px; }
nav.scrolled ul          { font-size: 13px; gap: 16px; }

@keyframes navIn {
  from { transform: translateX(-50%) translateY(-30px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

nav .logo {
  position: relative; z-index: 3;
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; font-size: 15px; letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
nav .logo-mark {
  width: 28px; height: 28px; flex-shrink: 0;
  display: inline-block;
  transition: width 0.35s var(--ease-out-soft), height 0.35s var(--ease-out-soft);
}
nav .logo-mark svg { width: 100%; height: 100%; display: block; }

nav ul {
  position: relative; z-index: 3;
  display: flex; list-style: none; gap: clamp(16px, 2vw, 22px);
  font-size: 14px;
}
nav a {
  color: inherit; text-decoration: none;
  opacity: 0.85; transition: opacity 0.2s, color 0.2s;
}
nav a:hover,
nav a[aria-current="page"] { opacity: 1; color: var(--orange); }


/* -----------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px var(--page-padding-x) 10vh;
  z-index: 2; pointer-events: none;
}
.hero * { pointer-events: auto; }

.meta {
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px;
}

.headline {
  font-family: 'Dystopian', 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 10vw, 170px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  max-width: 1400px;
  margin-bottom: 0;
  position: relative;
  z-index: 3;
  text-shadow: 0 2px 16px rgba(255,255,255,0.5);
}

.hero-role {
  font-family: 'Dystopian', 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 2.8vw, 32px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-top: 28px;
  color: var(--ink);
}

.hero-semester {
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 500;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.01em;
}

.sub {
  max-width: 520px;
  font-size: clamp(14px, 1.2vw, 15px);
  line-height: 1.5;
  color: #1a1a1a;
  margin-top: 28px;
  font-weight: 500;
  text-shadow: 0 1px 10px rgba(255,255,255,0.4);
}

.scroll-hint {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
  z-index: 5;
  animation: float 2.4s ease-in-out infinite;
  padding: 12px 24px; border-radius: 999px;
  opacity: 1;
  transition: opacity 0.4s;
}
.scroll-hint > span { position: relative; z-index: 3; }
.scroll-hint.hidden { opacity: 0; pointer-events: none; }

@keyframes float {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}


/* -----------------------------------------------------------------------------
   6. Sections + cards
   -------------------------------------------------------------------------- */

.section {
  position: relative;
  padding: var(--section-padding-y) var(--page-padding-x);
  z-index: 2;
  pointer-events: none;
}
.section > * { pointer-events: auto; }

.section-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.section h2 {
  font-family: 'Dystopian', 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 88px);
  letter-spacing: -0.03em;
  line-height: 1;
}

.card {
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  font-size: 16px; line-height: 1.55;
  color: #151515;
  max-width: 520px;
  font-weight: 500;
}
.card > * { position: relative; z-index: 3; }
.card + .card { margin-top: 20px; }

.section-label {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 24px;
  padding: 7px 14px; border-radius: 999px;
}
.section-label > span { position: relative; z-index: 3; }


/* -----------------------------------------------------------------------------
   7. Project tiles (grid on home + /projekte)
   -------------------------------------------------------------------------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
  max-width: var(--container-max);
  margin-left: auto; margin-right: auto;
  /* horizontal padding is delegated to the parent section/wrapper to avoid
     double-padding when nested inside a .section that already pads */
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  max-height: 420px;
  border-radius: var(--radius-lg);
  padding: 28px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.5s var(--ease-out-soft), box-shadow 0.5s;
  cursor: pointer;
}
.tile > .tile-inner {
  /* Use absolute positioning instead of height:100% — Safari cannot resolve
     percentage heights when the parent's height comes from aspect-ratio alone
     (computed height becomes negative). Inset inherits from the padding-box,
     so the inner fills the same area that height:100% would in Chrome. */
  position: absolute; inset: 28px; z-index: 3;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 0;
}
.tile:hover { /* handled by liquid glass hover in §13 */ }
.tile:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.tile .num {
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--muted); text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255,255,255,0.6);
}
.tile .title {
  font-family: 'Dystopian', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.0;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  flex-shrink: 0;
}
.tile .arrow {
  position: absolute; right: 20px; top: 20px; z-index: 3;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(10,10,10,0.06);
  transition: background 0.3s, transform 0.4s var(--ease-out-soft);
  font-size: 14px;
}
.tile:hover .arrow {
  background: var(--orange);
  color: #fff;
  transform: rotate(-15deg);
}

/* Floating PNG image group inside tiles */
.tile-float-group {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 36px 28px 60px;
  pointer-events: none;
}

/* Override global img reset — critical for flex layout */
.tile-float-group img.tile-float-img {
  display: block;
  flex: 0 1 auto;
  width: auto;
  max-width: 45%;
  height: 75%;
  max-height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.15));
  will-change: transform;
  transition: transform 0.5s var(--ease-out-soft), filter 0.4s;
}

/* Staggered float animation per image — rotation baked in via CSS custom props */
.tile-float-img.fi-1 { animation: tile-float-a 3.8s ease-in-out infinite; }
.tile-float-img.fi-2 { animation: tile-float-b 4.2s ease-in-out infinite; }
.tile-float-img.fi-3 { animation: tile-float-c 3.5s ease-in-out infinite; }

@keyframes tile-float-a {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-5px) rotate(var(--r, 0deg)); }
}
@keyframes tile-float-b {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-3.5px) rotate(var(--r, 0deg)); }
}
@keyframes tile-float-c {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-6px) rotate(var(--r, 0deg)); }
}

/* Hover: lift images (float continues) */
.tile:hover .tile-float-img {
  filter: drop-shadow(0 18px 32px rgba(0,0,0,0.22));
}

/* 3 images: each gets ~30% width */
.tile-float-group--3 img.tile-float-img { max-width: 32%; height: 70%; }

/* 2 images: each gets ~45% width */
.tile-float-group--2 img.tile-float-img { max-width: 45%; height: 75%; }

/* 1 image: centered, larger */
.tile-float-group--1 img.tile-float-img { max-width: 65%; height: 78%; }

/* --- Per-tile rotation + size tuning (matching design comp) --- */

/* Bauhaus: 3 images — left tilted back, middle upright, right tilted forward */
.tile-bauhaus .fi-1 { --r: -4deg; max-width: 28% !important; }
.tile-bauhaus .fi-2 { --r: 1deg; }
.tile-bauhaus .fi-3 { --r: 3deg; max-width: 34% !important; }

/* Alice: einkaufswagen tilted left, skulptur tilted right + bigger */
.tile-alice .fi-1 { --r: -3deg; max-width: 38% !important; }
.tile-alice .fi-2 { --r: 4deg; max-width: 48% !important; }

/* Type: Quig upright + larger, G slightly tilted */
.tile-type .fi-1 { --r: 0deg; max-width: 50% !important; }
.tile-type .fi-2 { --r: 2deg; max-width: 38% !important; }

/* idealo: phones tilted slightly */
.tile-idealo .fi-1 { --r: -3deg; }

/* Project tile visual backgrounds — CSS-only mockups */
.tile-bauhaus {
  background:
    linear-gradient(135deg, #ffc0cb33 0%, #4400ff15 50%, #ffc0cb22 100%),
    radial-gradient(circle at 70% 60%, #4400ff12 0%, transparent 50%);
}
.tile-bauhaus::before { background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,192,203,0.3) 100%) !important; }

.tile-alice {
  background:
    linear-gradient(160deg, #2a2a2a15 0%, #4db8ff15 60%, #febe0010 100%),
    radial-gradient(circle at 30% 70%, #4db8ff18 0%, transparent 45%);
}

.tile-type {
  background:
    linear-gradient(145deg, #f5f5f508 0%, #0a0a0a08 100%);
}
.tile-type .title { letter-spacing: -0.03em; }

.tile-idealo {
  background:
    linear-gradient(155deg, #002f5f18 0%, #ff780012 100%),
    radial-gradient(circle at 75% 35%, #ff780015 0%, transparent 40%);
}


/* -----------------------------------------------------------------------------
   8. Project detail page
   -------------------------------------------------------------------------- */

.project-hero {
  position: relative;
  padding: 140px var(--page-padding-x) 80px;
  max-width: var(--container-max);
  margin: 0 auto;
  z-index: 2;
}
.project-hero--listing {
  padding-top: 180px;
  padding-bottom: 40px;
}
.project-hero .meta {
  margin-bottom: 32px;
  justify-content: flex-start;
  gap: 24px;
}
.project-hero h1 {
  font-family: 'Dystopian', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 8vw, 120px);
  letter-spacing: -0.035em;
  line-height: 0.95;
  max-width: 15ch;
}
.project-hero .lead {
  margin-top: 28px;
  max-width: 720px;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.5;
  color: #2a2a2a;
}

.project-body {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px var(--page-padding-x) var(--section-padding-y);
  z-index: 2;
  font-size: 17px;
  line-height: 1.7;
}
.project-body > * { margin-bottom: 1.2em; }
.project-body h2 {
  font-family: 'Dystopian', 'Helvetica Neue', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 2em;
  margin-bottom: 0.5em;
}
.project-body img {
  border-radius: var(--radius-md);
  margin: 32px 0;
}

.project-nav {
  position: relative;
  z-index: 10;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px var(--page-padding-x) 80px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
}
.project-nav a {
  position: relative;
  z-index: 10;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out-soft);
  pointer-events: auto;
}
.project-nav a:hover { transform: translateY(-2px); }


/* Section-inner single-column variant (projects preview on home) */
.section-inner--single { grid-template-columns: 1fr; }

/* Section variant for the /projekte listing page: just provide horizontal
   padding without the huge top/bottom whitespace of a normal section. */
.section--listing {
  padding-top: 0;
  padding-bottom: 0;
}

/* Centered CTA wrapper used below grids */
.cta-center {
  text-align: center;
  margin-top: 48px;
}
.cta-center--spacious { margin: 96px auto 48px; }

/* Contact email highlight */
.contact-email {
  font-size: 24px;
  line-height: 1.4;
}
.contact-email a { font-weight: 700; }

/* Social links row below contact card */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s var(--ease-out-soft), color 0.2s;
}
.social-link:hover {
  transform: translateY(-2px);
  color: var(--orange);
}
.social-link > span { position: relative; z-index: 3; }
.social-link > svg  { position: relative; z-index: 3; flex-shrink: 0; }


/* -----------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */

footer {
  position: relative; z-index: 2;
  padding: 32px var(--page-padding-x);
  font-size: 11px; color: var(--ink);
  letter-spacing: 0.16em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  margin: 48px var(--page-padding-x);
  border-radius: var(--radius-lg);
}
footer > * { position: relative; z-index: 3; }
footer a { text-decoration: none; opacity: 0.85; transition: opacity 0.2s; }
footer a:hover { opacity: 1; }


/* -----------------------------------------------------------------------------
   10. Scroll reveal animations
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out-soft), transform 0.9s var(--ease-out-soft);
  will-change: transform, opacity;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.12s; }
.reveal.delay-2 { transition-delay: 0.24s; }
.reveal.delay-3 { transition-delay: 0.36s; }
.reveal.delay-4 { transition-delay: 0.48s; }

.reveal-slide-left  { transform: translateX(-40px); }
.reveal-slide-left.in  { transform: translateX(0); }
.reveal-slide-right { transform: translateX(40px); }
.reveal-slide-right.in { transform: translateX(0); }
.reveal-scale       { transform: scale(0.92); }
.reveal-scale.in    { transform: scale(1); }

.split .word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.28em;
  margin-bottom: -0.22em;
  line-height: inherit;
}
.split .char {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out-soft);
}
.split.in .char { transform: translateY(0); }

/* Respect user-level motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .blob { animation: none; }
  .scroll-hint { animation: none; }
  .reveal, .split .char { opacity: 1; transform: none; }
}


/* -----------------------------------------------------------------------------
   11. Responsive
   -------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 960px) {
  .section-inner { grid-template-columns: 1fr; gap: 32px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  /* Pull yellow blob upward so it stays in viewport on narrower screens */
  .blob-3 {
    width: 560px; height: 560px;
    bottom: 5%; left: 18%;
    opacity: 0.50;
  }
}

/* Mobile — 3D canvas pinned to TOP half, hero content below. */
@media (max-width: 760px) {
  #canvas-container {
    inset: 0;
    height: 100%;
    /* Full viewport on mobile so scroll animation plays through whole page */
  }
  .hero {
    padding-top: 28vh;
    padding-bottom: 32px;
    justify-content: flex-start;
    min-height: auto;
  }
  .headline { font-size: clamp(52px, 14vw, 90px); }
  nav {
    gap: 12px;
    padding: 10px 16px 10px 10px;
    max-width: calc(100vw - 24px);
  }
  nav ul { gap: 14px; font-size: 13px; }

  /* Fix tile layout on mobile — match desktop proportions */
  .tile {
    /* drop aspect-ratio: in a 1-col grid the tile width is dictated by the
       column; aspect-ratio would force it to balloon past the viewport. */
    aspect-ratio: auto;
    min-height: 320px;
    max-height: none;
    padding: 24px 24px 32px;
  }
  .tile > .tile-inner {
    inset: 24px 24px 32px 24px;
  }
  .tile-float-group {
    /* mirror desktop's top:bottom padding ratio (~3:5) so images sit
       visually centred above the title */
    padding: 32px 24px 80px;
    gap: 8px;
  }
  .tile-float-group img.tile-float-img {
    height: 86%;
  }
  .tile-float-group--3 img.tile-float-img {
    max-width: 30% !important;
    height: 82% !important;
  }
  .tile-float-group--1 img.tile-float-img {
    max-width: 72% !important;
    height: 88% !important;
  }
  .tile .title {
    font-size: clamp(24px, 6.4vw, 32px);
    line-height: 1.05;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    flex-shrink: 0;
  }
  .tile .num {
    font-size: 10px;
    letter-spacing: 0.15em;
  }
  .work-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  footer {
    margin: 24px var(--page-padding-x);
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .blob-4 { display: none; }
  .blob-3 {
    width: 420px; height: 420px;
    bottom: 12%; left: 10%;
    filter: blur(60px) saturate(1.2);
    opacity: 0.45;
  }
}

/* Small phones */
@media (max-width: 420px) {
  .blob-1, .blob-2 { filter: blur(50px); }   /* cheaper blur on low-end */
  .headline { font-size: clamp(44px, 13vw, 68px); }

  /* Reduce backdrop-filter complexity on low-end mobile */
  .glass {
    backdrop-filter: blur(8px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(8px) saturate(180%) brightness(1.05);
  }
}


/* ── tile-preview-wrap: container for full-PNG preview tiles ── */
.tile-preview-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px 48px;
  pointer-events: none;
}

/* ── tile-img-wrap: animated wrapper ── */
.tile-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tile-float-a 4s ease-in-out infinite;
}

/* Override ALL global tile-float-img constraints for preview tiles */
.tile-preview-wrap .tile-img-wrap img,
.tile-preview-wrap img {
  display: block !important;
  max-width: none !important;
  max-height: none !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  animation: none !important;
  transform: none !important;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.13));
}
.tile:hover .tile-preview-wrap .tile-img-wrap:not(.tile-type .tile-img-wrap):not(.tile-alice .tile-img-wrap) {
  transition: transform 0.5s var(--ease-out-soft);
}
.tile:hover .tile-preview-wrap img {
  filter: drop-shadow(0 18px 36px rgba(0,0,0,0.20)) !important;
}

/* ── Type tile: sizing + rotation ── */
.tile-type .tile-preview-wrap { padding: 36px 28px 60px; }
.tile-type .tile-img-wrap { width: 65%; transform: rotate(-3deg); }
.tile-type .tile-img-wrap img { width: 100%; height: 78%; object-fit: contain; }
.tile:hover .tile-type .tile-img-wrap { transform: translateY(-6px) rotate(-3deg); }

/* ── Alice tile: sizing + rotation ── */
.tile-alice .tile-preview-wrap { padding: 36px 28px 60px; }
.tile-alice .tile-img-wrap { width: 65%; transform: rotate(3deg); }
.tile-alice .tile-img-wrap img { width: 100%; height: 78%; object-fit: contain; }
.tile:hover .tile-alice .tile-img-wrap { transform: translateY(-6px) rotate(3deg); }


/* -----------------------------------------------------------------------------
   12. Mobile overrides for tile-preview-wrap (must come AFTER the !important
       base rules above to win the cascade)
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  /* Preview-wrap tiles: constrain images that the base rules force to none */
  .tile-preview-wrap {
    padding: 32px 24px 80px !important;
  }
  .tile-preview-wrap .tile-img-wrap {
    width: 72% !important;
  }
  .tile-preview-wrap .tile-img-wrap img,
  .tile-preview-wrap img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .tile-type .tile-preview-wrap {
    padding: 32px 24px 80px !important;
  }
  .tile-type .tile-img-wrap {
    width: 72% !important;
    transform: rotate(-3deg) !important;
  }
  .tile-alice .tile-preview-wrap {
    padding: 32px 24px 80px !important;
  }
  .tile-alice .tile-img-wrap {
    width: 72% !important;
    transform: rotate(3deg) !important;
  }

  /* project-nav: ensure links are above 3D canvas */
  .project-nav {
    position: relative;
    z-index: 10;
  }
  .project-nav a {
    position: relative;
    z-index: 10;
  }
}
/* ── Über mich: Cards Layout ── */
.about-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto 60px;
  padding: 0 var(--page-padding-x);
  position: relative;
  z-index: 2;
}

.about-card {
  padding: 32px 36px;
  max-width: none !important; /* override .card max-width: 520px */
  width: 100%;
  box-sizing: border-box;
}

.about-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 20px;
  position: relative;
  z-index: 3;
}

.about-table {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  z-index: 3;
}

.about-table tr + tr td {
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.about-table td {
  vertical-align: top;
  font-size: 0.92rem;
  line-height: 1.5;
  padding-bottom: 4px;
}

.about-table-year {
  width: 140px;
  min-width: 140px;
  font-size: 0.78rem;
  color: var(--muted, #888);
  padding-right: 20px;
  white-space: nowrap;
}

.about-table-sub {
  font-size: 0.82rem;
  opacity: 0.6;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s var(--ease-out-soft), color 0.2s;
  cursor: default;
}
.tool-pill:hover {
  transform: translateY(-2px);
  color: var(--orange);
}
.tool-pill > img,
.tool-pill > span {
  position: relative;
  z-index: 3;
}
.tool-pill > img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

/* Section label outside of card — unused now, kept for safety */
.about-section-label { display: none; }

/* Tool group styles — unused now */
.tool-group, .tool-pill-parent, .tool-group-children { display: contents; }

/* Tool grid inside the card */
.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 3;
}

/* Hover animation on about-cards — same as .tile */
.about-card {
  transition: transform 0.5s var(--ease-out-soft), box-shadow 0.5s;
}
.about-card:hover {
  transform: translateY(-6px);
}


/* -----------------------------------------------------------------------------
   13. Liquid Glass hover — Apple-style magnify / lens effect
   Applies to all .glass tiles and cards across the site.
   On hover the element gently scales up (like a loupe) while the glass
   material brightens and refracts more — mimicking the "looking through
   glass" feel of Apple's Liquid Glass.
   -------------------------------------------------------------------------- */

/* ── Base: make every interactive glass element transition-ready ── */
.tile.glass,
.card.glass,
.about-card.glass,
.tool-pill.glass,
.social-link.glass,
.section-label.glass,
.scroll-hint.glass,
.project-nav a.glass {
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 0.45s ease,
    -webkit-backdrop-filter 0.45s ease;
  will-change: transform;
}

/* ── Hover: magnify + enhanced glass ── */
.tile.glass:hover {
  transform: scale(1.035) translateY(-4px);
  box-shadow:
    0 24px 64px rgba(15,15,20,0.13),
    0 6px 20px rgba(15,15,20,0.06),
    inset 0 1.5px 0.5px rgba(255,255,255,1),
    inset 0 -1px 0 rgba(255,255,255,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.30);
  backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
  -webkit-backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
}

.card.glass:hover,
.about-card.glass:hover {
  transform: scale(1.025) translateY(-4px);
  box-shadow:
    0 24px 64px rgba(15,15,20,0.13),
    0 6px 20px rgba(15,15,20,0.06),
    inset 0 1.5px 0.5px rgba(255,255,255,1),
    inset 0 -1px 0 rgba(255,255,255,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.30);
  backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
  -webkit-backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
}

.tool-pill.glass:hover,
.social-link.glass:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow:
    0 12px 32px rgba(15,15,20,0.10),
    0 3px 10px rgba(15,15,20,0.04),
    inset 0 1.5px 0.5px rgba(255,255,255,1),
    inset 0 -1px 0 rgba(255,255,255,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.30);
  backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
  -webkit-backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
}

.section-label.glass:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow:
    0 12px 32px rgba(15,15,20,0.10),
    0 3px 10px rgba(15,15,20,0.04),
    inset 0 1.5px 0.5px rgba(255,255,255,1),
    inset 0 -1px 0 rgba(255,255,255,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.30);
  backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
  -webkit-backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
}

.project-nav a.glass:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow:
    0 12px 32px rgba(15,15,20,0.10),
    0 3px 10px rgba(15,15,20,0.04),
    inset 0 1.5px 0.5px rgba(255,255,255,1),
    inset 0 -1px 0 rgba(255,255,255,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.30);
  backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
  -webkit-backdrop-filter: blur(14px) saturate(260%) brightness(1.16);
}

/* ── Enhanced conic border glow on hover ── */
.tile.glass:hover::after,
.card.glass:hover::after,
.about-card.glass:hover::after,
.tool-pill.glass:hover::after,
.social-link.glass:hover::after,
.section-label.glass:hover::after,
.project-nav a.glass:hover::after {
  padding: 2px;
  opacity: 1;
  background: conic-gradient(from 130deg at 50% 50%,
    rgba(255,160,210,1)   0deg,
    rgba(255,220,240,0.75)  50deg,
    rgba(200,220,255,0.95) 110deg,
    rgba(255,255,255,1) 170deg,
    rgba(220,200,255,1) 230deg,
    rgba(255,210,170,0.95) 290deg,
    rgba(255,160,210,1) 360deg);
}

/* ── Overlay shimmer on hover (::before gets brighter) ── */
.tile.glass:hover::before,
.card.glass:hover::before,
.about-card.glass:hover::before,
.tool-pill.glass:hover::before,
.social-link.glass:hover::before,
.section-label.glass:hover::before,
.project-nav a.glass:hover::before {
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.95) 0%,
      rgba(255,255,255,0.35) 30%,
      rgba(255,255,255,0.00) 55%),
    radial-gradient(140% 60% at 50% 0%,
      rgba(255,255,255,0.70) 0%,
      rgba(255,255,255,0.00) 55%);
}

/* Nav and footer don't need hover protection — none of the liquid-glass
   hover selectors target them (they only target .tile.glass, .card.glass etc.) */

/* ── Disable magnify hover on mobile (touch) ── */
@media (hover: none) {
  .tile.glass:hover,
  .card.glass:hover,
  .about-card.glass:hover,
  .tool-pill.glass:hover,
  .social-link.glass:hover,
  .section-label.glass:hover,
  .project-nav a.glass:hover {
    transform: none;
    box-shadow: var(--glass-shadow);
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
  }
}

@media (max-width: 600px) {
  .about-card {
    padding: 24px 20px;
  }
  .about-table-year {
    width: 110px;
    min-width: 110px;
  }
  .tool-group-children {
    padding-left: 16px;
  }
}
