/* ─── Variables ─────────────────────────────────────────── */
:root {
  --color-bg:       #f7f7f5;
  --color-text:     #1a1a1a;
  --color-muted:    #666;
  --color-accent:   #4a6fa5;
  --color-border:   #e0e0d8;
  --font:           system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-width:      680px;
  --space:          1.5rem;
}

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

/* ─── Base ───────────────────────────────────────────────── */
html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  line-height: 1.7;
  padding: 0 var(--space);
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  opacity: 0.75;
}

/* ─── Layout ─────────────────────────────────────────────── */
.site-nav, main, footer {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ─── Navigation ─────────────────────────────────────────── */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space) 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: calc(var(--space) * 2);
}

.nav-name {
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

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

.nav-links a {
  color: var(--color-muted);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-accent);
}

/* ─── Typography ─────────────────────────────────────────── */
h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space);
}

h2 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

p {
  margin-bottom: var(--space);
}

/* ─── Article content ────────────────────────────────────── */
article > header {
  margin-bottom: calc(var(--space) * 1.5);
}

article > header h1 {
  margin-bottom: 0.35rem;
}

article time {
  display: block;
  color: var(--color-muted);
  font-size: 0.9rem;
}

article .content > * + * {
  margin-top: var(--space);
}

/* ─── Home ───────────────────────────────────────────────── */
.home-intro {
  margin-bottom: calc(var(--space) * 2);
  font-size: 1.05rem;
}

.home-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.home-nav a {
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

.home-nav a:hover {
  color: var(--color-accent);
  opacity: 1;
}

/* ─── Project list ───────────────────────────────────────── */
.project-list {
  list-style: none;
}

.project-list li {
  padding: var(--space) 0;
  border-bottom: 1px solid var(--color-border);
}

.project-list li:first-child {
  border-top: 1px solid var(--color-border);
}

.project-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.project-header h2 {
  margin-bottom: 0;
}

.project-header h2 a {
  text-decoration: none;
  color: var(--color-text);
}

.project-header h2 a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.project-status {
  font-size: 0.78rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-list p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ─── Post list ──────────────────────────────────────────── */
.post-list {
  list-style: none;
}

.post-list li {
  padding: var(--space) 0;
  border-bottom: 1px solid var(--color-border);
}

.post-list li:first-child {
  border-top: 1px solid var(--color-border);
}

.post-list a {
  display: block;
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.post-list a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.post-list time {
  display: block;
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.post-list p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}

/* ─── Social Icons ───────────────────────────────────────── */
.social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.social-icons a:hover {
  color: var(--color-accent);
  opacity: 1;
}

/* Nav social — separated from links by a subtle divider */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-social {
  padding-left: 1rem;
  border-left: 1px solid var(--color-border);
}

/* Footer social — centered row above the bottom line */
.footer-top {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.footer-social a {
  color: var(--color-muted);
}

.footer-social a:hover {
  color: var(--color-accent);
  opacity: 1;
}

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 0;
}

/* ─── About Page ─────────────────────────────────────────── */
.about-intro {
  font-size: 1rem;
  margin-bottom: calc(var(--space) * 2);
  color: var(--color-text);
}

.about-cv {
  display: flex;
  flex-direction: column;
}

.about-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  column-gap: 2.5rem;
  padding: calc(var(--space) * 1.25) 0;
  border-top: 1px solid var(--color-border);
}

.about-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-muted);
  font-weight: 500;
  padding-top: 0.2rem;
  line-height: 1.4;
}

.about-body {
  font-size: 0.92rem;
  line-height: 1.65;
}

.about-body p {
  margin-bottom: 0.6rem;
}

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

.about-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-body ul li {
  display: flex;
  gap: 0.6rem;
  padding: 0.1rem 0;
  color: var(--color-text);
}

.about-body ul li::before {
  content: "–";
  color: var(--color-muted);
  flex-shrink: 0;
}

.about-body strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  padding: calc(var(--space) * 2) 0 var(--space);
  border-top: 1px solid var(--color-border);
  margin-top: calc(var(--space) * 3);
  font-size: 0.9rem;
}

footer a {
  color: var(--color-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--color-accent);
  opacity: 1;
}

footer .impressum-link {
  margin-left: 1.5rem;
  font-size: 0.75rem;
  opacity: 0.4;
}

footer .impressum-link:hover {
  opacity: 1;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  body {
    padding: 0 1rem;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .nav-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .nav-social {
    padding-left: 0;
    border-left: none;
  }

  .home-nav {
    flex-direction: column;
    gap: 0.75rem;
  }

  .about-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .about-label {
    font-size: 0.65rem;
  }

  .project-header {
    flex-direction: column;
    gap: 0.25rem;
  }
}
