/* ============================================================
   geoffholtzman.com
   Port of the existing Wix design. Colours, typefaces, and
   layout deliberately match the original site — this is a
   host migration, not a redesign. Values below were sampled
   from the live Wix pages.
   ============================================================ */
:root {
  --black:   #000000;
  --panel:   #191919;   /* hero and alternating card panels */
  --slate:   #607980;   /* the blue-grey band and card variant */
  --cyan:    #21b2f0;   /* section headings, primary accent */
  --blue:    #3d9be9;   /* links and secondary text */
  --magenta: #f135d5;   /* footer name, About heading — sampled from live Wix */
  --aqua:    #40fff0;   /* Syllabi page title, alternating course titles */
  --green:   #3ee98f;   /* "In peer-reviewed journals" sidebar label */
  --orange:  #ec9637;   /* "In popular press outlets" sidebar label */
  --dim:     #808080;   /* footer Creative Commons line */
  --white:   #ffffff;
  --grey:    #cccccc;

  --head: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Nunito Sans", "Avenir Next", Avenir, "Segoe UI", sans-serif;

  --wrap: 1100px;
  --gut: clamp(1.25rem, 5vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--cyan); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--cyan); color: var(--black); padding: .75rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--black); border-bottom: 1px solid #222;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem;
}
.wordmark {
  font-family: var(--head); font-size: 1.35rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--white); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--cyan); }

.nav-toggle {
  display: none; background: none; border: 1px solid #3a3a3a; border-radius: 2px;
  font-family: var(--body); font-size: .9375rem;
  padding: .6rem .9rem; color: var(--white); cursor: pointer; min-height: 44px;
}
.site-nav ul {
  display: flex; gap: clamp(.9rem, 2.2vw, 1.6rem);
  list-style: none; margin: 0; padding: 0;
}
.site-nav a {
  font-family: var(--body); font-size: 1.125rem; font-weight: 300;
  color: var(--white); text-decoration: none; padding: .35rem 0; display: inline-block;
}
.site-nav a:hover { color: var(--cyan); }
.site-nav a[aria-current="page"] { color: var(--cyan); }

@media (max-width: 46rem) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--panel); border-bottom: 1px solid #2a2a2a;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gut) 1rem; }
  .site-nav li + li { border-top: 1px solid #2a2a2a; }
  .site-nav a { padding: .95rem 0; width: 100%; }
}

/* ---------- hero ---------- */
.hero { background: var(--panel); padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero-inner {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
  justify-items: center; text-align: center;
}
@media (min-width: 52rem) {
  .hero-inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center; justify-items: center;
  }
}
.hero h1 {
  font-family: var(--head); font-weight: 400;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.625rem);
  line-height: 1.1; letter-spacing: .01em; text-transform: uppercase;
  color: var(--white); margin: 0;
}
.portrait img {
  width: clamp(200px, 30vw, 336px); height: clamp(200px, 30vw, 336px);
  border-radius: 50%; object-fit: cover; object-position: center 18%;
  background: var(--white);
}
.roles { list-style: none; margin: 0; padding: 0; }
.roles li {
  font-family: var(--body); font-weight: 300;
  font-size: clamp(1.15rem, 1rem + .5vw, 1.5rem);
  color: var(--cyan); line-height: 1.6;
}

/* ---------- bands ---------- */
.section { padding-block: clamp(2.75rem, 7vw, 4.5rem); }
.band-slate { background: var(--slate); }
.band-black { background: var(--black); }
.band-panel { background: var(--panel); }

.rule-slate { height: 26px; background: var(--slate); }

.section-head { text-align: center; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-title {
  font-family: var(--head); font-weight: 400;
  font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.5rem);
  text-transform: uppercase; letter-spacing: .015em; line-height: 1.2;
  color: var(--cyan); margin: 0 0 .5rem;
}
.band-slate .section-title { color: var(--white); }
.section-title.accent-aqua { color: var(--aqua); }
.page-syllabi .section-sub { font-weight: 700; }
.page-about .section-title {
  color: var(--magenta); text-transform: none; text-align: left;
  font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.375rem); margin-bottom: 1.25rem;
}
.page-about .prose { max-width: 50rem; }
.section-sub {
  font-size: clamp(1rem, .9rem + .55vw, 1.5rem); font-weight: 400;
  color: var(--white); margin: 0 auto; max-width: 46ch;
}

