:root {
  --bg: #f3ecdd;
  --text: #2e2419;
  --text-soft: #5a4d3f;
  --leather: #6b4a34;
  --olive: #5c6e4f;
  --burgundy: #8b3a3a;
  --gold: #b08d57;
  --paper: #faf5eb;
  --rule: rgba(107, 74, 52, 0.35);
  --rule-light: rgba(107, 74, 52, 0.18);
  --radius: 2px;
  --page-width: 56rem;
  --content-width: 36rem;
  --ribbon-gradient: linear-gradient(180deg, #5c6e4f 0%, #8b3a3a 70%, #b08d57 100%);
}

[data-theme="candlelight"] {
  color-scheme: dark;
  --bg: #1a100e;
  --text: #e8dcc8;
  --text-soft: #b9a896;
  --leather: #d4b896;
  --olive: #9aad7a;
  --burgundy: #c45c5c;
  --gold: #d4af6a;
  --paper: #261816;
  --rule: rgba(212, 175, 106, 0.32);
  --rule-light: rgba(212, 175, 106, 0.16);
  --ribbon-gradient: linear-gradient(180deg, #9aad7a 0%, #c45c5c 65%, #d4af6a 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="candlelight"] body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at 50% 20%, rgba(212, 175, 106, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.42) 100%);
}

a {
  color: var(--olive);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--burgundy);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* —— header —— */

.site-header {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2rem clamp(1.25rem, 4vw, 2rem) 0.75rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  border-bottom: 1px solid var(--rule-light);
  transition: border-color 0.4s ease;
}

.site-brand {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.theme-toggle {
  grid-column: 3;
  justify-self: end;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.68rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.4s ease;
}

.theme-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.theme-toggle__text--candle {
  display: none;
}

[data-theme="candlelight"] .theme-toggle__text--day {
  display: none;
}

[data-theme="candlelight"] .theme-toggle__text--candle {
  display: inline;
}

.scroll-ribbon {
  position: fixed;
  top: 0;
  right: 0.55rem;
  width: 0.5rem;
  height: 100vh;
  z-index: 1000;
  pointer-events: none;
  transform: rotate(1.75deg);
  transform-origin: top right;
}

.scroll-ribbon__mark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 3.25rem;
  height: 3.25rem;
  background: var(--ribbon-gradient);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), 50% 100%, 0 calc(100% - 9px));
  box-shadow: -2px 2px 8px rgba(46, 36, 25, 0.18);
  opacity: 0.88;
  transition: height 0.08s ease-out;
  will-change: height;
}

.site-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold);
}

.site-name:hover {
  color: var(--leather);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

.site-nav a {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.8rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  color: var(--text-soft);
  text-decoration: none;
  padding-bottom: 0;
  border-bottom: none;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--olive);
  text-decoration: underline;
  text-decoration-color: var(--leather);
  border-bottom: none;
}

/* —— layout —— */

main {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) 3.5rem;
}

.page-intro {
  max-width: var(--content-width);
  margin: 0 auto 2rem;
  text-align: center;
}

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.lead {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-soft);
  max-width: 32rem;
  margin: 0 auto;
}

.section-label {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.2em;
  color: var(--leather);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.section-label::before,
.section-label::after {
  content: '—';
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-variant: normal;
  letter-spacing: 0;
  color: var(--rule);
  font-size: 0.85rem;
}

/* —— section divider (fleuron) —— */

.watercolor-divider {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  margin: 1.75rem auto;
  border: none;
  background: none;
  text-align: center;
  overflow: visible;
}

.watercolor-divider::before {
  content: '⁂';
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  color: var(--leather);
  opacity: 0.7;
  line-height: 1;
}

.watercolor-divider--wide {
  max-width: 100%;
  margin: 2rem 0;
}

.watercolor-divider--compact::before {
  font-size: 0.9rem;
  opacity: 0.55;
}

/* —— book-like panel —— */

.book-panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* —— home layout —— */

.home-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
  margin-top: 1.75rem;
  margin-bottom: 2.5rem;
}

.home-sidebar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.home-shayari {
  height: max-content;
  align-self: start;
}

.home-cards {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1rem;
  min-width: 0;
  height: max-content;
  align-self: start;
}

