:root {
  --fg: #1c1c1c;
  --muted: #5f6368;
  --bg: #ffffff;
  --rule: #dddddd;
  --link: #1a5fb4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e6e6e6;
    --muted: #a0a0a0;
    --bg: #151515;
    --rule: #333333;
    --link: #78aeed;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 760px;
  padding: 0 16px 48px;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

header {
  padding: 24px 0 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}

header .name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}

header .contact { color: var(--muted); margin-left: 6px; }

nav { margin-top: 6px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 24px;
}

.card {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  color: var(--fg);
  text-decoration: none;
}

.card:hover { border-color: var(--link); }
.card img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; }
.card h3 { margin: 10px 12px 2px; }
.card p { margin: 0 12px 12px; color: var(--muted); font-size: 0.92rem; }

details.fold {
  margin: 24px 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px 12px;
}
details.fold summary { cursor: pointer; font-weight: 600; }
details.fold[open] summary { margin-bottom: 8px; }

.hobby {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
  margin: 20px 0;
}
.hobby img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.hobby h3 { margin-top: 0; }
.hobby p { margin: 4px 0 0; }
@media (max-width: 520px) {
  .hobby { grid-template-columns: 1fr; }
}

img.hero { display: block; width: 100%; height: auto; border-radius: 6px; margin: 12px 0; }
nav a { margin-right: 16px; }
nav a[aria-current="page"] { color: var(--fg); font-weight: 600; text-decoration: none; }

a { color: var(--link); }

h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.2rem; margin: 32px 0 8px; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
h3 { font-size: 1.05rem; margin: 20px 0 2px; }

.meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 6px; }

.tag {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--muted);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

ul { padding-left: 20px; }
li { margin: 4px 0; }

dl.skills dt { font-weight: 600; margin-top: 12px; }
dl.skills dd { margin: 2px 0 0; }

footer {
  margin-top: 48px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}
