/* Base palette and system fonts: no external assets or libraries. */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #253b4b;
  background: #f5f4ef;
  font-synthesis: none;
  line-height: 1.6;
  --navy: #193b56;
  --muted: #596670;
  --border: #d9dedc;
  --photo: #635086;
  --sun: #95521e;
  --weather: #216775;
  --train: #426b51;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page {
  width: min(100% - 64px, 1020px);
  margin: 0 auto;
}

svg {
  display: block;
}

/* A small monogram and a serif name give the page a personal masthead. */
.intro {
  padding: clamp(28px, 4vw, 44px) 0 24px;
}

.signum {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--navy);
  margin-bottom: 16px;
}

.signum svg {
  width: 34px;
  height: 34px;
  margin-right: 7px;
}

.signum > span {
  width: 34px;
  height: 1px;
  background: #bec8cb;
  margin-right: 6px;
}

.signum i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--photo);
}

.signum i:nth-of-type(2) {
  background: #c78b3e;
}

.signum i:nth-of-type(3) {
  background: var(--weather);
}

.signum i:nth-of-type(4) {
  background: var(--train);
}

h1 {
  margin: 0;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.12;
}

.welcome {
  display: block;
  font-size: .94rem;
  line-height: 1.6;
  margin-bottom: 6px;
  color: var(--muted);
}

.name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 6.2vw, 4.2rem);
  letter-spacing: -.055em;
}

.subtitle {
  display: inline-block;
  margin-left: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-style: italic;
  letter-spacing: -.035em;
}

.lead {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 22px 0 0;
  font-size: .95rem;
  color: var(--muted);
}

.lead::after {
  content: "";
  width: 62px;
  height: 1px;
  background: #bdc8cc;
}

/* Four related cards; accents stay on the edges, symbols and links. */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.card {
  --accent: var(--photo);
  --tint: #f0ecf6;
  position: relative;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 26px;
  min-height: 174px;
  background: #fffefa;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 13px;
  box-shadow: 0 2px 4px #193b5605;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card-sun {
  --accent: var(--sun);
  --tint: #fbf0dc;
}

.card-weather {
  --accent: var(--weather);
  --tint: #e8f2f3;
}

.card-train {
  --accent: var(--train);
  --tint: #edf3e9;
}

.icon-tile {
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  height: 68px;
  background: var(--tint);
  color: var(--accent);
  border-radius: 17px;
}

.category-icon {
  width: 46px;
  height: 46px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-content {
  min-width: 0;
  flex: 1;
}

.category-label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .035em;
  line-height: 1.6;
}

h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.02em;
}

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

.primary-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 3px 0;
  text-decoration: none;
  border-radius: 3px;
}

.primary-link > span {
  overflow-wrap: anywhere;
}

.link-arrow {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.primary-link:hover > span {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.primary-link:hover .link-arrow {
  transform: translateX(3px);
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 5px 11px;
  margin-top: 11px;
  background: var(--tint);
  border: 1px solid #c9d7c9;
  border-radius: 7px;
  font-size: .79rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.secondary-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secondary-link:hover {
  background: #dde9d8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 5px;
  border-radius: 3px;
}

.card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--tint);
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 5px 12px #193b5609;
  }
}

/* A personal sign-off and small, aligned statistics share one quiet footer. */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px;
  padding: 25px 0 32px;
  margin-top: 30px;
  border-top: 1px solid #ccd4d5;
}

.greeting {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
}

.greeting > span {
  display: block;
}

.signature {
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--navy);
}

.counter {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 310px;
  max-width: 100%;
  font-size: .77rem;
  color: var(--muted);
}

.stats-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 4px;
  color: #657986;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.counter-content {
  flex: 1;
  min-width: 0;
}

.counter-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  line-height: 1.8;
}

.counter-row > :last-child {
  font-size: .86rem;
  color: var(--navy);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.counter-period {
  margin: 5px 0 0;
  font-size: .69rem;
  line-height: 1.6;
}

.counter-info {
  margin-top: 7px;
  font-size: .73rem;
}

.counter-info summary {
  width: fit-content;
  cursor: pointer;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: #99aab5;
  text-underline-offset: 3px;
}

.counter-info summary:hover {
  text-decoration-color: var(--navy);
}

.counter-info p {
  margin: 8px 0 0;
}

.counter-info p:empty {
  display: none;
}

@media (min-width: 641px) and (max-width: 850px) {
  .card {
    padding: 22px;
    gap: 16px;
  }
  .icon-tile {
    flex-basis: 52px;
    height: 52px;
    border-radius: 13px;
  }
  .category-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 36px);
  }
  .intro {
    padding-top: 28px;
    padding-bottom: 23px;
  }
  .signum {
    margin-bottom: 20px;
  }
  .subtitle {
    margin-left: 8px;
  }
  .lead {
    margin-top: 21px;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .card {
    min-height: 146px;
    padding: 22px 20px;
    gap: 18px;
  }
  .icon-tile {
    flex-basis: 58px;
    height: 58px;
    border-radius: 14px;
  }
  .category-icon {
    width: 42px;
    height: 42px;
  }
  .category-label {
    font-size: .7rem;
  }
  .secondary-link {
    min-height: 44px;
  }
  .footer {
    flex-direction: column;
    gap: 24px;
    padding-top: 23px;
    margin-top: 25px;
  }
  .counter {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card, .link-arrow, .secondary-link {
    transition: none;
  }
  .card:hover, .primary-link:hover .link-arrow {
    transform: none;
  }
}
