/* Catppuccin Mocha palette */
:root {
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --text: #cdd6f4;
  --subtext1: #bac2de;
  --subtext0: #a6adc8;
  --surface1: #45475a;
  --surface0: #313244;
  --mauve: #cba6f7;
  --pink: #f5c2e7;
  --blue: #89b4fa;
  --lavender: #b4befe;
  --teal: #94e2d5;
  --red: #f38ba8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: var(--crust);
  color: var(--text);
  line-height: 1.6;
  position: relative;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--lavender);
}

/* Monospace micro-labels ("// 01 — Section") */
.tag-mono {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

/* Ambient background glows */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: var(--mauve);
}

.glow-2 {
  width: 380px;
  height: 380px;
  top: 30%;
  right: -120px;
  background: var(--blue);
  animation-delay: -6s;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(30px, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--mauve), var(--blue));
  color: var(--crust);
}

.btn-primary:hover {
  color: var(--crust);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(203, 166, 247, 0.3);
}

.btn-ghost {
  border: 1px solid var(--surface1);
  color: var(--text);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--mauve);
  transform: translateY(-2px);
}

/* Hero / header */
.hero {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-bottom: 1px solid var(--surface0);
}

.hero-bg {
  position: absolute;
  top: -12%;
  left: -5%;
  width: 110%;
  height: 135%;
  z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(17, 17, 27, 0.6) 0%, rgba(17, 17, 27, 0.88) 60%, var(--crust) 100%),
    url("../assets/munich-hero.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform;
}

nav {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--subtext1);
  font-weight: 500;
  font-size: 0.95rem;
}

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

.lang-switch {
  display: flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--surface0);
  border: 1px solid var(--surface1);
}

.lang-btn {
  padding: 0.3rem 0.7rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--subtext0);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

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

.lang-btn.active {
  background: linear-gradient(90deg, var(--mauve), var(--blue));
  color: var(--crust);
}

/* Login button + modal */
.btn-login {
  padding: 0.4rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--surface1);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.btn-login:hover {
  border-color: var(--mauve);
  transform: translateY(-1px);
}

.btn-login.logged-in {
  background: linear-gradient(90deg, var(--mauve), var(--blue));
  color: var(--crust);
  border-color: transparent;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 27, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.5rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 2rem;
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal h2 {
  margin: 0 0 1.25rem;
  color: var(--mauve);
  font-size: 1.3rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: transparent;
  color: var(--subtext0);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text);
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#login-form input {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--surface1);
  background: var(--base);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

#login-form input:focus {
  outline: none;
  border-color: var(--mauve);
}

.login-error {
  margin-top: 1rem;
  color: var(--red);
  font-size: 0.9rem;
}

.login-error.hidden {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4rem;
  text-align: center;
  will-change: transform, opacity;
}

.avatar {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface1);
  box-shadow: 0 16px 40px rgba(203, 166, 247, 0.3);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--mauve), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  max-width: 560px;
  margin: 0 auto 2rem;
  color: var(--subtext1);
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.stat-row {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--surface0);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--subtext0);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Main content */
main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

section {
  margin-bottom: 2rem;
  padding: 2.25rem;
  background: rgba(24, 24, 37, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface0);
  border-radius: 16px;
}

section h2 {
  margin: 0 0 1rem;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

section > p {
  color: var(--subtext1);
}

.contact-section {
  text-align: center;
  background: linear-gradient(160deg, rgba(203, 166, 247, 0.08), rgba(137, 180, 250, 0.08)), rgba(24, 24, 37, 0.75);
}

.contact-section .contact-row {
  justify-content: center;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 1.1rem;
  padding-bottom: 1.75rem;
  border-left: 2px solid var(--surface0);
  margin-left: 20px;
  padding-left: 1.75rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-icon {
  position: absolute;
  left: -22px;
  top: -2px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  font-size: 1.1rem;
}

.timeline-current .timeline-icon {
  background: linear-gradient(135deg, var(--mauve), var(--blue));
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(203, 166, 247, 0.15);
}

.timeline-body {
  position: relative;
  flex: 1;
  padding: 1.1rem 1.25rem;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.timeline-item:hover .timeline-body {
  transform: translateX(4px);
  border-color: var(--mauve);
}

.timeline-current .timeline-body {
  border-color: var(--mauve);
  box-shadow: 0 12px 28px rgba(203, 166, 247, 0.12);
}

.timeline-index {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--surface1);
  letter-spacing: 0.05em;
}

.timeline-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mauve), var(--blue));
  color: var(--crust);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-period {
  display: block;
  margin-bottom: 0.3rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 500;
}

.timeline-body h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  padding-right: 3rem;
}

.timeline-company {
  margin: 0 0 0.5rem;
  color: var(--subtext0);
  font-size: 0.9rem;
}

.timeline-body > p:not(.timeline-company) {
  margin: 0;
  color: var(--subtext1);
  font-size: 0.95rem;
}

/* Skills */
.skills-group-title {
  margin: 1.5rem 0 0.75rem;
  color: var(--subtext0);
  font-size: 0.95rem;
  font-weight: 600;
}

.skills-group-title:first-of-type {
  margin-top: 0.5rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag {
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  background: var(--surface0);
  border: 1px solid var(--surface1);
  color: var(--lavender);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.tag:hover {
  border-color: var(--mauve);
  transform: translateY(-2px);
}

/* Contact */
.contact-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--surface1);
  font-size: 0.9rem;
  border-top: 1px solid var(--surface0);
}

.credit {
  margin-top: 0.4rem;
  font-size: 0.78rem;
}

.credit a {
  color: var(--surface1);
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* Scroll fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

  .nav-right {
    gap: 0.75rem;
  }

  .timeline-item {
    margin-left: 12px;
  }

  .timeline-index {
    display: none;
  }

  .timeline-body h3 {
    padding-right: 0;
  }

  .stat-row {
    gap: 1.5rem;
  }
}
