:root {
  /* Page background (inside the mat) */
  --bg: #908472;

  /* White type */
  --text: rgba(255,255,255,0.94);
  --muted: rgba(255,255,255,0.78);

  /* Lines */
  --rule: rgba(255,255,255,0.22);

  /* Panel */
  --panel: rgba(255,255,255,0.10);
  --panel-border: rgba(255,255,255,0.18);

  /* Layout */
  --max: 980px;

  /* Type */
  --serif: ui-serif, Garamond, "EB Garamond", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;

  /* Frame (white mat) */
  --frame: 16px;
  --frame-color: rgba(255,255,255,0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
}

/* Thick white mat */
body {
  min-height: 100svh;
  padding: var(--frame);
  background: #ffffff;

  font: 16.5px/1.75 var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* page fill behavior */
  display: flex;
  flex-direction: column;
}

/* Beige page background INSIDE the mat */
body::before{
  content:"";
  position: fixed;
  inset: var(--frame);
  background: var(--bg);
  pointer-events: none;
  z-index: -1;
}

/* Optional inner hairline at the mat edge */
body::after{
  content:"";
  position: fixed;
  inset: var(--frame);
  border: 1px solid var(--frame-color);
  pointer-events: none;
  z-index: 9999;
  border-radius: 2px;
}

/* Wrap + safe areas for iOS notch/home indicator */
.wrap{
  max-width: none;
  margin: 0;
  padding:
    18px
    calc(22px + env(safe-area-inset-right))
    18px
    calc(22px + env(safe-area-inset-left));
}

/* NAV: sticky + subtle blur, but NOT a box */
.nav{
  position: sticky;
  top: calc(var(--frame) + env(safe-area-inset-top));
  z-index: 50;

  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;

  padding: 10px 0 14px;
  margin: 0;

  border-bottom: 1px solid rgba(255,255,255,0.18);
  background: transparent;

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.brand{
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.links a{
  margin-left: 14px;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

.links a.active{
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.65);
  text-underline-offset: 4px;
}

/* Keep header/footer from stretching */
header.wrap, footer.wrap{ flex: 0 0 auto; }

/* Let main take remaining height */
main.wrap{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* PANEL fills the rest */
.panel{
  margin-top: 0;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: none;

  flex: 1 1 auto;
  min-height: 0; /* important for Safari */
}

/* inner container keeps typography centered even when panel is full-bleed */
.panel-inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 26px 14px;
}

.title{
  margin: 0 0 12px;
  font-size: 48px;
  line-height: 1.06;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.lede{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18.5px;
  max-width: 62ch;
}

/* stacked hierarchy */
.section{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.16);
}

/* Keep dividers between sections... */
.section{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.16);
}

/* ✅ ...but remove the divider directly above the painting
   (i.e., on the LAST section inside the panel-inner) */
.panel-inner .section:last-of-type{
  border-top: 1px solid rgba(255,255,255,0.16); /* keep the line above Email */
}

/* Remove the line that sits under Email (before the art) */
.panel-inner{
  padding-bottom: 8px; /* optional: tighten before art */
}
.panel-inner + .art{
  /* ensures no accidental rule appears before art */
  border-top: none;
}

h2{
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  font-weight: 650;
}

.meta{
  margin: 0;
  font-family: var(--sans);
  font-size: 13.5px;
  color: rgba(255,255,255,0.86);
  letter-spacing: 0.02em;
}

/* --- ART (lighter + centered + less bottom-heavy) --- */
.art{
  margin: 0;
  padding: 18px 22px 22px;
}

/* Center the artwork block and make it narrower than the panel */
.art-frame{
  width: min(760px, 100%);
  margin: 0 auto;

  background: rgba(255,255,255,0.08);
  padding: 10px; /* thinner mat */
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: none; /* no drop shadow */
}

/* image stays inside frame */
.art-img{
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 280px; /* key: reduce dominance */
  object-fit: cover;
  object-position: center 62%;
  border: 1px solid rgba(255,255,255,0.22);
}

/* caption aligned with the frame */
.art-cap{
  margin: 8px 0 0;
  padding: 0;
  text-align: center;

  font-family: var(--sans);
  font-size: 11.5px;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Links */
a{
  color: inherit;
  text-decoration-color: rgba(255,255,255,0.55);
  text-underline-offset: 3px;
}
a:hover{
  text-decoration-color: rgba(255,255,255,0.92);
}

/* Footer */
.footer{
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.18);
}

.foot{
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.78);
}

/* Responsive */
@media (max-width: 720px){
  :root { --frame: 22px; }
  .panel-inner{ padding: 22px 18px 14px; }
  .title{ font-size: 42px; }

  .art{ padding: 16px 18px 20px; }
  .art-img{ max-height: 240px; }
}

/* --- Influences page components --- */
.inf-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0 0;
  margin: 6px 0 18px;
  border-top: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.72);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.inf-bar__dots{
  letter-spacing: 0.28em;
  opacity: 0.7;
}

.influences{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.inf{
  padding: 16px 0 0;
  border-top: 1px solid rgba(255,255,255,0.16);
}

.inf:first-child{
  border-top: none;
  padding-top: 0;
}

.inf-head{
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.inf-tag{
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  font-weight: 650;
}

.inf-rule{
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.14);
  transform: translateY(-3px);
}

/* (If you remove “Aphorism/Maxim/etc” from HTML, this can stay harmless) */
.inf-meta{
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.68);
}

.inf-quote{
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255,255,255,0.90);
  max-width: 74ch;
}

@media (max-width: 720px){
  .inf-quote{ font-size: 16.5px; }
}

/* --- Publications page components (match Influences refinement) --- */
.pub-section{
  margin-top: 18px;
}

.pub-section__head{
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.16);
  margin-top: 18px;
}

.pub-section:first-of-type .pub-section__head{
  margin-top: 0;
}

.pub-section__tag{
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  font-weight: 650;
}

.pub-section__rule{
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.14);
  transform: translateY(-3px);
}

.pub-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.pub{
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.16);
}

.pub:first-child{
  border-top: none;
  padding-top: 0;
}

.pub-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.pub-title{
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
  max-width: 70ch;
}

.pub-title a{
  text-decoration: none;
}

.pub-title a:hover{
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.72);
  text-underline-offset: 3px;
}

.pub-date{
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.68);
  white-space: nowrap;
}

.pub-meta{
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.02em;
}

.pub-venue{
  color: rgba(255,255,255,0.90);
}

@media (max-width: 720px){
  .pub-head{ flex-direction: column; align-items: flex-start; gap: 6px; }
  .pub-date{ white-space: normal; }
  .pub-title{ font-size: 16.5px; }
}
