/* Alex Morris — portfolio
   Plain CSS, no build step. Edit freely. */

:root {
  --ink: #000;
  --paper: #fff;
  --link: #0099ff;
  --gap: 10px;
  --grid-max: 1190px;
  --edge: 18px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
p { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -40px;
  background: var(--ink); color: var(--paper);
  padding: 8px 12px; z-index: 10;
}
.skip-link:focus { top: 8px; }

/* ---------- Work grid (home) ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  max-width: var(--grid-max);
  margin: 23px auto 0;
  padding: 0;
  list-style: none;
}

.grid > li { min-width: 0; }

.tile {
  display: block;
  position: relative;
  aspect-ratio: 390 / 169;
  overflow: hidden;
  background: #f2f2f2;
}

.tile img,
.tile video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile--text,
.tile--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  text-align: center;
  text-transform: uppercase;
}

.tile--logo img {
  width: auto;
  height: 40%;
  object-fit: contain;
}

/* ---------- Footer nav ---------- */

.site-nav {
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: 72px 0 80px;
}

.site-nav ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin: 0; padding: 0;
  list-style: none;
  text-align: center;
  text-transform: uppercase;
}

.site-nav a { padding: 6px 4px; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Centered text blocks (about / awards) ---------- */

.stack {
  text-align: center;
  text-transform: uppercase;
}

.stack h1,
.stack h2 {
  margin: 0 0 18px;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
}

.stack dl,
.stack ul { margin: 0; padding: 0; list-style: none; }

.stack dd { margin: 0; }

.stack .group { margin: 0 0 18px; }
.stack .group:last-child { margin-bottom: 0; }

.stack a { color: var(--link); }
.stack a:hover { text-decoration: underline; text-underline-offset: 3px; }

.keep-case { text-transform: none; }

/* About */

.about {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 16px 0;
}

.about h1 { margin-bottom: 0; }
.about .role { margin-bottom: 18px; }

/* Awards & press — staggered 3-column layout */

.press {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 var(--gap);
  max-width: var(--grid-max);
  margin: 23px auto 0;
}

.press__photo {
  margin: 0;
  width: 88%;
  aspect-ratio: 3 / 5;
  overflow: hidden;
}

.press__photo img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}

.press__text {
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

/* Awards and press stack in the middle column. The two photos are the same
   size: the left one is centred on the Awards list, the right one on Press.
   (The small margins offset the text blocks' uneven padding.) */
.press__text--awards { grid-column: 2; grid-row: 1; padding-top: 48px; }
.press__text--press  { grid-column: 2; grid-row: 2; padding-top: 32px; padding-bottom: 48px; }
.press__photo--1 { grid-column: 1; grid-row: 1; align-self: center; justify-self: start; margin-top: 24px; }
.press__photo--2 { grid-column: 3; grid-row: 2; align-self: center; justify-self: end; margin-bottom: 16px; }

/* 404 */

.not-found {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- Responsive ---------- */

@media (max-width: 1230px) {
  .grid,
  .press,
  .site-nav { margin-left: 20px; margin-right: 20px; }
}

/* Tablet: two-column grid */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); grid-auto-flow: row dense; }
  /* Stagger the name / logo / title cells so they zig-zag instead of stacking on the left */
  .grid > li:has(.tile--logo) { grid-column: 2; }
}

/* Touch devices: bigger tap targets */
@media (pointer: coarse), (max-width: 809px) {
  .site-nav a { display: inline-block; padding: 13px 10px; }
  .stack a { display: inline-block; padding: 3px 0; }
}

/* Phones and small tablets */
@media (max-width: 809px) {
  .site-nav { margin: 0 16px; padding: 48px 0 40px; }

  .about { min-height: 100svh; padding-top: 48px; }

  .press { display: block; margin: 16px 16px 0; }
  .press__photo { width: 100%; aspect-ratio: 4 / 5; max-width: 360px; margin: 0 auto; }
  .press__text { padding: 48px 0 64px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; margin: 16px 16px 0; gap: 8px; }
  .grid > li:has(.tile--logo) { grid-column: auto; }
  .tile--text,
  .tile--logo { aspect-ratio: auto; padding: 28px 0; }
  .tile--logo img { height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
