/* jundyque.com — navy and cream, set in EB Garamond. */

:root {
  --navy: #0c1d2b;
  --cream: #e6e2d4;
  --cream-bright: #f3efe2;
  --cream-dim: #d3cfc0;
  --muted: #8f9da6;
  --faint: #64788a;
  --rule: rgba(230, 226, 212, 0.16);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--navy);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.52;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--cream);
  color: var(--navy);
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 1px solid var(--cream);
  outline-offset: 4px;
  border-radius: 2px;
}

svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Shared pieces ---------- */

.ornament {
  color: var(--cream);
}

.masthead {
  display: flex;
  justify-content: center;
  padding: 26px 24px 0;
}

.masthead .ornament--top {
  width: 164px;
}

.masthead__home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
  transition: color 0.2s ease;
}

.masthead__home .ornament--top {
  width: 132px;
}

.masthead__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
  line-height: 1;
}

.masthead__home:hover {
  color: var(--cream-bright);
}

.colophon {
  padding: 0 24px 18px;
  text-align: center;
}

.colophon .ornament--bottom {
  width: 150px;
  margin: 0 auto 26px;
}

.colophon p {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.07em;
  color: var(--faint);
}

.link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  color: var(--cream-dim);
  text-decoration: none;
  letter-spacing: 0.012em;
  transition: color 0.2s ease;
}

.link__arrow,
.back__arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

.link:hover,
.link:focus-visible {
  color: var(--cream-bright);
}

.link:hover .link__arrow,
.link:focus-visible .link__arrow {
  transform: translateX(5px);
}

/* ---------- Home ---------- */

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 40px 24px;
}

.hero__emblem {
  flex: none;
  width: 244px;
  color: var(--cream);
}

.emblem__knock {
  fill: var(--navy);
  stroke: var(--navy);
}

.emblem__fill {
  fill: var(--navy);
}

.hero__text {
  max-width: 22.5rem;
  padding-top: 18px;
}

.wordmark {
  margin: 0 0 0.28em;
  font-family: var(--display);
  font-weight: 500;
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--cream-bright);
}

.tagline {
  margin: 0 0 1.05em;
  text-wrap: balance;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
}

.latest {
  margin: 1rem 0 0;
  font-size: 15.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.latest__label {
  margin-right: 0.7em;
}

.latest a {
  color: var(--cream-bright);
  font-weight: 600;
  text-decoration: none;
}

.latest a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* ---------- Inner pages ---------- */

.column {
  flex: 1;
  width: min(100% - 48px, 39rem);
  margin: 0 auto;
  padding: 3.4rem 0 4.5rem;
}

.page-head {
  margin-bottom: 2.6rem;
  text-align: center;
}

.page-title {
  margin: 0 0 0.2em;
  font-family: var(--display);
  font-weight: 500;
  font-size: 2.9rem;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--cream-bright);
}

.page-lede {
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

.empty {
  margin: 3rem 0;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.year + .year {
  margin-top: 2.6rem;
}

.year__label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--muted);
}

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

.entry {
  display: grid;
  grid-template-columns: 4.6rem 1fr auto;
  align-items: baseline;
  gap: 0 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--rule);
}

