:root {
  --bg: #0a0b0d;
  --bg-elevated: #10121a;
  --bg-card: #161921;
  --text: #e8e6e1;
  --text-muted: #8a8780;
  --text-dim: #5a5854;
  --accent: #5b9cf5;
  --accent-dim: #3a6dbf;
  --accent-glow: rgba(91, 156, 245, 0.08);
  --green: #7ec47e;
  --orange: #e8a84a;
  --border: #1e2128;
  --border-light: #1a1c22;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.2rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(10,11,13,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.nav-logo {
  font-family: 'DM Mono', monospace;
  font-weight: 400; font-size: 0.82rem;
  letter-spacing: 0.06em; color: var(--text-dim);
}
.nav-logo .brand { color: var(--accent); font-weight: 500; font-size: 1rem; }

.nav-right { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.85rem; font-weight: 400;
  letter-spacing: 0.04em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.lang-switch {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--border); padding: 0.3rem 0.7rem;
  background: transparent; border-radius: 2px;
  transition: all 0.2s;
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent-dim); }
.lang-switch a {
  color: var(--text-dim);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; font-weight: 400;
  letter-spacing: 0.08em; text-decoration: none;
  transition: color 0.2s;
}
.lang-switch a:hover { color: var(--text); }
.lang-active {
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em;
}
.lang-sep { color: var(--text-dim); font-size: 0.75rem; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem 2.5rem 4rem;
  max-width: 1100px; margin: 0 auto;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute; top: 15%; right: -8%;
  width: 500px; height: 500px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.15em;
  color: var(--accent-dim); text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 0.6s 0.2s forwards;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500; font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.2; color: var(--text);
  margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 0.6s 0.35s forwards;
}
.hero h1 .thin { font-weight: 300; color: var(--text-muted); }

.hero-sub {
  font-size: 1.1rem; color: var(--text-muted);
  max-width: 600px; line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0; animation: fadeUp 0.6s 0.5s forwards;
}

.hero-meta {
  display: flex; gap: 2.5rem; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.6s 0.65s forwards;
}
.hero-meta-item {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem; color: var(--text-dim);
  letter-spacing: 0.04em;
}
.hero-meta-item span { color: var(--text-muted); font-weight: 500; }

/* ── HERO SVG BACKGROUND ── */
.hero-bg-svg {
  position: absolute;
  top: 50%; right: -2%;
  transform: translateY(-50%);
  width: 420px; height: 420px;
  pointer-events: none;
  opacity: 0; animation: fadeIn 1.5s 0.4s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
.hero-label, .hero h1, .hero-sub, .hero-meta { transform: translateY(20px); }

/* ── SECTIONS ── */
section { padding: 6rem 2.5rem; max-width: 1100px; margin: 0 auto; }

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.15em;
  color: var(--accent-dim); text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.3; margin-bottom: 1.2rem;
}

.section-intro {
  color: var(--text-muted); font-size: 1rem;
  max-width: 700px; margin-bottom: 3rem; line-height: 1.8;
}

/* ── SERVICES ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem 1.8rem;
  border-radius: 3px;
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.service-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.service-card:hover::before { opacity: 1; }

.service-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; color: var(--accent-dim);
  letter-spacing: 0.1em; margin-bottom: 1rem;
}

.service-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500; font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

.service-card p {
  color: var(--text-muted); font-size: 0.9rem;
  line-height: 1.7;
}

.service-tags {
  margin-top: 1.2rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* ── EXPERIENCE TIMELINE ── */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.timeline-item {
  text-align: center;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-card);
}

.timeline-num {
  font-family: 'Fraunces', serif;
  font-weight: 700; font-size: 2.2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.timeline-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── SECTORS ── */
.sectors-wrapper { margin-top: 3rem; }

.sectors {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.5rem;
}

.sector-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

/* ── TECH STACK ── */
.stack-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6rem 2.5rem;
  margin: 0;
  max-width: none;
}
.stack-inner { max-width: 1100px; margin: 0 auto; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}

.stack-group h4 {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.stack-group ul {
  list-style: none;
}

.stack-group li {
  color: var(--text-muted); font-size: 0.88rem;
  padding: 0.3rem 0;
  position: relative;
  padding-left: 1rem;
}
.stack-group li::before {
  content: '›';
  position: absolute; left: 0;
  color: var(--accent-dim);
  font-weight: 500;
}

/* ── OPEN SOURCE ── */
.oss-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  padding: 2rem 2.2rem;
  border-radius: 3px;
  max-width: 700px;
}

.oss-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500; font-size: 1.15rem;
  margin-bottom: 0.8rem;
}
.oss-card h3 a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.oss-card h3 a:hover { color: var(--text); }

.oss-card p {
  color: var(--text-muted); font-size: 0.92rem;
  line-height: 1.7;
}

/* ── CONTACT ── */
.contact-section {
  border-top: 1px solid var(--border);
  padding-top: 5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-item {
  margin-bottom: 1.5rem;
}

.contact-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--text-dim); text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.contact-value {
  font-size: 0.95rem; color: var(--text-muted);
}
.contact-value a {
  color: var(--accent); text-decoration: none;
  transition: color 0.2s;
}
.contact-value a:hover { color: var(--text); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: var(--text-dim);
  max-width: 1100px; margin: 0 auto;
}
footer a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--text-muted); }

.footer-brand { color: var(--accent); font-weight: 500; }
.footer-links { display: flex; gap: 1.5rem; }
.site-version {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ── FADE IN ── */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s, transform 0.7s;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── IMPRESSUM OVERLAY ── */
.impressum-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,11,13,0.92);
  backdrop-filter: blur(10px);
  justify-content: center; align-items: center;
  padding: 2rem;
}
.impressum-overlay.active { display: flex; }

.impressum-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3rem;
  max-width: 600px; width: 100%;
  border-radius: 3px;
  max-height: 80vh; overflow-y: auto;
  position: relative;
}

.impressum-close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: none;
  color: var(--text-dim); font-size: 1.5rem;
  cursor: pointer; transition: color 0.2s;
}
.impressum-close:hover { color: var(--text); }

.impressum-content h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500; font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.impressum-content p, .impressum-content li {
  color: var(--text-muted); font-size: 0.88rem;
  line-height: 1.7; margin-bottom: 0.8rem;
}

.impressum-content h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500; font-size: 1.1rem;
  margin-top: 1.5rem; margin-bottom: 0.8rem;
}

.impressum-content h4 {
  font-size: 0.92rem; font-weight: 500;
  margin-top: 1rem; margin-bottom: 0.4rem;
}

.impressum-legal {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--text-dim); text-transform: uppercase;
}

.impressum-source {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.impressum-source a { color: var(--text-dim); }
.impressum-source a:hover { color: var(--text-muted); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .hero { padding: 7rem 1.5rem 3rem; }
  section { padding: 4rem 1.5rem; }
  .stack-section { padding: 4rem 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-bg-svg { display: none; }
  .hero-meta { gap: 1.5rem; }
  footer { flex-direction: column; gap: 0.8rem; text-align: center; }
}
