/* ===========================================================
   Austin Brod — site styles
   Edit colours, spacing and type in the :root block below.
   Everything else inherits from these values.
   =========================================================== */

:root {
  /* --- Colours (change these to restyle the whole site) --- */
  --ground:  #0C1411;   /* page background */
  --panel:   #121D18;   /* raised surfaces */
  --bone:    #E9E5D8;   /* main text */
  --muted:   #8B9A91;   /* secondary text */
  --brass:   #C9A227;   /* accent / highlight */
  --line:    #223029;   /* hairlines & borders */

  /* --- Type --- */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* --- Layout --- */
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --maxw: 76rem;
  --prose: 62ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--bone);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--bone); text-decoration-color: var(--line); text-underline-offset: 0.25em; }
a:hover { text-decoration-color: var(--brass); }

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

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

.prose { max-width: var(--prose); }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.skip {
  position: absolute; left: -9999px;
  background: var(--brass); color: var(--ground);
  padding: 0.6rem 1rem; z-index: 99; font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; }

/* -----------------------------------------------------------
   Nav
   ----------------------------------------------------------- */
.nav {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: blur(8px);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.25rem; flex-wrap: wrap;
}
.nav__name {
  font-family: var(--display);
  font-size: 1.2rem; font-weight: 500;
  letter-spacing: -0.01em; text-decoration: none;
  font-variation-settings: "SOFT" 20, "WONK" 1;
}
.nav__links { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.nav__links a {
  text-decoration: none; color: var(--muted);
  font-size: 0.95rem; padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
}
.nav__links a:hover { color: var(--bone); }
.nav__links a[aria-current="page"] {
  color: var(--bone); border-bottom-color: var(--brass);
}

/* -----------------------------------------------------------
   Hero + stacking plan (home page)
   ----------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2rem, 5vw, 4rem); }

.hero__grid {
  display: grid; gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
}

.hero__name {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 5.25rem);
  line-height: 0.92;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 100;
}
.hero__line {
  font-size: 1.05rem; color: var(--muted);
  margin: 0 0 2rem; max-width: 26ch;
}
.hero__portrait {
  border: 1px solid var(--line);
  background: var(--panel);
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  color: var(--muted); font-size: 0.85rem;
  text-align: center; padding: 1rem;
  overflow: hidden;
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Contact details under the portrait */
.card { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.card a, .card span.card__row {
  display: block; padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none; font-size: 0.95rem;
}
.card a:hover { color: var(--brass); }
.card small { display: block; color: var(--muted); font-size: 0.78rem; margin-bottom: 0.1rem; }

/* --- the stack --- */
.stack__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem; margin-bottom: 1.5rem;
}
.stack__title {
  font-family: var(--display); font-weight: 400;
  font-size: 1.35rem; margin: 0; letter-spacing: -0.01em;
}
.stack__hint { color: var(--muted); font-size: 0.85rem; margin: 0; }

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

.floor {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  align-items: stretch;
  gap: 0.9rem;
  border-bottom: 1px solid var(--line);
  padding-block: 0.4rem;
}
.floor:first-child { border-top: 1px solid var(--line); }

.floor__year {
  font-size: 0.9rem; color: var(--muted);
  align-self: center; font-variant-numeric: tabular-nums;
}
.floor__blocks { display: flex; gap: 0.3rem; min-height: 3rem; }

.blk {
  flex: var(--w, 1) 1 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--bone);
  font: inherit; font-size: 0.82rem;
  text-align: left;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  display: flex; align-items: flex-end;
  overflow: hidden;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.blk span {
  display: block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.blk:hover, .blk:focus-visible, .blk[aria-pressed="true"] {
  background: var(--brass); border-color: var(--brass); color: #10160F;
}
.blk--soft { background: transparent; color: var(--muted); }

.stack__caption {
  margin-top: 1.5rem; min-height: 5.5rem;
  border-left: 2px solid var(--brass); padding-left: 1.1rem;
}
.stack__caption h3 {
  font-family: var(--display); font-weight: 500;
  font-size: 1.15rem; margin: 0 0 0.3rem;
}
.stack__caption p { margin: 0; color: var(--muted); max-width: 56ch; }

/* --- stack build animation (one orchestrated moment) --- */
@media (prefers-reduced-motion: no-preference) {
  .js .blk { opacity: 0; transform: translateY(0.6rem); }
  .js .blk.is-in {
    opacity: 1; transform: none;
    transition: opacity 420ms ease, transform 420ms cubic-bezier(.2,.7,.3,1),
                background 140ms ease, border-color 140ms ease, color 140ms ease;
  }
}

/* -----------------------------------------------------------
   Generic sections
   ----------------------------------------------------------- */
.band { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--line); }

.band__title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: -0.02em; margin: 0 0 1.5rem;
  font-variation-settings: "SOFT" 20, "WONK" 1;
}

.page-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1;
  letter-spacing: -0.03em; margin: 0 0 1rem;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}
.page-head p { color: var(--muted); max-width: 54ch; margin: 0; }

