/* ==========================================================================
   jontymale.com — dark academia
   Black and mahogany, white text. Layout follows a minimal academic
   homepage: wordmark + nav, portrait + bio, research cards, CV, footer.
   ========================================================================== */

/* Fonts — self-hosted, SIL Open Font License (see assets/fonts/OFL-*.txt) */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/eb-garamond-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/eb-garamond-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/eb-garamond-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Tokens ------------------------------------------------------------------ */
:root {
  color-scheme: dark;

  /* Black and mahogany */
  --bg: #0c0908;
  --bg-glow: #1f0e0a;
  --mahogany: #5a2219;
  --mahogany-bright: #7a3527;
  --card-top: #421c15;
  --card-bottom: #33160f;
  --card-edge: #5a281e;
  --rule: #2e1c18;
  --rule-strong: #4a2820;

  /* Text */
  --text: #f6f1eb;
  --text-body: #ebe3db;
  --text-muted: #c2b4ab;
  --text-card: #d9cbc1;
  --text-faint: #93847c;
  --accent: #c98b74;   /* light mahogany: labels, dates, italic accents */

  /* Type */
  --font-display: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --font-body: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --measure: 62rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

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

html {
  background: var(--bg);
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% 0%, var(--bg-glow) 0%, rgba(12, 9, 8, 0) 65%) no-repeat,
    var(--bg);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  line-height: 1.85;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--mahogany-bright); color: #fff; }

a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--measure));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--mahogany);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 10;
}

.skip-link:focus { top: 1rem; }

/* Shared mono label style */
.label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.78rem;
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Header ------------------------------------------------------------------ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  flex-wrap: wrap;
  padding-block: clamp(2.5rem, 7vw, 4.75rem) clamp(1.75rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--rule-strong);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--text);
  text-decoration: none;
}

.wordmark em {
  font-style: italic;
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Intro ------------------------------------------------------------------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 5rem);
  align-items: start;
  padding-block: clamp(3.5rem, 8vw, 5.75rem);
}

.portrait { margin: 0; }

.portrait img,
.portrait-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9);
}

.portrait-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #4a1f17 0%, #2a120d 55%, #160a08 100%);
  border: 1px solid var(--card-edge);
}

.portrait-placeholder span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.85;
}

.portrait figcaption {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.intro h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.2vw, 2.9rem);
  line-height: 1.1;
  color: var(--text);
}

.tagline {
  margin: 0 0 2.1rem;
}

.tagline .sep {
  margin-inline: 0.55em;
  color: var(--text-faint);
}

.intro-text p:not(.tagline) {
  margin: 0 0 1.35rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.button:hover {
  background: var(--mahogany);
  border-color: var(--mahogany-bright);
  color: #fff;
}

/* Sections ---------------------------------------------------------------- */
.section {
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
  border-top: 1px solid var(--rule-strong);
}

.section > .label {
  margin: 0 0 2.25rem;
}

/* Research cards ---------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.65rem 1.8rem;
  background: linear-gradient(165deg, var(--card-top) 0%, var(--card-bottom) 100%);
  border: 1px solid var(--card-edge);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 36px -24px rgba(0, 0, 0, 0.85);
}

.card .label {
  margin: 0 0 0.9rem;
  font-size: 0.7rem;
}

.card h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--text);
}

.card p:not(.label) {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--text-card);
}

/* CV ---------------------------------------------------------------------- */
.cv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 7vw, 4.5rem);
}

.cv-grid h3 {
  margin: 0 0 1.85rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--text);
}

.cv-list {
  display: grid;
  gap: 1.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-list p { margin: 0; }

.cv-list .date {
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.cv-list .title {
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--text);
}

.cv-list .place {
  font-style: italic;
  font-size: 1.08rem;
  color: var(--text-muted);
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.site-footer p { margin: 0; }

/* 404 --------------------------------------------------------------------- */
.not-found {
  padding-block: clamp(4rem, 12vw, 8rem);
}

.not-found h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.1;
  color: var(--text);
}

.not-found p { margin: 0 0 2rem; }

/* Small screens ----------------------------------------------------------- */
@media (max-width: 760px) {
  body { font-size: 1.125rem; line-height: 1.8; }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .intro { grid-template-columns: minmax(0, 1fr); }

  .portrait { max-width: 14rem; }

  .cv-grid { grid-template-columns: minmax(0, 1fr); }
}