/* ---------- intro block (Who am I) ---------- */
.intro { background: var(--panel); padding: clamp(1.5rem, 4vw, 2.75rem); }
.intro .section-title { color: var(--cyan); text-align: left; }
.intro .prose { max-width: 68ch; }
.prose p { margin: 0 0 1.25rem; }
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; }

/* ---------- card grids ---------- */
.grid {
  display: grid; gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  align-items: stretch;
}
.card { display: flex; flex-direction: column; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body {
  flex: 1; padding: 1.5rem 1.25rem; text-align: center;
  display: flex; flex-direction: column; gap: .75rem;
}
.card-body h3 {
  font-family: var(--body); font-weight: 300; font-size: 1.125rem;
  line-height: 1.4; margin: 0;
}
.card-body h3 a { text-decoration: underline; }
.card-body p { margin: 0; font-size: .95rem; }
.card-body .foot { margin-top: auto; font-size: .9375rem; }

/* the three card treatments Wix alternates between */
.card-white { background: var(--white); color: var(--black); }
.card-white a { color: var(--blue); }
.card-slate { background: var(--slate); color: var(--white); }
.card-slate a { color: var(--cyan); }
.card-dark  { background: var(--panel); color: var(--white); }
.card-dark a { color: var(--blue); }

/* ---------- article rows ---------- */
.entries { list-style: none; margin: 0; padding: 0; }

/* Article groups: big colour-coded label in a left column, entries on the right.
   Matches the Wix /articles layout. */
.artgroup { display: grid; gap: clamp(1.25rem, 4vw, 3rem); }
@media (min-width: 52rem) {
  .artgroup { grid-template-columns: minmax(10rem, 15rem) 1fr; align-items: start; }
}
.artgroup-label {
  font-family: var(--head); font-weight: 400; line-height: 1.15;
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3rem);
  margin: 0;
}
.label-orange { color: var(--orange); }
.label-green  { color: var(--green); }

/* Popular-press entries carry a square thumbnail, as on Wix */
.entry-media { display: grid; grid-template-columns: auto 1fr; gap: clamp(.9rem, 2.5vw, 1.5rem); align-items: start; }
.entry-thumb { display: block; flex: none; }
.entry-thumb img {
  width: clamp(5rem, 8vw, 8.2rem); aspect-ratio: 1 / 1;
  object-fit: cover; display: block;
}
.entry { padding-block: 1.35rem; border-bottom: 1px solid #2b2b2b; text-align: left; }
.band-slate .entry { border-bottom-color: rgba(255,255,255,.28); }
.entry:last-child { border-bottom: 0; }
.entry h3 {
  font-family: var(--head); font-weight: 700;
  font-size: clamp(1.05rem, 1rem + .4vw, 1.5rem); line-height: 1.35;
  margin: 0 0 .4rem; color: var(--white);
}
.entry h3 a { color: var(--white); text-decoration: none; }
.entry h3 a:hover { color: var(--cyan); }
.entry .meta { margin: 0; font-size: .95rem; font-weight: 300; color: var(--grey); }
.entry .meta a { color: var(--blue); }

/* ---------- syllabus rows (image left/right, alternating) ---------- */
.syl { display: grid; gap: clamp(1rem, 3vw, 2.5rem); align-items: center; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
@media (min-width: 48rem) {
  .syl { grid-template-columns: 2.4fr 1fr; }
  /* flipped rows put the image on the right — the wide column has to move with it */
  .syl.flip { grid-template-columns: 1fr 2.4fr; }
  .syl.flip .syl-media { order: 2; }
  .syl.flip .syl-text  { order: 1; }
}
.syl-media img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.syl-text { text-align: left; }
.syl-text h3 {
  font-family: var(--head); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); line-height: 1.35;
  color: var(--cyan); margin: 0 0 .75rem;
}
.syl-text h3.accent-aqua { color: var(--aqua); }
.syl-text p { margin: 0 0 .5rem; font-size: .98rem; }
.syl-text .credit { color: var(--grey); font-size: .875rem; }

/* ---------- code section ---------- */
.code-band { text-align: center; }
.code-band .section-title { font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); color: var(--white); }
.code-band p { color: var(--cyan); font-size: 1.15rem; margin: 0 0 1.5rem; }

