/* sbhagat.com: one page, no scripts, no external requests.
   Dark only: his choice, 2026-10-13 ("I love the dark look ... it's so me").
   Font: TeX Gyre Pagella (GUST Font License, a free Palatino re-creation), served from this
   site so every device shows the same face. Subset to Latin, woff2, ~67 KB for all three. */
@font-face {
  font-family: "Pagella";
  src: url("assets/fonts/pagella-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pagella";
  src: url("assets/fonts/pagella-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Pagella";
  src: url("assets/fonts/pagella-bold.woff2") format("woff2");
  font-weight: 600 700; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #15171a;
  --ink: #e9e5dd;
  --muted: #a39d93;
  --rule: #2c3036;
  --accent: #9fb9db;
  --serif: "Pagella", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.65;
}

/* Phone first: photo on top, text below. */
.portrait { margin: 0; }
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 20%;
}

.text {
  padding: 2.5rem 1.25rem 0;
  display: flex;
  flex-direction: column;
}
article { max-width: 34rem; }

h1 {
  margin: 0 0 1.25rem;
  font-weight: 600;
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin-top: 1rem;
  background: var(--accent);
}

p { margin: 0 0 1.1rem; }
.lede { font-style: italic; color: var(--muted); }
.tagline {
  margin: -0.25rem 0 2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.opening { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.25rem; }
.contact { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.closing { margin-top: 2rem; font-style: italic; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover, a:focus-visible { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

footer {
  padding: 2.5rem 0 2.25rem;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* The not-found page: one centred column, nothing else. */
main.notfound {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  text-align: center;
}
main.notfound h1::after { margin-left: auto; margin-right: auto; }

/* Desktop: photo left, text right, the pair centred on the page and sized to fit one screen
   without scrolling (his ask, 2026-10-13). Type scales with the window's HEIGHT, so a shorter
   screen gets slightly smaller text rather than a scrollbar. The photo keeps its own shape. */
@media (min-width: 900px) {
  body {
    display: flex;
    align-items: center;
    min-height: 100vh;
    font-size: clamp(14px, 1.72vh, 19px);
    line-height: 1.58;
  }
  main {
    width: 100%;
    max-width: 82rem;
    margin: 0 auto;
    padding: 2vh clamp(2rem, 4vw, 4rem);
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(2.5rem, 4.5vw, 4.5rem);
    align-items: center;
  }
  .portrait img {
    aspect-ratio: 896 / 1088;
    height: auto;
    max-height: 82vh;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 12px 40px -12px rgb(0 0 0 / .6);
  }
  .text { padding: 0; }
  article { max-width: 37em; }
  h1 { font-size: 2.6em; margin-bottom: 0.9em; }
  .tagline { margin-bottom: 1.4em; }
  .opening { font-size: 1.35em; margin-bottom: 0.8em; }
  p { margin-bottom: 0.9em; }
  .contact { margin-top: 1.4em; padding-top: 1em; }
  .closing { margin-top: 1.2em; margin-bottom: 0; }
  .text footer { padding: 1.6em 0 0; }
}