/* Draft placeholder — delete these blocks when you write the real copy */
.draft {
  border: 1px dashed var(--brass);
  background: color-mix(in srgb, var(--brass) 7%, transparent);
  padding: 1rem 1.25rem; color: var(--muted);
  font-size: 0.9rem; max-width: var(--prose);
}

/* -----------------------------------------------------------
   Experience entries
   ----------------------------------------------------------- */
.entry {
  display: grid; gap: clamp(1.25rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  padding-block: clamp(2.25rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}
@media (min-width: 56rem) {
  .entry { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); }
}

.entry__meta { display: flex; flex-direction: column; gap: 0.85rem; }
.chip {
  background: #fff; border-radius: 6px;
  padding: 0.7rem 0.85rem; width: fit-content;
  display: grid; place-items: center;
}
.chip img { max-height: 2.4rem; width: auto; }
.chip--bare { background: transparent; padding: 0; }
.chip--bare img { border-radius: 6px; max-height: 3.2rem; }

.entry__org {
  font-family: var(--display); font-size: 1.25rem;
  font-weight: 500; margin: 0; letter-spacing: -0.01em;
}
.entry__role { margin: 0; font-size: 0.95rem; }
.entry__when { margin: 0; color: var(--muted); font-size: 0.9rem; }

.entry__body p { margin: 0 0 1.1em; max-width: var(--prose); }
.entry__body p:last-child { margin-bottom: 0; }

.shot {
  margin-top: 1.5rem; border: 1px solid var(--line);
  max-width: 34rem;
}
.shot figcaption {
  color: var(--muted); font-size: 0.82rem;
  padding: 0.6rem 0.8rem; border-top: 1px solid var(--line);
}

/* -----------------------------------------------------------
   Projects
   ----------------------------------------------------------- */
.project {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}
.project__head {
  display: flex; align-items: baseline; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.5rem;
}
.project__name {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  letter-spacing: -0.02em; margin: 0;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}
.project__tag {
  color: var(--brass); font-size: 0.9rem;
  border: 1px solid var(--line); padding: 0.15rem 0.6rem;
  border-radius: 999px;
}
.project__grid {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 62rem) {
  .project__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); }
}
.frame {
  border: 1px solid var(--line); background: var(--panel);
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  color: var(--muted); font-size: 0.85rem; text-align: center;
  padding: 1.25rem; overflow: hidden;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }

.built { color: var(--muted); font-size: 0.92rem; margin-top: 1.25rem; }

/* Screenshots sitting under a project */
.shots { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
.shots figure { margin: 0; border: 1px solid var(--line); background: #151515; }
.shots img { width: 100%; height: auto; }
.shots figcaption {
  color: var(--muted); font-size: 0.85rem; line-height: 1.5;
  padding: 0.75rem 0.95rem; border-top: 1px solid var(--line);
}
.shots__narrow { max-width: 44rem; }

/* -----------------------------------------------------------
   Contact
   ----------------------------------------------------------- */
.say {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.15;
  letter-spacing: -0.02em; max-width: 22ch; margin: 0 0 2.5rem;
  font-variation-settings: "SOFT" 30, "WONK" 1;
}
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 34rem; }
.links li { border-bottom: 1px solid var(--line); }
.links a {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; text-decoration: none;
}
.links a:hover { color: var(--brass); }
.links span:last-child { color: var(--muted); font-size: 0.9rem; }
.links__plain {
  display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0;
}

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3.5rem;
  color: var(--muted); font-size: 0.88rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.foot a { color: var(--muted); }

/* -----------------------------------------------------------
   Phone layout
   Everything above already reflows; these rules fix the few
   places where narrow screens genuinely need different logic.
   ----------------------------------------------------------- */

/* Nav: let the four links share a full-width row of their own */
@media (max-width: 34rem) {
  .nav__inner { min-height: 0; padding-block: 0.7rem; gap: 0.6rem; }
  .nav__name { font-size: 1.05rem; }
  .nav__links { width: 100%; gap: 0.75rem; justify-content: space-between; }
  .nav__links a { font-size: 0.88rem; }
}

/* Stacking plan: a five-across floor is unreadable on a phone, so the
   year moves onto its own line and blocks wrap into a readable grid. */
@media (max-width: 44rem) {
  .floor {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding-block: 0.85rem;
  }
  .floor__year { align-self: start; }
  .floor__blocks { flex-wrap: wrap; min-height: 0; }
  .blk { flex: 1 1 8rem; min-height: 3rem; }
  .stack__caption { min-height: 7rem; }
}

/* Screenshots: keep the type legible by letting a wide shot scroll
   sideways inside its own frame rather than shrinking to nothing. */
@media (max-width: 46rem) {
  .shots figure { overflow-x: auto; }
  .shots img { min-width: 30rem; }
  .shots figcaption { position: sticky; left: 0; }
}

/* Long rows wrap instead of squeezing */
.links a, .links__plain { flex-wrap: wrap; }

@media (max-width: 34rem) {
  .hero { padding-block: 2.25rem 1.5rem; }
  .entry { padding-block: 2rem; }
  .foot { flex-direction: column; gap: 0.4rem; }
}