.home-bio,
.corner-module--coming {
  flex: 0 0 auto;
  height: max-content;
}

.corner-module {
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
  padding: 0.75rem 1rem 0.7rem;
  font-size: 0.8125rem;
  position: relative;
  box-shadow: none;
}

.corner-module::before {
  content: '❧';
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.85rem;
  color: var(--burgundy);
  opacity: 0.55;
  height: auto;
  left: auto;
  background: none;
  border-radius: 0;
}

.corner-module::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 0.65rem;
  width: 3px;
  height: 0.95rem;
  background: var(--burgundy);
  opacity: 0.45;
}

.corner-module__title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.68rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.16em;
  color: var(--leather);
  margin-bottom: 0.45rem;
  padding-top: 0;
  padding-right: 1rem;
}

.corner-item {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule-light);
}

.corner-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

a.corner-item {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

a.corner-item:hover {
  text-decoration: none;
  border-bottom-color: var(--rule);
}

a.corner-item:hover .corner-item__title {
  color: var(--olive);
}

.corner-item__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.corner-item__note {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.corner-item__stars {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.corner-item__when {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.68rem;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--olive);
  margin-top: 0.2rem;
}

/* —— home portrait —— */

.home-portrait {
  margin: 0;
  padding: 0.85rem;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.home-portrait__frame {
  position: relative;
  width: clamp(10rem, 26vw, 14.5rem);
  aspect-ratio: 4 / 5;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
  overflow: hidden;
}

.home-portrait__frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0.35rem;
  height: 100%;
  background: var(--burgundy);
  opacity: 0.35;
  z-index: 1;
}

.home-portrait__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: sepia(8%) contrast(1.02);
}

.home-shayari__text {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0;
}

.home-aside__bio {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.78rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  line-height: 1.55;
  color: var(--leather);
  text-align: left;
  margin: 0;
}

/* —— highlights —— */

.highlights {
  list-style: none;
  max-width: var(--content-width);
  margin: 0 auto;
}

.highlights li {
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.highlights li:hover {
  border-color: var(--olive);
  transform: none;
  box-shadow: none;
}

.highlights a {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
}

.highlights a:hover {
  text-decoration: none;
}

.highlights a::before {
  content: '·';
  flex-shrink: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--burgundy);
  margin-top: 0.1rem;
  width: auto;
  height: auto;
  background: none;
}

.highlights strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.15rem;
  color: var(--text);
}

.highlights span {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.875rem;
  color: var(--text-soft);
}

.highlights a:hover strong {
  color: var(--olive);
}

.see-all {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.8rem;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  text-decoration: none;
}

.see-all:hover {
  color: var(--olive);
  text-decoration: underline;
  text-decoration-color: var(--leather);
}

/* —— experience —— */

.experience-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.25rem;
}

.experience-columns .experience-group {
  max-width: none;
  margin-bottom: 0;
}

.experience-columns .experience-list {
  max-width: none;
  margin: 0;
}

.experience-group {
  max-width: var(--content-width);
  margin: 0 auto 2.25rem;
}

.experience-group--full {
  max-width: var(--content-width);
}

.experience-group:last-child {
  margin-bottom: 0;
}

.experience-group__title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.72rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.18em;
  color: var(--leather);
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule-light);
}

.experience-list {
  list-style: none;
  max-width: var(--content-width);
  margin: 0 auto;
}

.experience-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.25rem;
  padding: 1.1rem 1.2rem 1.1rem 1.35rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  position: relative;
  box-shadow: none;
}

.experience-item::before {
  content: none;
}

.experience-item__role {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.experience-item__org {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.875rem;
  color: var(--text-soft);
}

.experience-item__dates {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.68rem;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--text-soft);
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
  align-self: start;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 0.15rem;
}

.experience-item__note {
  grid-column: 1 / -1;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-soft);
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule-light);
  margin-top: 0.15rem;
}

.experience-item__note a {
  color: var(--olive);
  font-style: normal;
  font-weight: 500;
  text-decoration: none;
}

.experience-item__note a:hover {
  color: var(--burgundy);
  text-decoration: underline;
}

/* —— experience page intro / summer button —— */

