/* Luan Child portfolio
   Palette is set once in :root. Change values here to restyle the whole site. */
:root {
  --navy: #071521;
  --navy-2: #0B202B;
  --teal: #73C8C5;
  --teal-deep: #1D6B68;      /* teal for use on light backgrounds (passes AA) */
  --paper: #F4F3ED;
  --paper-2: #ECEAE1;
  --ink: #172D35;
  --muted: #4B6560;          /* secondary text on light */
  --muted-dark: #A7BDBB;     /* secondary text on navy */
  --line: rgba(23, 45, 53, 0.22);
  --line-dark: rgba(115, 200, 197, 0.28);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 3px; }
.on-dark :focus-visible, .hero :focus-visible { outline-color: var(--teal); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--teal); color: var(--navy); padding: 8px 14px; font-weight: 600;
}
.skip:focus { left: 8px; }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  min-height: min(92vh, 760px);
  display: flex; flex-direction: column;
}
.flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { /* keeps text area calm against the lines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,21,33,0.9) 0%, rgba(7,21,33,0.6) 36%, rgba(7,21,33,0) 66%);
}
.hero > * { position: relative; z-index: 1; }
.hero > .flow { position: absolute; z-index: 0; }
.hero .wrap { z-index: 2; }

.topbar { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 28px; gap: 24px; }
.brand { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.08em; text-decoration: none; color: #fff; }
.brand span { color: var(--teal); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 26px; font-size: 0.92rem; }
.nav a { text-decoration: none; color: #E6EFEE; padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: #fff; border-bottom-color: var(--teal); }

.hero-body { margin-top: auto; padding-top: 72px; padding-bottom: clamp(48px, 9vh, 96px); }
.kicker { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin: 0 0 20px; }
.hero h1 {
  font-family: var(--serif); font-weight: 400; margin: 0;
  font-size: clamp(3.2rem, 9vw, 7.2rem); line-height: 0.98; letter-spacing: -0.02em;
}
.hero .role {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.3rem, 2.8vw, 2rem); margin: 18px 0 0; color: #DCEBEA;
}
.hero .lede { max-width: 34rem; margin: 28px 0 0; color: #E3ECEB; font-size: 1.08rem; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.btn {
  display: inline-block; padding: 12px 22px; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--teal); transition: background .15s, color .15s;
}
.btn-solid { background: var(--teal); color: var(--navy); }
.btn-solid:hover { background: #fff; border-color: #fff; color: var(--navy); }
.btn-line { color: #fff; }
.btn-line:hover { background: rgba(115,200,197,0.14); color: #fff; }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 10vw, 120px) 0; }
.sec-head { display: grid; grid-template-columns: 120px 1fr; gap: 0 32px; align-items: baseline; margin-bottom: 48px; }
.sec-num { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.12em; color: var(--teal-deep); border-top: 1px solid var(--teal-deep); padding-top: 12px; }
.sec-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; margin: 0; letter-spacing: -0.01em; border-top: 1px solid var(--line); padding-top: 8px; }
.sec-intro { grid-column: 2; max-width: 40rem; margin: 20px 0 0; color: var(--muted); }

.offset { margin-left: calc(120px + 32px); }

/* Numbered project list */
.projects { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.project {
  display: grid; grid-template-columns: 120px 1fr 200px; gap: 8px 32px;
  padding: 30px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.project .n { font-family: var(--mono); font-size: 0.9rem; color: var(--teal-deep); padding-top: 0.5em; }
.project h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; margin: 0 0 8px; }
.project p { margin: 0; color: var(--muted); max-width: 38rem; }
.project .status { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 0.9em; text-align: right; }
.project .status.live { color: var(--teal-deep); }
.project .links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.95rem; }
.project .links a { color: var(--ink); font-weight: 600; }
.project .links a:hover { color: var(--teal-deep); }
.is-placeholder h3 { color: var(--ink); }
.on-dark .is-placeholder h3 { color: #fff; }
.is-placeholder .status { border: 1px dashed var(--line); padding: 6px 10px; width: max-content; margin-left: auto; margin-top: 0.4em; }

/* What each university entry will contain */
.brief { margin: 0 0 40px calc(120px + 32px); max-width: 44rem; padding: 22px 26px; border: 1px solid var(--line); background: rgba(255,255,255,0.45); }
.brief h3 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 12px; color: var(--teal-deep); font-weight: 500; }
.brief ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; font-size: 0.97rem; color: var(--ink); }
.brief li { padding: 3px 0 3px 18px; position: relative; break-inside: avoid; }
.brief li::before { content: ""; position: absolute; left: 0; top: 0.95em; width: 9px; border-top: 1px solid var(--teal-deep); }

.alt { background: var(--paper-2); }

/* Games: dark, quieter */
.on-dark { background: var(--navy-2); color: #fff; }
.on-dark .sec-num { color: var(--teal); border-top-color: var(--teal); }
.on-dark .sec-title { border-top-color: var(--line-dark); }
.on-dark .sec-intro { color: var(--muted-dark); }
.on-dark .projects { border-top-color: var(--line-dark); }
.on-dark .project { border-bottom-color: var(--line-dark); }
.on-dark .project .n { color: var(--teal); }
.on-dark .project p, .on-dark .project .status { color: var(--muted-dark); }
.on-dark .is-placeholder .status { border-color: var(--line-dark); }
.compact .project { padding: 22px 0; }
.compact .project h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }

/* About */
.about-grid { display: grid; grid-template-columns: 120px 1fr; gap: 0 32px; }
.about-copy { max-width: 40rem; }
.about-copy p { margin: 0 0 1.2em; }
.about-copy p:first-child { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.4; }
.facts { margin: 32px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); max-width: 40rem; }
.facts li { display: flex; justify-content: space-between; gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.facts span:first-child { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 0.2em; }
.facts span:last-child { text-align: right; }

/* Contact */
.contact { background: var(--navy); color: #fff; padding-bottom: 40px; }
.contact .sec-num { color: var(--teal); border-top-color: var(--teal); }
.contact .sec-title { border-top-color: var(--line-dark); }
.contact-body { margin-left: calc(120px + 32px); }
.contact-body p { max-width: 34rem; margin: 0 0 28px; color: #DCE7E6; }
.big-link { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1.15; display: inline-block; color: #fff; text-decoration-color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 0.18em; word-break: break-word; }
.big-link:hover { color: var(--teal); }
footer { margin-top: 96px; padding-top: 22px; border-top: 1px solid var(--line-dark); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.78rem; color: var(--muted-dark); }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .sec-head, .about-grid { grid-template-columns: 1fr; }
  .sec-num { border-top: 0; padding: 0; margin-bottom: 10px; }
  .sec-title { border-top: 0; padding-top: 0; }
  .sec-intro { grid-column: 1; }
  .offset, .brief, .contact-body { margin-left: 0; }
  .project { grid-template-columns: 44px 1fr; }
  .project .status { grid-column: 2; text-align: left; padding-top: 4px; }
  .is-placeholder .status { margin-left: 0; }
  .brief ul { columns: 1; }
  .hero::after { background: linear-gradient(180deg, rgba(7,21,33,0.35) 0%, rgba(7,21,33,0.7) 60%, rgba(7,21,33,0.88) 100%); }
  .hero { min-height: 0; }
  .hero-body { padding-top: 120px; }
}
@media (max-width: 520px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .facts li { flex-direction: column; gap: 2px; }
  .facts span:last-child { text-align: left; }
}

/* ---------- Case study pages ---------- */
.case-top { background: var(--navy); color: #fff; position: relative; overflow: hidden; padding-bottom: clamp(48px, 8vw, 88px); }
.case-top .topbar { position: relative; z-index: 1; }
.case-top .flow { opacity: 0.55; }
.case-top .wrap { position: relative; z-index: 1; }
.back { font-size: 0.92rem; color: #E6EFEE; text-decoration: none; border-bottom: 1px solid transparent; }
.back:hover { color: #fff; border-bottom-color: var(--teal); }
.case-top h1 { font-family: var(--serif); font-weight: 400; margin: 12px 0 0; font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -0.02em; max-width: 16em; }
.case-top .standfirst { max-width: 38rem; margin: 22px 0 0; font-size: 1.12rem; color: #E3ECEB; }
.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 48px 0 0; border-top: 1px solid var(--line-dark); }
.meta div { padding: 16px 20px 0 0; }
.meta dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.meta dd { margin: 0; font-size: 0.97rem; color: #EAF1F0; }
.notice { margin: 0 0 56px calc(120px + 32px); max-width: 44rem; padding: 14px 18px; border-left: 2px solid var(--teal-deep); background: rgba(29,107,104,0.08); font-size: 0.97rem; color: var(--ink); }
.case-sec { display: grid; grid-template-columns: 120px 1fr; gap: 0 32px; padding: 0 0 64px; }
.case-sec > h2 { font-family: var(--mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-deep); margin: 6px 0 0; border-top: 1px solid var(--teal-deep); padding-top: 12px; align-self: start; }
.case-sec .body { max-width: 42rem; }
.case-sec .body > h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; margin: 0 0 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.case-sec .body p { margin: 0 0 1.1em; }
.case-sec .body ul { padding-left: 1.1em; margin: 0 0 1.2em; }
.case-sec .body li { margin-bottom: 0.4em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 8px 0 56px calc(120px + 32px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.stat { padding: 22px 20px 22px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.01em; }
.stat span { display: block; margin-top: 10px; font-size: 0.9rem; color: var(--muted); line-height: 1.4; }
.fig { margin: 0 0 56px; }
.fig .shot { display: block; border: 1px solid var(--line); background: #fff; }
.fig img { display: block; width: 100%; height: auto; }
.fig figcaption { margin: 12px 0 0 calc(120px + 32px); max-width: 44rem; font-size: 0.93rem; color: var(--muted); }
.fig figcaption b { font-family: var(--mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-deep); margin-right: 8px; }
.decisions { width: 100%; border-collapse: collapse; margin: 6px 0 1.4em; font-size: 0.95rem; }
.decisions th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0 14px 8px 0; border-bottom: 1px solid var(--ink); }
.decisions td { vertical-align: top; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); }
.decisions td:first-child { font-weight: 600; width: 38%; }
.case-wide { max-width: 60rem; }
@media (max-width: 860px) {
  .notice, .stats, .fig figcaption { margin-left: 0; }
  .case-sec { grid-template-columns: 1fr; }
  .case-sec > h2 { border-top: 0; padding-top: 0; margin-bottom: 10px; }
  .meta { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .decisions td:first-child { width: auto; }
}
@media (max-width: 520px) { .meta, .stats { grid-template-columns: 1fr; } .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }
