/* ---------- Theme ---------- */
:root {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2330;
  --text: #e6edf3;
  --muted: #9ba7b4;
  --accent: #7ea6d8;
  --accent-2: #a9c5e8;
  --accent-dark: #2f4f7a;
  --border: #30363d;
  --radius: 10px;
  --max-width: 860px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(47, 79, 122, 0.18), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(47, 79, 122, 0.10), transparent 40%),
    var(--bg);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent-2);
}
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}
img {
  max-width: 100%;
}
::selection {
  background: var(--accent);
  color: var(--bg);
}
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.logo:hover {
  color: var(--text);
}
.nav {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background-color 0.15s;
}
.nav a:hover {
  color: var(--text);
  background: var(--surface);
}
.nav a[aria-current="page"] {
  color: var(--accent);
  background: rgba(47, 79, 122, 0.35);
}
/* ---------- Main content ---------- */
main {
  flex: 1;
  padding: 3.5rem 0;
}
h1,
h2,
h3 {
  font-family: var(--font-mono);
  color: var(--text);
  letter-spacing: -0.01em;
}
h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
h2 {
  font-size: 1.35rem;
  margin: 3rem 0 1rem;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-top: 0;
}
p {
  max-width: 68ch;
}
/* Intro block on the home page */
.intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 3px solid var(--accent-dark);
  box-shadow: 0 0 0 6px rgba(47, 79, 122, 0.25);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}
.tags li {
  font-family: var(--font-mono);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color 0.15s;
}
.tags li:hover {
  border-color: var(--accent-dark);
}
.tags li:has(.tag-icon) {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.tag-icon {
  width: 1.1em;
  height: 1.1em;
}
/* ---------- Project cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.card:hover {
  border-color: var(--accent-dark);
  background: var(--surface-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}
.card p {
  color: var(--muted);
  font-size: 0.975rem;
  flex: 1;
}
.card .tags {
  margin: 0 0 1.25rem;
}
.card .tags li {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  color: var(--accent-2);
}
.card-links {
  display: flex;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
}
.card-links a::after {
  content: " \2192";
}
/* ---------- Contact list ---------- */
.contact-list {
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.contact-list li:last-child {
  border-bottom: none;
}
.contact-list .label {
  min-width: 110px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}
.contact-list a {
  overflow-wrap: anywhere;
}
/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 1.5rem 0;
  text-align: center;
}
@media (max-width: 520px) {
  h1 {
    font-size: 1.8rem;
  }
  .contact-list li {
    flex-direction: column;
    gap: 0.25rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .card:hover {
    transform: none;
  }
}
