/* albertsema.com — simple, b-r.io-inspired. Light default, dark via [data-theme]. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --text: #18181b;
  --text-2: #52525b;
  --muted: #8e8e96;
  --line: #e7e7e4;
  --accent: #4f46e5;        /* indigo — links */
  --accent-soft: #eef2ff;
  --accent-2: #d97706;      /* amber — kickers, markers */
  --code-bg: #f4f4f2;
}

[data-theme="dark"] {
  --bg: #101013;
  --bg-soft: #1a1a1e;
  --text: #e6e6e4;
  --text-2: #a7a7ad;
  --muted: #6f6f77;
  --line: #26262b;
  --accent: #a5b4fc;
  --accent-soft: #1e1b3a;
  --accent-2: #fbbf24;
  --code-bg: #1a1a1e;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

/* ---------- header ---------- */

.site-header { padding: 2rem 0 0; }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: .95rem;
}

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

.theme-toggle {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
}

.theme-toggle:hover { color: var(--text); border-color: var(--muted); }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem; top: 1rem;
  background: var(--bg); color: var(--accent);
  padding: .5rem .75rem; z-index: 10;
}

/* ---------- typography ---------- */

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }

h1 { font-size: 2rem; font-weight: 700; margin: 0 0 .75rem; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 2.75rem 0 1rem; }
h3 { font-size: 1.02rem; font-weight: 600; margin: 0; }

p { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

.muted { color: var(--text-2); }
.small { font-size: .875rem; }

.kicker {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 .5rem;
}

hr.rule { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- sections ---------- */

.section { padding: 2.25rem 0 0; }
.section-last { padding-bottom: 4rem; }

.hero { padding-top: 3.5rem; }

.hero .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: block;
  margin-bottom: 1.5rem;
}

.hero p { color: var(--text-2); font-size: 1.05rem; }

/* ---------- post lists ---------- */

.post-list { list-style: none; margin: 0; padding: 0; }

.post-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: .55rem 0;
}

.post-list .post-title { flex: 1; }

.post-list a {
  color: var(--text);
  text-decoration: none;
}
.post-list a:hover { color: var(--accent); }

.post-list .post-date {
  color: var(--muted);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.post-list-detail li { display: block; padding: .9rem 0; }
.post-list-detail p { color: var(--text-2); font-size: .93rem; margin: .2rem 0 0; }

/* ---------- simple item rows (projects, experience) ---------- */

.item-list { list-style: none; margin: 0; padding: 0; }

.item-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.item-list li:last-child { border-bottom: 0; }

.item-list .item-main p { color: var(--text-2); font-size: .93rem; margin: .15rem 0 0; }
.item-list .item-meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }

/* ---------- article ---------- */

.article-header { padding-top: 3.25rem; }
.article-header h1 { font-size: 1.75rem; }
.article-header .post-date { color: var(--muted); font-size: .9rem; }

.note-content h2 { font-size: 1.2rem; margin-top: 2.25rem; }
.note-content h3 { font-size: 1.05rem; margin-top: 1.75rem; margin-bottom: .5rem; }
.note-content blockquote {
  margin: 1.5rem 0;
  padding: .25rem 0 .25rem 1.1rem;
  border-left: 2px solid var(--accent);
  color: var(--text-2);
}
.note-content code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: .1em .35em;
  font-size: .9em;
}
.note-content pre {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}
.note-content pre code { background: transparent; padding: 0; }
.note-content img { max-width: 100%; border-radius: 8px; }
.note-content strong { color: var(--text); }

/* ---------- newsletter ---------- */

.subscribe-card {
  margin-top: 1rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.subscribe-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }

.subscribe-form label { position: absolute; left: -9999px; }

.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.subscribe-form input[type="email"]:focus { outline: 2px solid var(--accent); border-color: transparent; }

.button, .button-secondary {
  display: inline-block;
  font: inherit;
  font-size: .95rem;
  border-radius: 8px;
  padding: .6rem 1rem;
  cursor: pointer;
  text-decoration: none;
}

.button {
  background: var(--accent);
  color: var(--bg);
  border: 0;
}
.button:hover { opacity: .9; }

.button-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}
.button-secondary:hover { border-color: var(--accent); }

.ml-success { display: none; }
.ml-subscribe-form.is-success .row-form { display: none; }
.ml-subscribe-form.is-success .ml-success { display: block; }

/* ---------- footer ---------- */

footer { margin-top: 4.5rem; border-top: 1px solid var(--line); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: .875rem;
}

.footer-links { display: flex; gap: 1rem; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .post-list li { flex-direction: column; gap: .1rem; }
  .item-list li { flex-direction: column; gap: .15rem; }
}