.page-intro--experience {
  text-align: center;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.page-intro--experience h1 {
  text-align: center;
}

.page-intro--experience .watercolor-divider {
  margin-left: auto;
  margin-right: auto;
}

.summer-btn {
  display: inline-block;
  margin: 0.15rem auto 1rem;
  padding: 0.4rem 0.95rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.78rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: var(--olive);
  border: 1px solid var(--leather);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.summer-btn:hover {
  background: var(--burgundy);
  color: var(--paper);
  text-decoration: none;
}

/* —— book-spine shelves (experience page) —— */

.shelves-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem 1.25rem;
  align-items: start;
  max-width: var(--page-width);
  margin: 0 auto 2.75rem;
  justify-content: center;
}

.shelf-section {
  max-width: none;
  margin: 0;
  min-width: 0;
  text-align: center;
}

.shelf-section .experience-group__title {
  text-align: center;
}

.shelf-section .book-shelf__row {
  justify-content: center;
}

.shelf-section .book-shelf__also {
  text-align: center;
}

.shelves-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: stretch;
  align-self: stretch;
  padding: 2.75rem 0.25rem 3.5rem;
}

.shelves-divider__post {
  flex: 1;
  width: 5px;
  min-height: 12rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--leather) 8%,
    var(--gold) 50%,
    var(--leather) 92%,
    transparent 100%
  );
  border-radius: 2px;
  box-shadow: 1px 0 0 rgba(250, 245, 235, 0.4), -1px 0 0 rgba(46, 36, 25, 0.15);
}

.book-shelf {
  margin-top: 0.35rem;
}

.book-shelf__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
  min-height: 19rem;
  padding: 0 0.25rem;
}

.book-shelf__ledge {
  height: 0.7rem;
  margin-top: 0.2rem;
  background:
    linear-gradient(180deg, rgba(107, 74, 52, 0.5) 0%, rgba(176, 141, 87, 0.35) 45%, rgba(107, 74, 52, 0.15) 100%);
  border-top: 2px solid var(--leather);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 4px 10px rgba(46, 36, 25, 0.16);
}

.book-shelf__also {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.72rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin: 0.75rem 0 0;
  line-height: 1.5;
}

