/* ============================================================================
   Alexander Sousa — portfolio
   Plain and quiet: small type, generous white space, almost no chrome.
   The project screenshots carry the visual weight; the page stays out of the way.
   ========================================================================= */

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
/* height:auto is load-bearing — without it the width/height attributes win and
   aspect-ratio is ignored, which stretches images. */
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* --- Tokens --------------------------------------------------------------- */
:root {
  --paper:        #FFFFFF;
  --paper-sunk:   #F7F6F3;
  --ink:          #23262B;
  --ink-soft:     #55595F;
  --ink-muted:    #85898F;
  --rule:         #E6E4DE;
  --accent:       #8C3A2B;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wide:    920px;
  --measure: 34rem;
  --gutter:  clamp(1.25rem, 5vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #17181B;
    --paper-sunk: #1E2023;
    --ink:        #E7E4DD;
    --ink-soft:   #AFACA5;
    --ink-muted:  #85827B;
    --rule:       #2C2E32;
    --accent:     #D58B6F;
  }
}
:root[data-theme="dark"] {
  --paper:      #17181B;
  --paper-sunk: #1E2023;
  --ink:        #E7E4DD;
  --ink-soft:   #AFACA5;
  --ink-muted:  #85827B;
  --rule:       #2C2E32;
  --accent:     #D58B6F;
}

/* --- Base ----------------------------------------------------------------- */
body {
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.25;
  color: var(--accent);
  letter-spacing: -0.01em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.0625rem; }

p + p { margin-top: 1rem; }

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

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

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 200; }

.rule { border: 0; border-top: 1px solid var(--rule); margin-block: clamp(2.5rem, 6vw, 4rem); }

/* --- Header --------------------------------------------------------------- */
.site-header { padding-block: 1.5rem; }
.site-header__inner { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: baseline; justify-content: space-between; }
.brand { font-family: var(--serif); font-size: 1rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.brand:hover { color: var(--accent); }

.nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.nav a { font-size: .8125rem; color: var(--ink-soft); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* --- Hero: photo left, words right ---------------------------------------- */
.hero { padding-block: clamp(1.5rem, 4vw, 3rem) 0; }
.hero__grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 720px) { .hero__grid { grid-template-columns: 15rem minmax(0, 1fr); } }

.portrait img { width: 100%; aspect-ratio: 1 / 1.12; object-fit: cover; border-radius: 2px; }
@media (max-width: 719px) { .portrait { max-width: 11rem; } }

.hero h1 { margin-bottom: 1rem; }
.hero__body { max-width: var(--measure); }

/* --- Labelled list ("Find my work") --------------------------------------- */
.find { margin-top: 2.25rem; }
.find h2 { margin-bottom: 1rem; }
.find__item + .find__item { margin-top: 1.1rem; }
.find__label { font-weight: 600; color: var(--ink); font-size: .875rem; }
.find__text { font-size: .875rem; }

/* --- Section heads -------------------------------------------------------- */
.section { padding-block: clamp(1rem, 3vw, 2rem); }
.section__head { text-align: center; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section__head p { font-size: .8125rem; color: var(--ink-muted); margin-top: .5rem; }
.section__head--left { text-align: left; }

/* --- Image cards ---------------------------------------------------------- */
.cards { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 660px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card__media { border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; background: var(--paper-sunk); }
.card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; transition: opacity .2s ease; }
.card:hover .card__media img { opacity: .88; }

.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: .9rem; }
.card__title { font-family: var(--sans); font-size: .9375rem; font-weight: 500; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.card:hover .card__title { text-decoration-thickness: 2px; }
.card__arrow { color: var(--ink-muted); flex: none; }
.card__text { font-size: .8125rem; color: var(--ink-muted); margin-top: .3rem; line-height: 1.6; }
.card { display: block; text-decoration: none; }

/* --- Plain project list --------------------------------------------------- */
.list { border-top: 1px solid var(--rule); }
.list__row {
  display: grid; gap: .15rem .75rem; padding: .95rem 0;
  border-bottom: 1px solid var(--rule); text-decoration: none;
  grid-template-columns: minmax(0, 1fr) auto;
}
.list__row:hover .list__title { text-decoration-thickness: 2px; }
.list__title { font-size: .875rem; font-weight: 500; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.list__text { font-size: .8125rem; color: var(--ink-muted); grid-column: 1 / -1; line-height: 1.6; }
.status { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; }
.status--live { color: var(--accent); }

/* --- About / contact ------------------------------------------------------ */
.prose { max-width: var(--measure); }
.contact__list { margin-top: 1.25rem; }
.contact__list li + li { margin-top: .55rem; }
.contact__list .k { font-weight: 600; color: var(--ink); font-size: .875rem; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule); margin-top: clamp(3rem, 7vw, 5rem); padding-block: 1.75rem 3rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; }
.site-footer p, .site-footer a { font-size: .78rem; color: var(--ink-muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* --- Case study ----------------------------------------------------------- */
.back { display: inline-block; font-size: .8125rem; color: var(--ink-muted); text-decoration: none; margin-bottom: 1.75rem; }
.back:hover { color: var(--accent); text-decoration: underline; }

.case-hero { padding-block: clamp(1.5rem, 4vw, 2.5rem) 0; }
.case-hero__eyebrow { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .75rem; }
.case-hero h1 { margin-bottom: .5rem; }
.case-hero__sub { font-size: .875rem; color: var(--ink-muted); }
.case-hero__tag { margin-top: 1rem; max-width: var(--measure); }
.case-hero__actions { margin-top: 1.5rem; }

.linkout { font-size: .875rem; }

.meta { display: grid; gap: 1rem 2rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin-top: 2rem; padding-block: 1.25rem; border-block: 1px solid var(--rule); }
.meta dt { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .2rem; }
.meta dd { font-size: .8125rem; color: var(--ink); line-height: 1.55; }

.shot { margin-top: 2rem; }
.shot img { width: 100%; border: 1px solid var(--rule); border-radius: 2px; }
.shot figcaption { font-size: .75rem; color: var(--ink-muted); margin-top: .55rem; }

.figs { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2rem; }
.fig__v { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); line-height: 1.1; }
.fig__l { font-size: .75rem; color: var(--ink-muted); margin-top: .25rem; max-width: 11rem; line-height: 1.45; }

.case-section { margin-top: clamp(2rem, 5vw, 3rem); }
.case-section h2 { font-size: 1.25rem; margin-bottom: .9rem; }
.case-body { max-width: var(--measure); }

.subcards { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); margin-top: 1.5rem; max-width: var(--measure); }
.subcard h3 { font-family: var(--sans); font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }
.subcard p { font-size: .8125rem; }

.limits { max-width: var(--measure); }
.limits li { position: relative; padding-left: 1.1rem; font-size: .875rem; }
.limits li + li { margin-top: .7rem; }
.limits li::before { content: "—"; position: absolute; left: 0; color: var(--ink-muted); }

.pager { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.pager span { display: block; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .2rem; }
.pager a { font-size: .875rem; }

/* --- Motion / print ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .pager { display: none; }
  body { background: #fff; color: #000; }
}
