/* =========================================================
   Jesse Vecchione — personal site
   Editorial / maritime aesthetic
   ========================================================= */

:root {
  --ink:        #0b1d36;
  --ink-soft:   #1c2a45;
  --cream:      #f7f2e8;
  --cream-warm: #efe8d8;
  --paper:      #fbf8f1;
  --text:       #1d2433;
  --text-muted: #5b6271;
  --brass:      #b08d57;
  --brass-soft: #c9a978;
  --rule:       rgba(11, 29, 54, 0.14);
  --rule-soft:  rgba(11, 29, 54, 0.08);

  --serif: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --max:        1180px;
  --reading:    680px;
  --gutter:     clamp(1.25rem, 4vw, 3.5rem);
  --section-y:  clamp(4.5rem, 10vw, 8rem);

  --ease:       cubic-bezier(.22, .61, .36, 1);
}

/* -------- reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle paper texture via layered gradients */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(176,141,87,0.06), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(11,29,54,0.04), transparent 60%),
    var(--paper);
  pointer-events: none;
}

/* -------- top bar -------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  background: rgba(251, 248, 241, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.brand {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.4rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: .85rem;
  letter-spacing: .08em;
}
.nav {
  display: flex;
  gap: 1.6rem;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--brass); }

@media (max-width: 720px) {
  .nav { display: none; }
}

/* -------- shared typography -------- */
.eyebrow {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--brass);
  font-weight: 500;
  margin: 0 0 1.25rem;
}
.serif { font-family: var(--serif); font-weight: 400; }
em, .italic { font-style: italic; }

.h2 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: .96;
  letter-spacing: -.015em;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 32ch;
  margin: 0 0 1.25rem;
}
.meta {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  letter-spacing: .02em;
}

/* -------- hero -------- */
.hero {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule-soft);
}
.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero__portrait {
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
  background: var(--cream);
  box-shadow:
    0 1px 0 rgba(11, 29, 54, 0.05),
    0 30px 50px -30px rgba(11, 29, 54, 0.35);
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { order: -1; max-width: 360px; }
}

/* -------- buttons -------- */
.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.5rem;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover { background: var(--ink-soft); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* -------- sections -------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}
.section__head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 36ch; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  max-width: var(--max);
  margin: 0 auto;
  width: calc(100% - 2 * var(--gutter));
}

/* -------- prose -------- */
.prose {
  max-width: var(--reading);
  font-size: 1.05rem;
  line-height: 1.75;
}
.prose--wide { max-width: 780px; }
.prose p + p { margin-top: 1.2rem; }
.prose strong { color: var(--ink); font-weight: 500; }

.dropcap {
  font-family: var(--serif);
  float: left;
  font-size: 4.6rem;
  line-height: .85;
  padding: .3rem .55rem 0 0;
  color: var(--ink);
  font-weight: 500;
}

/* -------- portfolio grid -------- */
.portfolio {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.portfolio li {
  background: var(--paper);
  padding: 1.6rem 1.5rem;
}
.portfolio h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0 0 .4rem;
  line-height: 1.2;
}
.portfolio p {
  margin: 0;
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.amp { color: var(--brass); font-style: italic; }

/* -------- work inset photo -------- */
.work-inset {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  max-width: 760px;
}
.work-inset img {
  width: 100%;
  display: block;
  border-radius: 2px;
  border: 1px solid var(--rule);
}
.work-inset figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: .98rem;
  color: var(--text-muted);
  margin-top: .9rem;
  padding-left: 1rem;
  border-left: 2px solid var(--brass);
  line-height: 1.5;
}

/* -------- highlights -------- */
.highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5rem;
}
.highlights li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule-soft);
}
.highlights li:first-child { border-top: 0; padding-top: 0; }
.highlights__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--brass);
  line-height: 1;
}
.highlights h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0 0 .35rem;
}
.highlights p { margin: 0; color: var(--text-muted); }

@media (max-width: 540px) {
  .highlights li { grid-template-columns: 1fr; gap: .25rem; }
}

