/* =========================================================
   Austin Ulrigg — site design system
   Cool / mathematical palette · glass cards · per-page gradients
   Fonts: Fraunces (display) + Inter Tight (body)
   ========================================================= */

:root {
  --ink: #16183a;          /* deep cool ink for text */
  --ink-soft: rgba(22, 24, 58, 0.78);
  --ink-faint: rgba(22, 24, 58, 0.55);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --glass-border: rgba(255, 255, 255, 0.72);
  --shadow: 0 16px 34px rgba(18, 22, 60, 0.16);
  --maxw: 1280px;
  --accent: #4338ca;       /* default accent, overridden per page */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 17px;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #d8dcff 0%, #cdd6ff 40%, #c2ecf4 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* ---- Per-page cool gradients + accent (stronger, slightly deeper) ---- */
body.theme-about    { background: linear-gradient(135deg, #d8dcff 0%, #cdd6ff 45%, #c2ecf4 100%); --accent:#4338ca; }
body.theme-research { background: linear-gradient(135deg, #c9ddff 0%, #bcd6ff 40%, #b3e9fb 100%); --accent:#1d4ed8; }
body.theme-writing  { background: linear-gradient(135deg, #ddd3ff 0%, #d0c9ff 45%, #c6dcff 100%); --accent:#6d28d9; }
body.theme-teaching { background: linear-gradient(135deg, #c6ecff 0%, #c0efe9 50%, #c8f2da 100%); --accent:#0f766e; }
body.theme-tutoring { background: linear-gradient(135deg, #cce4ff 0%, #bfddff 45%, #b6ecff 100%); --accent:#1d6fb8; }
body.theme-cv       { background: linear-gradient(135deg, #d6deec 0%, #ccd6e6 45%, #c3d2e6 100%); --accent:#2f4d78; }
body.theme-lab      { background: linear-gradient(135deg, #d2ccff 0%, #c2cbff 40%, #b6e6ff 100%); --accent:#4f29d6; }

/* ---- Layout shell ---- */
.page { max-width: var(--maxw); margin: 0 auto; }

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px 36px;
}

.brand {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { opacity: 0.8; }

/* ---- Nav (multipage: real links, pill on the active one) ---- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
}

.tab {
  font-family: 'Inter Tight', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--ink-faint);
  transition: color 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  color: var(--accent);
  background: #fff;
  box-shadow: 0 2px 8px rgba(18, 22, 60, 0.12);
}

/* ---- Main content ---- */
.main { padding: 36px 36px 100px; }

.kicker {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.headline {
  font-family: 'Fraunces', serif;
  font-size: clamp(42px, 8vw, 80px);
  font-weight: 500; line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 22px; max-width: 18ch;
}

.blurb {
  font-size: 21px; line-height: 1.65;
  max-width: 74ch; color: var(--ink-soft);
  margin: 0 0 40px;
}

/* ---- Hero (About) ---- */
.hero {
  display: flex; gap: 38px; align-items: flex-start;
  flex-wrap: wrap; margin-bottom: 30px;
}
.hero-photo {
  width: 188px; height: 188px; border-radius: 50%;
  flex-shrink: 0;
  background-image: url('../images/prof_pic_color.png');
  background-size: 112%;
  background-position: 46% 42%;
  background-repeat: no-repeat;
  background-color: #fff;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.hero-text { flex: 1; min-width: 280px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--ink);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--glass-strong); box-shadow: var(--shadow); }
.btn--primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn--primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 0; }

/* ---- Cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}
.card {
  position: relative; padding: 26px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  min-height: 150px;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  animation: cardIn 0.5s ease both;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
a.card { cursor: pointer; }
a.card:hover { transform: translateY(-4px); background: var(--glass-strong); box-shadow: var(--shadow); }
.card-tag {
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 10px;
}
.card-title {
  font-family: 'Fraunces', serif;
  font-size: 24px; font-weight: 500; margin-bottom: 8px;
}
.card-body { font-size: 16.5px; line-height: 1.5; color: var(--ink-soft); }
.card-arrow {
  position: absolute; right: 22px; bottom: 22px; font-size: 18px;
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
a.card:hover .card-arrow { opacity: 0.7; transform: translateX(0); }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Vertical "lead" card — narrow column (e.g. tutoring on About) */
.card--lead { max-width: 340px; min-height: 200px; }

/* ---- Section headings within a page ---- */
.section-head {
  font-family: 'Fraunces', serif;
  font-size: 30px; font-weight: 500;
  letter-spacing: -0.01em;
  margin: 46px 0 18px;
}

/* ---- Prose / detail body ---- */
.prose { max-width: 84ch; }
.prose h2 { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 500; margin: 40px 0 14px; }
.prose h3 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 500; margin: 28px 0 10px; }
.prose p, .prose li { font-size: 19px; line-height: 1.7; color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Numbered values list (About) ---- */
.values { counter-reset: v; list-style: none; padding: 0; max-width: 76ch; }
.values li {
  position: relative; padding: 18px 18px 18px 60px; margin-bottom: 12px;
  border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px); font-size: 17.5px; line-height: 1.55; color: var(--ink-soft);
}
.values li::before {
  counter-increment: v; content: counter(v);
  position: absolute; left: 18px; top: 18px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
}

/* ---- Links list (social etc.) ---- */
.linklist { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.linklist a {
  font-size: 15px; text-decoration: none; color: var(--ink-soft);
  padding: 7px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(8px);
  transition: color 0.2s ease, transform 0.2s ease;
}
.linklist a:hover { color: var(--accent); transform: translateY(-2px); }

/* ---- Back link ---- */
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-soft);
  padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, transform 0.25s ease; margin-bottom: 8px;
}
.back-link:hover { transform: translateX(-3px); color: var(--accent); }

/* ---- Footer ---- */
.footer {
  padding: 30px 36px 50px; color: var(--ink-faint); font-size: 15px;
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---- Placeholder banner (stub pages) ---- */
.stub-note {
  display: inline-block; font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
  background: var(--accent); color: #fff; margin-bottom: 20px;
}

/* ---- Subject panels (tutoring) ---- */
.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; margin: 8px 0 0;
}
.panel {
  padding: 22px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
.panel h3 { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 500; margin: 0 0 8px; }
.panel p { font-size: 16px; line-height: 1.55; color: var(--ink-soft); margin: 0; }

/* ---- Rates list ---- */
.rates { list-style: none; padding: 0; margin: 8px 0 0; max-width: 60ch; }
.rates li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 18px; margin-bottom: 10px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(8px);
  font-size: 16.5px; color: var(--ink-soft);
}
.rates li strong { color: var(--ink); white-space: nowrap; }

/* ---- Numbered steps (how it works) ---- */
.steps { counter-reset: s; list-style: none; padding: 0; max-width: 70ch; margin: 8px 0 0; }
.steps li {
  position: relative; padding: 4px 0 4px 44px; margin-bottom: 14px;
  font-size: 17px; line-height: 1.55; color: var(--ink-soft);
}
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
}

/* ---- Form ---- */
.form {
  display: grid; gap: 16px; max-width: 560px; margin: 12px 0 0;
  padding: 26px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(10px);
}
.form label { display: grid; gap: 6px; font-size: 14.5px; font-weight: 500; color: var(--ink-soft); }
.form input, .form textarea {
  font-family: 'Inter Tight', sans-serif; font-size: 16px;
  padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.75);
  color: var(--ink); width: 100%;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form button { justify-self: start; margin-top: 4px; }

/* ---- Figure / image with caption ---- */
.figure { margin: 26px 0 0; max-width: 900px; }
.figure img { width: 100%; display: block; border-radius: 16px; border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.figure figcaption { margin-top: 12px; font-size: 15px; line-height: 1.5; color: var(--ink-faint); }

/* ---- Accessibility ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .header { padding: 22px 24px; }
  .main { padding: 30px 24px 90px; }
  .footer { padding: 26px 24px 44px; }
}
@media (max-width: 720px) {
  .header { padding: 18px 20px; gap: 14px; }
  .brand { font-size: 21px; }
  .tabs { width: 100%; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .main { padding: 22px 20px 80px; }
  .footer { padding: 22px 20px 40px; }
  .hero { gap: 24px; }
  .hero-photo { width: 132px; height: 132px; }
  .blurb { font-size: 19px; }
  .section-head { font-size: 26px; margin: 38px 0 16px; }
  .prose p, .prose li { font-size: 17.5px; }
  .rates li { flex-wrap: wrap; }
  iframe { height: 70vh !important; }
}
@media (max-width: 460px) {
  .headline { font-size: clamp(34px, 11vw, 44px); }
  .tab { padding: 7px 14px; font-size: 14px; }
}

/* =========================================================
   Comics — hybrid funny-pages styling on the cool palette
   ========================================================= */
body.theme-comics { background: linear-gradient(135deg, #edeef3 0%, #e7eaf0 50%, #e9eef2 100%); --accent:#26294d; }

.comics-masthead {
  text-align: center; margin: 6px 0 30px;
  border-top: 3px double var(--ink); border-bottom: 3px double var(--ink);
  padding: 10px 0 8px;
}
.comics-masthead h1 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(46px, 9vw, 92px); letter-spacing: 0.01em;
  line-height: 1; margin: 6px 0 8px;
}
.comics-dateline {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 6px;
}

/* Section rule headings ("Sunday Edition", "Daily Strips") */
.comics-rule { display: flex; align-items: center; gap: 16px; margin: 8px 0 18px; }
.comics-rule::before, .comics-rule::after { content: ""; flex: 1; height: 1px; background: rgba(22,24,58,0.4); }
.comics-rule h2 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 23px; white-space: nowrap; margin: 0; }
.comics-rule .hint { font-family: 'Inter Tight', sans-serif; font-weight: 400; font-size: 13px; color: var(--ink-faint); text-transform: none; letter-spacing: 0; white-space: nowrap; }

/* A strip "clipping" */
.strip {
  background: #fbfbf8; border: 1px solid var(--ink); border-radius: 2px;
  padding: 16px 16px 18px; box-shadow: 0 10px 26px rgba(20,24,60,0.12);
}
.strip-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid rgba(22,24,58,0.2); padding-bottom: 8px; margin-bottom: 12px;
}
.strip-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 21px; color: var(--ink); line-height: 1.15; }
.strip-meta { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.strip-byline { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.strip-tag { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; }
.strip-tag.sunday { background: var(--accent); color: #fff; }
.strip-tag.daily { background: rgba(22,24,58,0.09); color: var(--ink-soft); }
.strip img { width: 100%; display: block; border: 1px solid rgba(22,24,58,0.28); }
.strip-caption { font-family: 'Fraunces', serif; font-style: italic; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); margin: 11px 2px 0; }

/* Sunday features: large, full color, stacked in a centered column */
.comics-feature { max-width: 860px; margin: 0 auto 8px; display: flex; flex-direction: column; gap: 28px; }

/* Daily strips: smaller grid, grayscale, restore color on hover */
.comics-daily-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.strip.daily .strip-title { font-size: 19px; }
.strip.daily img { filter: grayscale(100%) contrast(1.04); transition: filter 0.45s ease; }
.strip.daily:hover img { filter: grayscale(0%) contrast(1); }

@media (max-width: 460px) {
  .comics-daily-grid { grid-template-columns: 1fr; }
}

/* Comics: caption foot under each strip */
.strip-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.strip-foot .strip-meta { gap: 8px; }
.strip-foot .strip-caption { margin: 0 2px; }
