/* ==========================================================================
   Hank Theme — Portfolio layout inspired by alanchan.me
   System serif stack · 700px max-width · Monochromatic palette
   ========================================================================== */

/* ---------- Reset & Base ---------- */

* {
  box-sizing: border-box;
}

*::selection {
  background: rgba(45, 170, 219, 0.25);
}

:root {
  --color-text: #1a1a1a;
  --color-text-secondary: #666;
  --color-text-muted: #999;
  --color-bg: #fff;
  --color-border: #e5e5e5;
  --color-link-hover: #000;
  --max-width: 700px;
  --font-serif: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

body {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: var(--font-mono);
}

a {
  color: var(--color-text);
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--color-text);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Layout ---------- */

.Container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero (Homepage) ---------- */

.Hero {
  text-align: center;
  padding: 4rem 0 0.75rem;
}

.Hero__name {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.Hero__tagline {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
  white-space: normal;
}

/* ---------- Navigation ---------- */

.Nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0;
  margin-bottom: 1.4rem;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.Nav__link {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 0;
  transition: color 0.15s ease;
}

.Nav__link:hover,
.Nav__link--active {
  color: var(--color-text);
}

.Nav__dot {
  color: var(--color-text-muted);
  user-select: none;
}

.Nav__emoji {
  margin-right: 0.22rem;
}

/* ---------- Post List ---------- */

.PostList {
  padding-bottom: 1rem;
}

.PostList__item {
  padding: 1rem 0;
}

.PostList__item:last-child {
  border-bottom: none;
}

.PostList__title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  line-height: 1.4;
}

.PostList__title a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #d4d4d4;
  text-underline-offset: 3px;
}

.PostList__title a:hover {
  text-decoration-color: #9a9a9a;
}

.PostList__emoji {
  margin-right: 0.24rem;
}

.PostList__desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  line-height: 1.6;
}

.PostList__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.PostList__date {
  color: var(--color-text-muted);
}

.PostList__tag {
  color: var(--color-text-secondary);
  text-decoration: none;
  background: #f5f5f5;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.PostList__tag:hover {
  background: var(--color-border);
}

/* Tag color variants */
.PostList__tag--default { background: rgba(227, 226, 224, 0.5); }
.PostList__tag--gray { background: rgb(227, 226, 224); }
.PostList__tag--brown { background: rgb(238, 224, 218); color: rgb(68, 42, 30); }
.PostList__tag--orange { background: rgb(250, 222, 201); color: rgb(73, 41, 14); }
.PostList__tag--yellow { background: rgb(253, 236, 200); color: rgb(64, 44, 27); }
.PostList__tag--green { background: rgb(219, 237, 219); color: rgb(28, 56, 41); }
.PostList__tag--blue { background: rgb(211, 229, 239); color: rgb(24, 51, 71); }
.PostList__tag--purple { background: rgb(232, 222, 238); color: rgb(65, 36, 84); }
.PostList__tag--pink { background: rgb(245, 224, 233); color: rgb(76, 35, 55); }
.PostList__tag--red { background: rgb(255, 226, 221); color: rgb(93, 23, 21); }

/* ---------- Post (Single Page) ---------- */

.Post {
  padding-top: 2.5rem;
}

.Post__header {
  margin-bottom: 2rem;
}

.Post__cover {
  margin-bottom: 1.5rem;
}

.Post__cover img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.Post__title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.Post__emoji {
  margin-right: 0.28rem;
}

.Post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.Post__date {
  color: var(--color-text-muted);
}

.Post__tag {
  color: var(--color-text-secondary);
  text-decoration: none;
  background: #f5f5f5;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.Post__tag:hover {
  background: var(--color-border);
}

/* Tag color variants for post */
.Post__tag--default { background: rgba(227, 226, 224, 0.5); }
.Post__tag--gray { background: rgb(227, 226, 224); }
.Post__tag--brown { background: rgb(238, 224, 218); color: rgb(68, 42, 30); }
.Post__tag--orange { background: rgb(250, 222, 201); color: rgb(73, 41, 14); }
.Post__tag--yellow { background: rgb(253, 236, 200); color: rgb(64, 44, 27); }
.Post__tag--green { background: rgb(219, 237, 219); color: rgb(28, 56, 41); }
.Post__tag--blue { background: rgb(211, 229, 239); color: rgb(24, 51, 71); }
.Post__tag--purple { background: rgb(232, 222, 238); color: rgb(65, 36, 84); }
.Post__tag--pink { background: rgb(245, 224, 233); color: rgb(76, 35, 55); }
.Post__tag--red { background: rgb(255, 226, 221); color: rgb(93, 23, 21); }

.Post__content {
  font-size: 1rem;
  line-height: 1.75;
}

.Post__content .SemanticString__Fragment--Link,
.Post__content .SemanticString__Fragment--Resource > a {
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
  border-bottom: none;
}

.Post__content .SemanticString__Fragment--Link:hover,
.Post__content .SemanticString__Fragment--Resource > a:hover {
  text-decoration-color: var(--color-text);
  border-bottom: none;
}

.Post__back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.Post__back a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}

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

/* ---------- Tag Page ---------- */

.Tag__heading {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 0.5rem;
  letter-spacing: -0.01em;
}

/* ---------- Footer ---------- */

.Footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.Footer p {
  margin: 0.15rem 0;
}

.Footer a {
  color: var(--color-text-secondary);
}

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

/* ---------- Notion Content Overrides ---------- */

/* Make PageRoot respect our max-width container */
.PageRoot {
  width: 100%;
  max-width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Headings in content */
.Heading .SemanticString {
  font-family: var(--font-serif);
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .Container {
    padding: 0 16px;
  }

  .Hero {
    padding: 2.5rem 0 1rem;
  }

  .Hero__name {
    font-size: 1.6rem;
  }

  .Hero__tagline {
    font-size: 0.95rem;
  }

  .Nav {
    gap: 0.2rem 0.75rem;
    padding: 0.75rem 0 1.5rem;
  }

  .Nav__link {
    font-size: 0.9rem;
  }

  .Post__title {
    font-size: 1.6rem;
  }
}

/* ---------- Print ---------- */

@media print {
  .Nav,
  .Footer {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  .Container {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .Post__back {
    display: none;
  }
}