.book-spine {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 4.75rem;
  padding: 1rem 0.4rem;
  border: 1px solid rgba(46, 36, 25, 0.35);
  border-radius: 2px 2px 1px 1px;
  cursor: pointer;
  color: #faf5eb;
  box-shadow: 2px 3px 8px rgba(46, 36, 25, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  transform-origin: bottom center;
}

.book-spine--h1 { height: 16.5rem; }
.book-spine--h2 { height: 18.5rem; }
.book-spine--h3 { height: 15rem; }
.book-spine--h4 { height: 17.5rem; }
.book-spine--h5 { height: 14.25rem; }

.book-spine--olive { background: #6a8259; }
.book-spine--burgundy { background: #a34444; }
.book-spine--brass { background: #c9a35f; color: #2e2419; }
.book-spine--olive-deep { background: #557348; }
.book-spine--burgundy-soft { background: #b85c5c; }

.book-spine:hover {
  transform: translateY(-6px);
  box-shadow: 3px 8px 16px rgba(46, 36, 25, 0.28);
  filter: brightness(1.08);
}

.book-spine.is-open {
  transform: translateY(-18px);
  box-shadow: 4px 12px 22px rgba(46, 36, 25, 0.32);
  z-index: 2;
  filter: brightness(1.1);
}

.book-spine__label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  line-height: 1.15;
  max-height: 100%;
  overflow: hidden;
}

.book-spine__band {
  display: block;
  width: 72%;
  height: 2px;
  background: rgba(250, 245, 235, 0.75);
  flex-shrink: 0;
}

.book-spine--brass .book-spine__band {
  background: rgba(46, 36, 25, 0.4);
}

.book-spine__band--top {
  margin-bottom: 0.55rem;
}

.book-spine__band--bottom {
  margin-top: 0.55rem;
}

.book-panel {
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.25s ease;
  pointer-events: none;
}

.book-panel.is-open {
  margin-top: 1.15rem;
  max-height: 40rem;
  opacity: 1;
  pointer-events: auto;
}

.shelf-detail-list {
  max-width: none;
  margin: 0;
}

/* —— writing —— */

.writing-list {
  list-style: none;
  max-width: var(--content-width);
  margin: 0 auto;
}

.writing-item {
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: none;
}

.writing-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.68rem;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

.writing-item__badge {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.62rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: transparent;
}

.writing-item__badge--hosted {
  color: var(--olive);
  border-color: rgba(92, 110, 79, 0.4);
}

.writing-item__badge--external {
  color: var(--leather);
  border-color: var(--rule);
}

.writing-item__badge--external::after {
  content: ' ↗';
  font-size: 0.55rem;
}

.writing-item__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.writing-item__title a {
  color: var(--text);
  text-decoration: none;
}

.writing-item__title a:hover {
  color: var(--olive);
  text-decoration: underline;
  text-decoration-color: var(--leather);
}

.writing-item__excerpt {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.65;
}

/* —— contact —— */

.contact-block {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

.contact-block .lead {
  margin-bottom: 1.75rem;
}

.contact-links {
  list-style: none;
  text-align: left;
}

.contact-links li {
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 2px;
  border-radius: var(--radius);
  padding: 0.9rem 1.15rem 0.9rem 1.35rem;
  margin-bottom: 0.65rem;
  position: relative;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9375rem;
  box-shadow: none;
}

.contact-links li::before {
  content: '—';
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--burgundy);
  opacity: 0.5;
  width: auto;
  height: auto;
  background: none;
}

.contact-links a {
  font-weight: 500;
  color: var(--olive);
  text-decoration: none;
}

.contact-links a:hover {
  color: var(--burgundy);
  text-decoration: underline;
  text-decoration-color: var(--leather);
}

/* —— post pages —— */

.article-header {
  max-width: var(--content-width);
  margin: 0 auto 1.5rem;
  text-align: center;
}

.article-meta {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.68rem;
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.article-body {
  max-width: var(--content-width);
  margin: 0 auto;
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 3px;
  border-radius: var(--radius);
  padding: 2.25rem 1.35rem 1.5rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9375rem;
  color: var(--text-soft);
  line-height: 1.75;
  box-shadow: none;
}

.article-meta--date {
  position: absolute;
  top: 1.15rem;
  right: 1.35rem;
  margin: 0;
  text-align: right;
}

.article-body p + p {
  margin-top: 0.85rem;
}

.article-body blockquote {
  margin: 1.25rem 0 1.25rem 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  font-style: italic;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.article-body blockquote p + p {
  margin-top: 0.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.75rem;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.back-link::before {
  content: '←';
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-variant: normal;
  color: var(--leather);
  width: auto;
  height: auto;
  background: none;
}

.back-link:hover {
  color: var(--olive);
  text-decoration: underline;
  text-decoration-color: var(--leather);
}

/* —— footer —— */

.site-footer {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem) 2.5rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.75rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  padding-top: 1.25rem;
}

.site-footer a {
  color: var(--olive);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  color: var(--burgundy);
  text-decoration: underline;
  text-decoration-color: var(--leather);
}

/* —— summer page —— */

.summer-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0;
  max-width: var(--page-width);
  margin: 0 auto;
  align-items: stretch;
}

.summer-ribbons {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.5rem 0.35rem 2rem 0;
  align-items: flex-end;
}

.summer-ribbon {
  position: relative;
  width: 2.85rem;
  min-height: 5.75rem;
  padding: 0.85rem 0.4rem 1.35rem;
  border: none;
  cursor: pointer;
  color: var(--paper);
  background: var(--olive);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 50% 100%, 0 calc(100% - 14px));
  box-shadow: 1px 2px 6px rgba(46, 36, 25, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
  transform-origin: right center;
}

.summer-ribbon--olive {
  background: var(--olive);
}

.summer-ribbon--burgundy {
  background: var(--burgundy);
}

.summer-ribbon:nth-child(1) {
  transform: translateX(-0.1rem) rotate(-2.5deg);
  margin-top: 0.25rem;
}

.summer-ribbon:nth-child(2) {
  transform: translateX(-0.35rem) rotate(1.75deg);
  margin-top: -0.15rem;
}

.summer-ribbon:nth-child(3) {
  transform: translateX(-0.05rem) rotate(-1.25deg);
  margin-top: 0.35rem;
}

.summer-ribbon.is-active {
  transform: translateX(0.45rem) rotate(0deg);
  box-shadow: 3px 3px 10px rgba(46, 36, 25, 0.18);
  z-index: 2;
}

.summer-ribbon:nth-child(1).is-active {
  transform: translateX(0.45rem) rotate(-1deg);
}

.summer-ribbon:nth-child(2).is-active {
  transform: translateX(0.5rem) rotate(0.5deg);
}

.summer-ribbon:nth-child(3).is-active {
  transform: translateX(0.4rem) rotate(-0.5deg);
}

.summer-ribbon:hover:not(.is-active) {
  opacity: 0.9;
  transform: translateX(0.15rem);
}

.summer-ribbon__label {
  display: block;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.72rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  margin: 0 auto;
  line-height: 1;
}

.summer-panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule-light);
  outline-offset: 3px;
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.75rem;
  min-height: 18rem;
}

.summer-month {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.summer-month.is-active {
  opacity: 1;
}

.summer-month[hidden] {
  display: none;
}

.summer-month__title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.72rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.18em;
  color: var(--leather);
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule-light);
}

.summer-list {
  max-width: none;
  margin: 0;
}

.summer-entry {
  grid-template-columns: 1fr;
}

.summer-entry .experience-item__note {
  grid-column: 1;
}

.page-intro .see-all {
  display: inline-block;
  margin-top: 0.75rem;
}

/* —— responsive —— */

@media (max-width: 820px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .home-portrait {
    justify-self: center;
  }

  .home-sidebar {
    grid-column: auto;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .experience-columns {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .book-spine {
    width: 3.85rem;
  }

  .book-spine--h1 { height: 13.5rem; }
  .book-spine--h2 { height: 15.25rem; }
  .book-spine--h3 { height: 12.25rem; }
  .book-spine--h4 { height: 14.4rem; }
  .book-spine--h5 { height: 11.75rem; }

  .book-shelf__row {
    min-height: 16rem;
  }

  .shelves-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .shelves-divider {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0;
    gap: 0.85rem;
  }

  .shelves-divider__post {
    flex: 1;
    width: auto;
    height: 3px;
    min-height: 0;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--leather) 12%,
      var(--gold) 50%,
      var(--leather) 88%,
      transparent 100%
    );
  }

  .summer-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .summer-ribbons {
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
    gap: 0.65rem;
    padding: 0 0 1.25rem;
  }

  .summer-ribbon {
    width: auto;
    min-width: 4.75rem;
    min-height: auto;
    height: 2.65rem;
    padding: 0.45rem 0.85rem 0.95rem;
    transform: none;
    margin-top: 0;
  }

  .summer-ribbon:nth-child(1),
  .summer-ribbon:nth-child(2),
  .summer-ribbon:nth-child(3) {
    transform: rotate(-1.5deg);
    margin-top: 0;
  }

  .summer-ribbon:nth-child(2) {
    transform: rotate(1.25deg);
    margin-top: 0.15rem;
  }

  .summer-ribbon:nth-child(3) {
    transform: rotate(-0.75deg);
  }

  .summer-ribbon.is-active,
  .summer-ribbon:nth-child(1).is-active,
  .summer-ribbon:nth-child(2).is-active,
  .summer-ribbon:nth-child(3).is-active {
    transform: translateY(0.2rem) rotate(0deg);
    box-shadow: 2px 4px 10px rgba(46, 36, 25, 0.16);
  }

  .summer-ribbon:hover:not(.is-active) {
    transform: translateY(0.1rem);
  }

  .summer-ribbon__label {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .summer-panel {
    min-height: auto;
  }

  .scroll-ribbon {
    right: 0.35rem;
    width: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .theme-toggle,
  .scroll-ribbon__mark {
    transition: none;
  }
}

@media (max-width: 540px) {
  .home-sidebar {
    grid-template-columns: 1fr;
  }

  .experience-item {
    grid-template-columns: 1fr;
  }

  .experience-item__dates {
    justify-self: start;
  }
}
