:root {
  --bg-color: #121212;
  --text-main: #f5f5f5;
  --text-muted: #888888;
  --accent: #ff0000; /* Pure Red */
  --line-color: rgba(255, 255, 255, 0.08);
  
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-serif: 'Instrument Serif', serif;
}

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

html, body {
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  background: transparent;
}

/* Lenis Smooth Scroll Base Styles */
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

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

a, button {
  text-decoration: none;
  color: inherit;
  cursor: none;
}

/* Base Backgrounds */
.base-bg {
  position: fixed;
  inset: 0;
  background-color: var(--bg-color);
  z-index: -3;
}

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

/* Aurora Glow */
.aurora-container {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.aurora-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.15;
  animation: floatAurora 25s infinite alternate ease-in-out;
}

.glow-1 {
  width: 70vw;
  height: 60vh;
  background: var(--accent);
  top: -30%;
  left: 0;
}

.glow-2 {
  width: 60vw;
  height: 60vh;
  background: #8a0000; /* Deep Dark Red */
  bottom: -30%;
  right: -10%;
  animation-delay: -10s;
}

@keyframes floatAurora {
  0% { transform: translate(0, 0) scale(1); opacity: 0.1; }
  100% { transform: translate(-10vw, 15vh) scale(1.2); opacity: 0.25; }
}

/* Background Typography */
.bg-typography {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.02; /* Noch transparenter (vorher 0.03) */
  user-select: none;
}

.bg-text-track {
  display: flex;
  width: max-content;
}

.bg-text-content {
  display: flex;
}

.bg-text-content span {
  font-family: var(--font-sans); /* Moderne Sans-Serif statt Serif */
  font-size: clamp(6rem, 12vw, 18rem);
  font-weight: 800; /* Sehr fett für starken Kontrast als Outline */
  font-style: normal;
  text-transform: uppercase;
  padding-right: 4rem;
  color: transparent; /* Text ist unsichtbar */
  -webkit-text-stroke: 3px var(--text-main); /* Nur eine hauchdünne Umrandung (Outline) */
  white-space: nowrap;
}

.track-1 { animation: scrollBgRight 80s linear infinite reverse; }
.track-2 { animation: scrollBgLeft 90s linear infinite; }
.track-3 { animation: scrollBgRight 70s linear infinite reverse; }

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

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

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s;
}

.custom-cursor.hover {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 107, 53, 0.2);
  border: 1px solid var(--accent);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header (JH + Centered Pill + Available) */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 0;
  z-index: 100;
}

.nav-container-flex {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo & Social Dropdown */
.logo-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.logo-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  width: 150px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-style: italic;
  line-height: 1;
}

.logo-arrow {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s;
}

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

.logo-wrapper.open .logo-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

.social-dropdown {
  position: absolute;
  top: 100%;
  left: 3.5rem; /* Adjusted to align perfectly under the chevron */
  display: flex;
  flex-direction: column;
  align-items: center; /* Center line and icon */
  gap: 1rem;
  padding-top: 1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}

.logo-wrapper.open .social-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.vertical-line {
  width: 1px;
  height: 30px;
  background-color: var(--line-color);
}

.social-dropdown-link {
  background: transparent;
  padding: 0.5rem;
  color: var(--text-muted);
  transition: color 0.3s, transform 0.3s;
  display: flex;
  justify-content: center;
}

.social-dropdown-link i {
  font-size: 20px;
}

.social-dropdown-link:hover {
  color: var(--accent);
  transform: scale(1.2);
}

.nav-pill {
  background: rgba(18, 18, 18, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line-color);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--text-main);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-left: 1.5rem;
  border-left: 1px solid var(--line-color);
}

.lang-btn {
  cursor: none;
  transition: color 0.3s;
  pointer-events: auto;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  color: var(--accent);
}

.lang-divider {
  opacity: 0.3;
}

.availability {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 150px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 107, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

/* Ultra-Minimalist Hero */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden; /* Contains the bg-typography */
}

.hero-center {
  position: relative;
  z-index: 1; /* Ensures text is above bg-typography */
  text-align: center;
}

.hero-massive {
  font-size: clamp(6rem, 15vw, 15rem);
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -2px;
  text-transform: uppercase;
}

.accent-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero-bottom {
  position: absolute;
  bottom: 2rem;
  left: 4rem;
  right: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 1; /* Ensures text is above bg-typography */
  line-height: 1.6;
}

/* Section Shared */
.section-header {
  margin-bottom: 4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-color);
}

.section-header h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Journey Section */
#journey {
  padding: 5rem 0;
}

.journey-list {
  display: flex;
  flex-direction: column;
}

