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

/* Variables */
:root {
  --bg:      #f9f8f6;
  --text:    #1a1a1a;
  --muted:   #777;
  --border:  #e2dfd9;
  --font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-w:   740px;
  --pad:     1.5rem;
}

/* Base */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
}

/* Language visibility
   Default: Danish shown, English hidden.
   html.en: English shown, Danish hidden. */
[data-en] {
  display: none;
}
html.en [data-da] {
  display: none;
}
html.en [data-en] {
  display: inline;
}

/* ── Layout ──────────────────────────────────────── */
header,
main,
footer {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── Header ──────────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 2rem;
}

.wordmark {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.55rem;
  transition: color 0.15s, border-color 0.15s;
}

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

/* ── Hero ────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  padding-block: 3rem 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-text {
  flex: 1;
}

.bio {
  max-width: 44ch;
}

.bio-lead {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 0.9rem;
}

.bio-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.bio-list li {
  font-size: 0.825rem;
  color: #666;
  padding-left: 1em;
  position: relative;
}

.bio-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--border);
}

.bio-contact {
  margin-top: 1rem;
  font-size: 0.825rem;
}

.bio-contact a {
  color: #666;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s, color 0.15s;
}

.bio-contact a:hover {
  border-color: var(--text);
}

.hero-photo img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%);
  flex-shrink: 0;
}

/* ── Sections ────────────────────────────────────── */
section {
  padding-block: 3.5rem;
  border-bottom: 1px solid var(--border);
}

section > h2 {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.75rem;
}

/* ── Projects ────────────────────────────────────── */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.project-img {
  display: block;
  border-radius: 5px;
  border: 1px solid var(--border);
  overflow: hidden;
  line-height: 0;
  transition: box-shadow 0.2s;
}

.project-img:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.project-img img {
  width: 100%;
  height: auto;
}

.project-text h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.domain {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.project-text p {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.visit {
  font-size: 0.775rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}

.visit:hover {
  border-color: var(--text);
}

/* ── Contact ─────────────────────────────────────── */
.contact p {
  font-size: 0.9rem;
  line-height: 2.2;
}

.contact a {
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}

.contact a:hover {
  border-color: var(--text);
}

/* ── Footer ──────────────────────────────────────── */
footer {
  padding-block: 2rem;
}

footer p {
  font-size: 0.775rem;
  color: var(--muted);
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 580px) {
  :root {
    --pad: 1.25rem;
  }

  .hero {
    flex-direction: column-reverse;
    gap: 1.25rem;
    padding-block: 2rem 3rem;
  }

  .hero-photo img {
    width: 72px;
    height: 72px;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
