/* tainnschoeman.com
   Layout follows the original site: a narrow column (portrait, name, links) beside the Info text.
   Type is borrowed from the reference template: one grotesque sans, an uppercase tightly
   tracked headline, small bold labels, a larger opening paragraph, and hairline rules. */

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --pink: #ff00fb;
  --blue: #0000ff; /* the blue of the portfolio slides */
  --ink: #111;
  --muted: #6b6b6b;
  --rule: #d9d9d9;
  --field: #f7f7f7;
  --paper: #fff;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover, a:focus-visible { color: var(--pink); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 0.75rem; }
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 10; }

/* ---------- Header ---------- */

.site-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.25rem 2rem 0;
  font-size: 0.8rem;
}
.site-header a { text-decoration: none; }
.site-header nav { display: flex; gap: 1.25rem; }

/* ---------- Home page ---------- */

.page {
  display: grid;
  grid-template-columns: 15rem minmax(0, 38rem);
  column-gap: 4rem;
  padding: 2.5rem 2rem 4rem;
}

.headshot { display: block; width: 9.5rem; height: 9.5rem; object-fit: cover; }

/* The template headline: uppercase, medium weight, tight tracking, tight leading. */
.name {
  margin: 1.75rem 0 1.5rem;
  color: var(--pink);
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

/* The template label/value rows: small text between hairline rules. */
.links { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.links li { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); font-size: 0.82rem; }
.links a { font-weight: 600; }
.links a.plain { font-weight: 400; color: var(--pink); text-decoration: none; overflow-wrap: anywhere; }
.links a.plain:hover { text-decoration: underline; }
.links a.quiet { font-weight: 400; text-decoration: none; }
.links a.quiet:hover { color: var(--pink); }
.hint { color: var(--pink); }
.quiet { color: var(--muted); }

/* The template section label: small and bold, over a black rule. */
.label {
  margin: 0 0 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.info p { margin: 0 0 1.1rem; font-size: 0.9rem; }
/* The template opening paragraph: a size up, tighter tracking. */
.info p.lede { font-size: 1.18rem; line-height: 1.35; letter-spacing: -0.012em; margin-bottom: 1.6rem; }
.info p:last-child { margin-bottom: 0; }

/* ---------- Home page colours ----------
   Left: a full-height blue ribbon with pink text and white links.
   Right: white page with the Info text in the same blue. */

body.home { background: var(--paper); color: var(--blue); }

/* One grid row: the ribbon in column 1; the photo and the Info text share column 2.
   The photo hugs the ribbon's edge at the top; the Info text is centred in the white area. */
body.home .page {
  grid-template-columns: 19rem minmax(0, 1fr);
  grid-template-rows: auto;
  column-gap: 0;
  padding: 0;
  min-height: 100vh;
}

body.home .side {
  grid-column: 1; grid-row: 1;
  background: var(--blue);
  color: var(--pink);
  padding: 2.5rem 2rem 3rem;
}
body.home .side .name { margin-top: 0; }
body.home .side a,
body.home .side .links a.plain,
body.home .side .links a.quiet { color: #fff; }
body.home .side a:hover,
body.home .side a:focus-visible,
body.home .side .links a.quiet:hover { color: var(--pink); }
body.home .side .hint,
body.home .side .quiet { color: var(--pink); }
body.home .side .links,
body.home .side .links li { border: 0; }
body.home .side .links li { padding: 0.45rem 0; }

body.home .headshot {
  grid-column: 2; grid-row: 1;
  justify-self: start; align-self: start;
  margin-top: 2.5rem;
}

/* The text column is 38rem; centred, it clears the photo on any screen 1264px or wider. */
body.home .info {
  grid-column: 2; grid-row: 1;
  justify-self: center;
  width: 100%;
  max-width: 38rem;
  padding: 2.5rem 0 4rem;
  color: var(--blue);
}
body.home .label { border-top: 0; padding-top: 0; }

/* Smaller laptops: not enough room to centre, so the text starts just past the photo. */
@media (min-width: 1024px) and (max-width: 1263px) {
  body.home .info { justify-self: start; margin-left: 12rem; margin-right: 2.5rem; width: auto; }
}

/* Tablets and phones: ribbon on top, the photo directly beneath it, then the Info text. */
@media (max-width: 1023px) {
  body.home .page { grid-template-columns: 1fr; }
  body.home .side,
  body.home .headshot,
  body.home .info { grid-column: 1; grid-row: auto; }
  body.home .side { padding: 1.5rem 1.25rem 1.75rem; }
  body.home .headshot { margin-top: 0; }
  body.home .info { justify-self: start; max-width: 38rem; padding: 2rem 1.25rem 3rem; }
}

/* ---------- Portfolio page ---------- */

.portfolio { padding: 1.5rem 2rem 2rem; }
.portfolio .name { margin: 0 0 1.25rem; }

.stage { display: grid; place-items: center; background: var(--field); }
.stage img { display: block; max-width: 100%; max-height: calc(100vh - 13rem); cursor: e-resize; user-select: none; }

.controls { display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; padding-top: 0.9rem; font-size: 0.8rem; }
.controls button {
  font: inherit; cursor: pointer;
  border: 1px solid var(--ink); background: #fff; color: var(--ink);
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
}
.controls button:hover { background: var(--pink); border-color: var(--pink); color: #fff; }
.controls .counter { min-width: 4.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.controls .spacer { flex: 1; }

#slideshow:fullscreen { background: #fff; display: grid; place-items: center; }
#slideshow:fullscreen .stage { background: #fff; width: 100%; height: 100%; }
#slideshow:fullscreen .stage img { max-height: 100vh; }
#slideshow:fullscreen .controls { display: none; }

/* ---------- Fullscreen slideshow opened from the home page ---------- */

html.viewer-open { overflow: hidden; }
.viewer {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: #fff;
}
.viewer-slide {
  display: block;
  max-width: 100vw; max-height: 100vh; max-height: 100dvh;
  cursor: e-resize; user-select: none; -webkit-user-select: none;
}
/* Only needed where the browser could not go fullscreen (no Escape key on a phone). */
.viewer-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--ink); background: #fff; color: var(--ink);
  font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.viewer-close:hover { background: var(--pink); border-color: var(--pink); color: #fff; }
.viewer.is-fullscreen .viewer-close { display: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .site-header { padding: 1rem 1rem 0; }
  .page { grid-template-columns: 1fr; row-gap: 2.5rem; padding: 1.75rem 1rem 3rem; }
  body.home .page { padding: 0; row-gap: 0; }
  body.home .side { padding: 1.25rem 1rem 1.5rem; }
  body.home .info { padding: 1.75rem 1rem 3rem; }
  .portfolio { padding: 1.25rem 1rem 2rem; }
  .stage img { max-height: 70vh; }
  .controls .quiet { display: none; }
}