/* -------- writing & press -------- */
.press {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 5vw, 3.5rem);
}
.press__heading {
  font-family: var(--sans);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 500;
  color: var(--brass);
  margin: 0 0 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--rule);
}
.press__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .25rem;
}
.press__list a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule-soft);
  text-decoration: none;
  color: var(--ink);
  transition: color .2s var(--ease), padding-left .25s var(--ease);
}
.press__list a:hover {
  color: var(--brass);
  padding-left: .35rem;
}
.press__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.35;
}
.press__meta {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  white-space: nowrap;
}
@media (max-width: 540px) {
  .press__list a { grid-template-columns: 1fr; gap: .2rem; }
  .press__meta { white-space: normal; }
}

/* -------- tenets / perspective -------- */
.tenets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem 2.5rem;
}
.tenets article {
  padding: 1.75rem 0 0;
  border-top: 2px solid var(--ink);
}
.tenets h3 {
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 .8rem;
}
.tenets p { margin: 0; color: var(--text); }

/* -------- personal -------- */
.personal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) {
  .personal { grid-template-columns: 1fr; }
}
.interests {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.4rem;
  row-gap: 1rem;
}
.interests dt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.3;
}
.interests dd {
  margin: 0;
  color: var(--text-muted);
  font-size: .98rem;
  line-height: 1.55;
}
@media (max-width: 520px) {
  .interests { grid-template-columns: 1fr; row-gap: .15rem; }
  .interests dd { margin-bottom: .8rem; }
}

.personal__photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.personal__photos .photo {
  margin: 0;
  aspect-ratio: 4 / 3;
}
.personal__photos .photo:nth-child(1) { transform: translateY(0); }
.personal__photos .photo:nth-child(2) { transform: translateY(1.5rem); }
.personal__photos .photo:nth-child(3) { transform: translateY(-0.5rem); }
.personal__photos .photo:nth-child(4) { transform: translateY(1rem); }
.personal__photos .photo:nth-child(5) {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  transform: translateY(0.5rem);
  margin-top: 1rem;
}

/* per-image framing — keep faces in shot when cropped */
.personal__photos .photo:nth-child(2) img { object-position: 30% center; }
.personal__photos .photo:nth-child(3) img { object-position: center 35%; }
.personal__photos .photo:nth-child(4) img { object-position: center center; }
.personal__photos .photo:nth-child(5) img { object-position: 42% 30%; }

@media (max-width: 540px) {
  .personal__photos { grid-template-columns: 1fr; }
  .personal__photos .photo { transform: none !important; aspect-ratio: 4 / 3; margin-top: 0; }
}

/* -------- photo placeholders -------- */
.photo {
  margin: 0;
  background: var(--cream);
  border: 1px solid var(--rule);
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 4 / 5;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-placeholder {
  display: grid;
  place-content: center;
  text-align: center;
  aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(176,141,87,0.07) 12px 24px),
    var(--cream);
  border: 1px dashed var(--brass-soft);
  border-radius: 2px;
  padding: 1.5rem;
  color: var(--ink-soft);
}
.photo-placeholder--portrait { aspect-ratio: 3 / 4; }
.photo-placeholder__label {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  margin-bottom: .35rem;
}
.photo-placeholder__hint {
  display: block;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brass);
}

/* -------- contact -------- */
.section--contact { padding-bottom: clamp(4rem, 6vw, 6rem); }
.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.contact__card {
  display: block;
  background: var(--paper);
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  transition: background .25s var(--ease);
}
.contact__card:not(.contact__card--static):hover {
  background: var(--cream-warm);
}
.contact__label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--brass);
  margin-bottom: .4rem;
}
.contact__value {
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: .005em;
  word-break: break-word;
}

/* -------- footer -------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 2rem var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-muted);
}
.footer p { margin: 0; }
.footer__copy { font-family: var(--serif); font-style: italic; }

/* -------- reveal-on-scroll -------- */
.section--reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.section--reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .section--reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* -------- selection -------- */
::selection {
  background: var(--ink);
  color: var(--paper);
}
