/* ============================================
   niehu.es — Editorial Mono Light
   ============================================ */

/* ─── Local Fonts ─── */

/* Manrope (variable, 400–800) */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Outfit (variable, 300–500) */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('assets/fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('assets/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono (variable, 400–500) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --bg-page: #FAFAF6;
  --bg-card: #FFFFFF;
  --text-primary: #1a1a18;
  --text-secondary: rgba(0, 0, 0, 0.45);
  --text-tertiary: rgba(0, 0, 0, 0.25);
  --accent: #3B5168;
  --accent-soft: rgba(59, 81, 104, 0.08);
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.18);
  --dot-eigen: #3B5168;
  --dot-kunde: #5B8A72;
  --dot-content: #B5623A;
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.8;
  font-size: 16px;
  position: relative;
}

/* Subtle paper grain texture via SVG noise */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

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

/* ─── Layout ─── */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Nav ─── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.07);
  background: rgba(250, 250, 246, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  transition: color 0.3s var(--ease-out-soft);
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

.nav-links a {
  color: var(--text-secondary);
  transition: color 0.3s var(--ease-out-soft);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ─── Hero ─── */

.hero {
  padding: 56px 0 44px;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.hero-intro {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.hero-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 4px;
  border: 2px solid var(--border);
  transition: border-color 0.4s var(--ease-out-soft), box-shadow 0.4s var(--ease-out-soft);
}

.hero-avatar:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 480px;
}

.hero-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: rgba(0, 0, 0, 0.35);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s var(--ease-out-expo);
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ─── Section ─── */

.section-divider {
  border: none;
  border-top: 0.5px solid rgba(0, 0, 0, 0.07);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-tertiary);
  padding: 36px 0 20px;
}

/* ─── Legend ─── */

.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.35);
  margin: 0;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Category Colors ─── */

.dot-eigen { background: var(--dot-eigen); }
.dot-kunde { background: var(--dot-kunde); }
.dot-content { background: var(--dot-content); }

/* ─── Project Cards ─── */

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 36px;
}

.project-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 22px 20px;
  cursor: pointer;
  transition:
    border-color 0.3s var(--ease-out-soft),
    transform 0.4s var(--ease-out-expo),
    box-shadow 0.4s var(--ease-out-expo);
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
}

.project-card:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.06);
}

.project-card:hover .pc-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: var(--accent);
}

.project-card:hover .pc-dot {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.pc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pc-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: box-shadow 0.3s var(--ease-out-soft);
}

.pc-arrow {
  font-size: 14px;
  color: var(--text-tertiary);
  opacity: 0;
  transition: all 0.3s var(--ease-out-expo);
  flex-shrink: 0;
}

.pc-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.pc-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.pc-type {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(0, 0, 0, 0.3);
  margin-top: 12px;
  letter-spacing: 0.3px;
}

/* ─── Footer ─── */

.footer {
  padding: 32px 0;
  border-top: 0.5px solid rgba(0, 0, 0, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-email {
  color: var(--accent);
  font-weight: 500;
  transition: color 0.3s var(--ease-out-soft);
  position: relative;
}

.footer-email::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.footer-email:hover {
  color: var(--text-primary);
}

.footer-email:hover::after {
  width: 100%;
}

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

.footer-links a {
  color: var(--text-tertiary);
  transition: color 0.3s var(--ease-out-soft);
}

.footer-links a:hover {
  color: var(--text-secondary);
}

/* ─── Project Detail Page ─── */

.project-header {
  padding: 56px 0 32px;
}

.project-type-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-type-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.project-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.project-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.project-body {
  padding-top: 32px;
  padding-bottom: 36px;
}

.project-body p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.project-body p:last-child {
  margin-bottom: 0;
}

/* ─── Detail Cards ─── */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 36px 0;
}

.detail-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  transition: border-color 0.3s var(--ease-out-soft);
}

.detail-card:hover {
  border-color: var(--border-hover);
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.detail-value {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── Tech Tags ─── */

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 20px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  transition: border-color 0.3s var(--ease-out-soft), color 0.3s var(--ease-out-soft);
}

.tech-tag:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ─── Project Link ─── */

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  transition: gap 0.3s var(--ease-out-expo), opacity 0.2s;
  margin-bottom: 48px;
}

.project-link:hover {
  gap: 10px;
  opacity: 0.85;
}

/* ─── Back Link ─── */

.back-link {
  transition: gap 0.3s var(--ease-out-expo), color 0.3s var(--ease-out-soft);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.back-link:hover {
  gap: 8px;
  color: var(--text-primary);
}

/* ─── Legal Pages ─── */

.legal-content {
  padding: 48px 0 64px;
}

.legal-content h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 32px;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-content ul {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
  padding-left: 20px;
}

.legal-content a {
  color: var(--accent);
  transition: opacity 0.2s;
}

.legal-content a:hover {
  opacity: 0.7;
}

/* ─── Page Load Animation ─── */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-tag {
  animation: slideIn 0.6s var(--ease-out-expo) 0.1s both;
}

.hero-avatar {
  animation: fadeIn 0.7s var(--ease-out-expo) 0.2s both;
}

.hero-h1 {
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.25s both;
}

.hero-desc {
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.35s both;
}

.hero-social {
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.45s both;
}

.section-label {
  animation: fadeIn 0.5s var(--ease-out-expo) 0.5s both;
}

.legend {
  animation: fadeIn 0.5s var(--ease-out-expo) 0.55s both;
}

/* Project detail page stagger */
.project-type-label {
  animation: slideIn 0.6s var(--ease-out-expo) 0.1s both;
}

.project-title {
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.2s both;
}

.project-subtitle {
  animation: fadeInUp 0.6s var(--ease-out-expo) 0.3s both;
}

/* ─── Scroll Reveal ─── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

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

/* ─── Selection Color ─── */

::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* ─── Responsive ─── */

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

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

  .hero-h1 {
    font-size: 28px;
  }

  .hero-intro {
    flex-direction: column;
    gap: 16px;
  }

  .hero-avatar {
    width: 64px;
    height: 64px;
  }

  .project-title {
    font-size: 26px;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .nav {
    padding: 14px 0;
  }
}

/* Reduced motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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