/* ---------- Substack feed ----------
   Mirrors the card grid the Wix RSS widget produced: a masonry of dark rounded
   cards, each with the publication avatar, date, a serif title and subtitle,
   and the post's cover image. The serif is the widget's, not the site's. */
.feed-status { text-align: center; color: var(--grey); padding: 1.5rem 0; }

.feed { --feed-cols: 3; display: grid; grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem; align-items: start; list-style: none; margin: 0; padding: 0; }
@media (max-width: 62rem) { .feed { --feed-cols: 2; grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 38rem) { .feed { --feed-cols: 1; grid-template-columns: 1fr; } }
.feed-col { display: flex; flex-direction: column; gap: 1.25rem; }

.postcard {
  background: #232323; border-radius: 14px; padding: 1.1rem 1.15rem 1.15rem;
  font-family: Georgia, "Times New Roman", Times, serif;
}
.pc-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.pc-avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: block; }
.pc-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pc-pub { font-weight: 700; font-size: .95rem; color: var(--white); }
.pc-date { font-size: .9rem; color: #a8a8a8; }
.pc-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 0 0 .4rem; }
.pc-title a { color: var(--white); text-decoration: none; }
.pc-title a:hover { color: var(--cyan); }
.pc-sub { margin: 0; font-size: 1rem; font-weight: 400; color: #d9d9d9; line-height: 1.45; }
.pc-media { display: block; margin-top: .9rem; }
.pc-media img { width: 100%; height: auto; border-radius: 10px; display: block; }

/* The Substack page title is the publication wordmark: serif, italic, mixed case */
.page-substack .section-title {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic; text-transform: none; font-weight: 400; letter-spacing: 0;
}
.page-substack .section-sub {
  font-family: Georgia, "Times New Roman", Times, serif; max-width: 80ch;
}

/* ---------- contact ---------- */
.contact-panel { background: var(--panel); padding: clamp(1.5rem, 5vw, 3.5rem); }
.contact-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 52rem) { .contact-grid { grid-template-columns: 1fr 1.4fr; align-items: center; } }
.contact-grid .section-title { text-align: center; margin: 0; }

.form { display: grid; gap: 1.15rem; }
.form-row { display: grid; gap: 1.15rem; }
@media (min-width: 34rem) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label {
  display: block; font-size: .95rem; font-weight: 300; color: var(--white); margin-bottom: .2rem;
}
.field input {
  width: 100%; font: inherit; font-size: 1rem; color: var(--white);
  background: transparent; border: 0; border-bottom: 1px solid #6e6e6e;
  padding: .5rem 0; min-height: 44px; border-radius: 0;
}
.field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--black);
  background: var(--white); border: 0; padding: .75rem; min-height: 9rem;
  resize: vertical; border-radius: 0;
}
.field input::placeholder { color: #8a8a8a; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn {
  font: inherit; font-size: 1rem; background: #d9d9d9; color: var(--black);
  border: 0; padding: .85rem 1.5rem; width: 100%; cursor: pointer; min-height: 44px;
}
.btn:hover { background: var(--cyan); }
.hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
.site-footer { background: var(--black); padding-block: 2.5rem; text-align: center; }
.footer-name {
  font-family: var(--head); font-size: 1.35rem; font-weight: 400;
  color: var(--magenta); margin: 0 0 .6rem;
}
.footer-note { font-family: var(--head); font-size: .95rem; font-weight: 300; color: var(--dim); margin: 0 auto 1rem; max-width: 62ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: center; list-style: none; margin: 0; padding: 0; }
.footer-links a { font-size: .95rem; color: var(--grey); text-decoration: none; padding: .5rem 0; display: inline-block; }
.footer-links a:hover { color: var(--cyan); }

/* ---------- touch target padding ----------
   Inline links inside dense lists are small by default; give them room on
   touch screens without changing how the page looks on desktop. */
@media (max-width: 46rem) and (pointer: coarse) {
  .entry .meta a,
  .card-body a,
  .syl-text a,
  .footer-links a { display: inline-block; padding-block: .35rem; }
  .entry { padding-block: 1.6rem; }
}
