:root {
  --bg: #f7f3ec;
  --text: #171717;
  --muted: #5f5f5f;
  --accent: #35b7c8;
  --line: #d9d1c5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

main {
  width: 100%;
  max-width: 760px;
  border-top: 4px solid var(--accent);
  padding-top: 36px;
}

.global-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto 18px;
  font-size: 16px;
  line-height: 1.5;
}

.global-nav a[aria-current="page"] {
  font-weight: 700;
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.portrait {
  flex: 0 0 clamp(84px, 16vw, 124px);
  width: clamp(84px, 16vw, 124px);
  aspect-ratio: 1 / 1;
  margin: 4px 0 0;
  border: 2px solid var(--text);
  border-radius: 18px;
  background: #efe7db;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--accent);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h2 {
  margin: 0 0 36px;
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 680px;
}

.meta {
  margin: 0 0 44px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.claim {
  margin: 0 0 36px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.subclaim {
  margin: 0 0 44px;
  font-size: clamp(20px, 3vw, 24px);
  line-height: 1.25;
  max-width: 620px;
}

.contact {
  font-size: 18px;
  line-height: 1.5;
}

.contact span {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

.weblog-hint {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
}

.weblog-hint span {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

a:hover,
a:focus {
  color: var(--accent);
}

@media (max-width: 560px) {
  body {
    align-items: flex-start;
    padding: 24px;
  }

  .hero-head {
    gap: 18px;
  }

  .portrait {
    flex-basis: 78px;
    width: 78px;
    border-radius: 14px;
    box-shadow: 6px 6px 0 var(--accent);
  }
}

/* Weblog pages share the homepage palette and typography. */
body.weblog-page {
  display: block;
}

.weblog-page main {
  margin: 0 auto;
}

.weblog-page h1 {
  margin: 0 0 36px;
  overflow-wrap: anywhere;
}

.weblog-page main nav {
  margin-bottom: 36px;
  font-size: 16px;
  line-height: 1.5;
}

.weblog-page .post-header {
  margin-bottom: 36px;
}

.weblog-page .post-header h1 {
  margin-bottom: 18px;
}

.weblog-page .post-date,
.weblog-page .post-list time {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.weblog-page .post-date {
  margin: 0;
}

.weblog-page .post-body {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  font-size: 19px;
  line-height: 1.6;
}

.weblog-page .post-body p {
  margin: 0 0 1.35em;
}

.weblog-page .post-body h2,
.weblog-page .post-body h3 {
  margin: 1.6em 0 0.6em;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.weblog-page .post-body ul {
  margin: 0 0 1.35em;
  padding-left: 1.4em;
}

.weblog-page .post-body li + li {
  margin-top: 0.4em;
}

.weblog-page .post-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.weblog-page .post-list li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 22px;
  line-height: 1.3;
}

.weblog-page .post-list a {
  width: fit-content;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  body.weblog-page {
    padding: 24px;
  }

  .weblog-page .post-header h1 {
    font-size: 34px;
  }

  .weblog-page .post-list li {
    display: block;
  }

  .weblog-page .post-list time {
    display: block;
    margin-bottom: 6px;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-tile {
  display: block;
  border: 1px solid var(--line);
  background: #fff;
}

.card-tile img,
.card-detail img {
  display: block;
  width: 100%;
  height: auto;
}

.card-tile img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.card-tile span {
  display: block;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.4;
}

.card-tile:hover,
.card-tile:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-detail {
  margin: 0;
}

.card-detail img {
  border: 1px solid var(--line);
}

.card-context {
  margin: 28px 0 0;
  font-size: 19px;
  line-height: 1.6;
}

.event-section h2 {
  margin: 36px 0 18px;
  font-size: 28px;
}

.event-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.event-list li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.event-list time {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.event-list h3 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.3;
}

.event-list p {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-list li {
    display: block;
  }

  .event-list time {
    display: block;
    margin-bottom: 6px;
  }
}