.journey-item {
  border-bottom: 1px solid var(--line-color);
  padding: 2.5rem 0;
  cursor: crosshair;
  transition: all 0.4s;
}

.journey-item:hover {
  border-color: var(--accent);
}

.journey-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  transition: color 0.4s;
}

.journey-year {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.journey-role {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-style: italic;
  font-weight: 500;
  transition: color 0.4s;
}

.journey-item:hover .journey-role {
  color: var(--accent);
}

.journey-company {
  text-align: right;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.journey-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s, margin-top 0.4s;
  color: var(--text-muted);
  line-height: 1.6;
}

.journey-item:hover .journey-body {
  max-height: 150px;
  opacity: 1;
  margin-top: 1.5rem;
}

/* Tech Stack Section */
#tech {
  padding: 5rem 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line-color);
  border: 1px solid var(--line-color);
}

.tech-item {
  background: var(--bg-color);
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  transition: all 0.3s;
  cursor: crosshair;
}

.tech-item i {
  font-size: 38px; /* Devicons use font-size for scaling */
  transition: transform 0.3s, color 0.3s;
}

.tech-item span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.tech-item:hover {
  background: rgba(255, 0, 0, 0.03); /* Subtle red tint */
  color: var(--accent);
  transform: scale(1.05);
  z-index: 2;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-radius: 8px;
}

.tech-item:hover i {
  transform: translateY(-5px);
}

/* Work (Data Table Layout) */
.work {
  padding: 5rem 0;
}

.table-list {
  display: flex;
  flex-direction: column;
}

.table-row {
  display: grid;
  grid-template-columns: 0.5fr 3fr 2fr 1fr;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line-color);
  align-items: center;
}

.table-head {
  padding: 1rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-row {
  font-size: 1.2rem;
  font-weight: 500;
  transition: background 0.3s, padding-left 0.3s;
}

.project-row:hover {
  background: rgba(255, 255, 255, 0.02);
  padding-left: 1rem;
}

.col-num { color: var(--text-muted); font-family: var(--font-serif); }
.col-name { color: var(--text-main); font-size: 1.5rem; }
.col-cat { color: var(--text-muted); font-size: 1rem; }
.col-year { color: var(--text-muted); text-align: right; }

.project-row:hover .col-name {
  color: var(--accent);
}

/* Hover Image Preview */
.project-preview-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 180px;
  background: #1c1c1c;
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.project-preview-img.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.preview-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--accent);
  font-style: italic;
}

/* Premium Footer */
.footer {
  padding: 8rem 0 0 0;
  overflow: hidden;
  position: relative;
}

.footer-premium-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6rem;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.footer-title {
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.local-time-widget {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.time-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.time-display {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.social-links-new {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
}

.social-link {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color 0.3s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-link i, .social-link svg {
  width: 24px;
  height: 24px;
  display: block;
}

.social-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.social-link:hover {
  color: var(--accent);
}

.social-link:hover::after {
  width: 100%;
}

/* Clean Contact Link */
.footer-action-clean {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo {
  font-family: 'Alex Brush', cursive;
  font-size: 2.2rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  width: 150px;
  line-height: 1;
  color: var(--text-main);
  text-decoration: none;
}

.footer-email-link {
  font-size: clamp(2rem, 3vw, 3rem);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-main);
  transition: color 0.3s;
}

.footer-email-link:hover {
  color: var(--accent);
}

.footer-email-link i {
  width: 40px;
  height: 40px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-email-link:hover i {
  transform: translate(10px, -10px);
}

@media (min-width: 769px) {
  .footer-action-clean {
    align-items: flex-end;
  }
}

/* Infinite Marquee */
.marquee-container {
  width: 100vw;
  padding: 1.5rem 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--line-color);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 80s linear infinite;
}

.marquee-content {
  display: flex;
}

.marquee-content span {
  font-size: 1.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
  padding: 0 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
}

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

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Split-Text Reveal */
.split-line {
  overflow: hidden; /* This acts as the mask */
  display: block;
  line-height: 1.1;
}

.split-word {
  display: inline-block;
  transform: translateY(120%);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.split-text.visible .split-word {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .nav-container-flex { padding: 0 2rem; }
  .logo, .availability { width: auto; }
  .nav-pill { display: none; } /* Hide on mobile to save space */
  .hero-bottom { left: 2rem; right: 2rem; }
  .table-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .table-head { display: none; }
  .col-num { display: none; }
  .col-year { text-align: left; }
  .footer-premium-grid { flex-direction: column; text-align: left; gap: 4rem; align-items: flex-start; }
  .social-links-new { justify-content: flex-start; }
  .project-preview-img { display: none; }
}