.entry__date {
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.entry__title {
  font-size: 1.16rem;
  line-height: 1.3;
  color: var(--cream);
}

.entry__kind,
.essay__kind {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

/* ---------- Essay ---------- */

.back {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back:hover,
.back:focus-visible {
  color: var(--cream-bright);
}

.back:hover .back__arrow,
.back:focus-visible .back__arrow,
.essay__nav-link--newer:hover .back__arrow {
  transform: translateX(-5px);
}

.essay__head {
  margin: 2.2rem 0 2.4rem;
}

.essay__meta {
  display: flex;
  align-items: baseline;
  gap: 1em;
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.essay__kind::before {
  content: "·";
  margin-right: 1em;
  letter-spacing: 0;
}

.essay__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: var(--cream-bright);
  text-wrap: balance;
}

.prose {
  font-size: 1.2rem;
  line-height: 1.62;
  overflow-wrap: break-word;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose figure,
.prose table {
  margin: 0 0 1.15em;
}

.prose h2,
.prose h3 {
  margin: 2.1em 0 0.6em;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--cream-bright);
}

.prose h2 {
  font-size: 1.75rem;
}

.prose h3 {
  font-size: 1.4rem;
}

.prose a {
  color: var(--cream-bright);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(243, 239, 226, 0.45);
  transition: text-decoration-color 0.2s ease;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose strong {
  font-weight: 600;
  color: var(--cream-bright);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.3em;
}

.prose li::marker {
  color: var(--muted);
}

.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding-left: 1.2em;
  border-left: 1px solid rgba(230, 226, 212, 0.45);
  font-style: italic;
  color: var(--cream-dim);
}

.prose blockquote > :last-child {
  margin-bottom: 0;
}

.prose hr {
  position: relative;
  height: 1px;
  margin: 2.6em auto;
  border: 0;
  width: 9rem;
  overflow: visible;
  background: linear-gradient(to right, transparent, var(--rule) 20%, var(--rule) 80%, transparent);
}

.prose hr::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--cream);
  outline: 6px solid var(--navy);
  transform: translate(-50%, -50%) rotate(45deg);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.prose figcaption,
.prose .caption {
  margin-top: 0.6em;
  font-size: 0.85em;
  font-style: italic;
  text-align: center;
  color: var(--muted);
}

.prose code {
  padding: 0.08em 0.3em;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74em;
}

.prose pre {
  padding: 0.9em 1.1em;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  line-height: 1.5;
}

.prose pre code {
  padding: 0;
  border: 0;
  font-size: 0.72em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}

.prose th,
.prose td {
  padding: 0.45em 0.6em;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

.prose th {
  font-weight: 600;
  color: var(--cream-bright);
}

.prose sup {
  line-height: 0;
  font-size: 0.7em;
}

.prose .footnotes {
  margin-top: 3em;
  padding-top: 1.2em;
  border-top: 1px solid var(--rule);
  font-size: 0.85em;
  color: var(--cream-dim);
}

.essay__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

.essay__nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--cream-dim);
  transition: color 0.2s ease;
}

.essay__nav-link--older {
  grid-column: 2;
  text-align: right;
  align-items: flex-end;
}

.essay__nav-link:hover {
  color: var(--cream-bright);
}

.essay__nav-link--older:hover .link__arrow {
  transform: translateX(5px);
}

.essay__nav-label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.essay__nav-title {
  font-size: 1.08rem;
  line-height: 1.3;
}

/* ---------- Entrance ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.masthead,
.hero__emblem,
.hero__text > *,
.column,
.colophon {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__emblem {
  animation-delay: 0.08s;
}

.hero__text > :nth-child(1) {
  animation-delay: 0.16s;
}

.hero__text > :nth-child(2) {
  animation-delay: 0.26s;
}

.hero__text > :nth-child(3) {
  animation-delay: 0.36s;
}

.hero__text > :nth-child(4) {
  animation-delay: 0.46s;
}

.column {
  animation-delay: 0.1s;
}

.colophon {
  animation-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    gap: 22px;
    padding: 32px 24px 40px;
    text-align: center;
  }

  .hero__emblem {
    width: 168px;
  }

  .hero__text {
    padding-top: 0;
  }

  .wordmark {
    font-size: 2.7rem;
  }

  .links {
    justify-content: center;
  }

  .column {
    padding: 2.6rem 0 3.6rem;
  }

  .page-title {
    font-size: 2.4rem;
  }

  .entry {
    grid-template-columns: 3.6rem 1fr;
  }

  .entry__kind {
    grid-column: 2;
    margin-top: 0.15rem;
  }

  .prose {
    font-size: 1.12rem;
  }

  .essay__nav {
    grid-template-columns: 1fr;
  }

  .essay__nav-link--older {
    grid-column: 1;
  }
}
