/* brycelanglotz.com
   Dark, grid-based system. Each section page sets one accent colour through
   a class on <body>: page-software, page-golf or page-finance. */

:root {
  color-scheme: dark;

  --bg: #0c0f0e;
  --raised: #141917;
  --line: #27302c;
  --text: #f2f4f1;
  --muted: #a9b3ad;
  --faint: #808b85;

  --software: #80caff;
  --golf: #79dd9f;
  --finance: #f0ba59;
  --accent: var(--text);

  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(56px, 8vw, 104px);
}

.page-software { --accent: var(--software); }
.page-golf { --accent: var(--golf); }
.page-finance { --accent: var(--finance); }

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

.skip-link {
  position: absolute;
  top: -80px;
  left: var(--gutter);
  z-index: 30;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.label-accent {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.statement {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

/* Notice pinned to the top of every page */

.ai-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 44px;
  background: var(--raised);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-align: center;
}

.ai-banner p {
  padding: 7px 0;
}

.ai-banner-close {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 100%;
  min-height: 32px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
}

.ai-banner-close[hidden] {
  display: none;
}

.ai-banner-close:hover {
  color: var(--text);
}

.ai-banner-closed .ai-banner {
  display: none;
}

/* Page frame */

.wrap {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  flex: 1 0 auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

.site-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
}

.dot-software { background: var(--software); }
.dot-golf { background: var(--golf); }
.dot-finance { background: var(--finance); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 32px;
  padding: 16px 0 28px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
}

.site-footer a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: var(--text);
}

/* Page heading */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 64px;
  padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 5vw, 64px);
}

.page-head-title {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.display {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(56px, 11vw, 152px);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.page-home .page-head {
  padding: clamp(48px, 8vw, 112px) 0 clamp(48px, 7vw, 96px);
}

.lede {
  flex: 1 1 320px;
  max-width: 420px;
  padding-bottom: 14px;
  font-size: 20px;
  line-height: 1.5;
}

.lede-block {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 400px;
  padding-bottom: 10px;
}

.lede-block p {
  font-size: 20px;
  line-height: 1.5;
}

/* Home: a round photo beside the name, the way a profile photo sits on LinkedIn.
   The row carries the name's font size, so the photo can be sized in em: 1.6em
   is the distance from the top of the capitals on the first line to the
   baseline of the second, which makes the circle line up with the text. */
.identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px clamp(20px, 2.6vw, 36px);
  min-width: 0;
  font-size: clamp(56px, 9vw, 120px);
}

.identity .display {
  font-size: 1em;
  line-height: 0.9;
}

.avatar {
  flex: 0 0 auto;
  width: 1.6em;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  box-shadow: 0 0 0 2px var(--line);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  border-color: var(--text);
}

.btn-primary {
  border-color: var(--text);
}

.btn-primary:hover {
  background: var(--text);
  color: var(--bg);
}

/* Home: index of sections */

.index {
  border-top: 1px solid var(--text);
}

.index-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 32px;
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* The hover fill reaches 16px past the text on each side without moving the rules. */
.index-row:hover {
  background: var(--raised);
  box-shadow: -16px 0 0 var(--raised), 16px 0 0 var(--raised);
}

.row-software { --row: var(--software); }
.row-golf { --row: var(--golf); }
.row-finance { --row: var(--finance); }

.index-num {
  flex: 0 0 64px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--row);
}

.index-title {
  flex: 1 1 260px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.index-desc {
  flex: 2 1 300px;
  max-width: 400px;
  color: var(--muted);
  text-wrap: pretty;
}

.index-meta {
  flex: 0 1 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 14px;
}

.index-arrow {
  flex: 0 0 28px;
  color: var(--row);
  transition: transform 0.2s ease;
}

.index-row:hover .index-arrow {
  transform: translateX(6px);
}

/* Label on the left, content on the right */

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 64px;
  padding: var(--section) 0;
}

.split > .label {
  flex: 0 0 200px;
  padding-top: 10px;
}

.split-body {
  flex: 1 1 480px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 700px;
}

/* Sections on the inner pages */

.section {
  display: flex;
  flex-direction: column;
  padding-top: var(--section);
}

.section > .label {
  margin-bottom: 20px;
}

.section-last {
  padding-bottom: var(--section);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 24px 40px;
  padding-top: 22px;
  border-top: 1px solid var(--text);
}

.facts div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.facts dd {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
}

.project {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 64px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.project-head {
  flex: 0 1 300px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-head h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.project-body {
  flex: 1 1 480px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 720px;
}

.project-body > p {
  font-size: 19px;
  line-height: 1.55;
}

.spec li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.spec .label {
  flex: 0 0 140px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.spec .label img {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.spec .detail {
  flex: 1 1 280px;
  color: var(--muted);
}

.timeline {
  border-top: 1px solid var(--text);
}

.timeline li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.timeline .when {
  flex: 0 0 160px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.timeline .what {
  flex: 1 1 280px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.timeline .where {
  flex: 1 1 280px;
  color: var(--muted);
}

/* Golf */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 28px 40px;
  padding-top: 24px;
  border-top: 1px solid var(--text);
}

.stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
}

.stats dd {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(56px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.stats .is-accent {
  color: var(--accent);
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  margin-bottom: 20px;
}

.chart-head h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.chart-card {
  overflow-x: auto;
  padding: 28px clamp(12px, 2vw, 28px) 16px;
  background: var(--raised);
  border: 1px solid var(--line);
}

.chart-card svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

/* On narrow screens the chart scrolls sideways. A right-to-left scroll box
   starts at its right edge, so the most recent rounds are what shows first. */
@media (max-width: 760px) {
  .chart-card {
    direction: rtl;
  }

  .chart-card svg {
    direction: ltr;
  }
}

.two-up {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 80px;
  padding-top: var(--section);
}

.two-up > * {
  flex: 1 1 380px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.two-up > .narrow {
  max-width: 520px;
  gap: 20px;
}

.bars-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-note {
  max-width: 720px;
  margin-top: 16px;
  font-size: 15px;
}

.chart-source {
  margin-top: 10px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 0 40px;
  border-top: 1px solid var(--text);
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.steps .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.steps .name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* What's in the bag: a hairline grid with one card per slot in the bag.
   A card shows a drawing from src/bag-art/, or a photo when data/bag.json names one. */

.bag {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.bag-item {
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.bag-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: var(--raised);
}

.bag-visual svg {
  width: 74%;
  height: auto;
}

.bag-visual .accent {
  stroke: var(--accent);
}

.bag-visual img {
  width: 100%;
  height: 100%;
  padding: 8%;
  object-fit: contain;
}

.bag-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 24px;
}

.bag-text h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.bag-text {
  flex: 1 1 auto;
}

.bag-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 44px;
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

.bag-link:hover {
  color: var(--accent);
}

/* Finance */

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 64px;
  margin-bottom: var(--section);
  padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 48px);
  background: var(--raised);
  border: 1px solid var(--line);
  border-top-color: var(--accent);
}

.notice-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 620px;
}

.notice .statement {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

@media (max-width: 560px) {
  /* Keep the notice to one line on a phone. */
  .ai-banner {
    justify-content: flex-start;
    padding: 0 44px 0 var(--gutter);
    font-size: 10.5px;
    letter-spacing: 0.02em;
    text-align: left;
  }

  .index-num {
    flex-basis: 100%;
  }

  .split > .label {
    flex-basis: 100%;
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media print {
  .ai-banner,
  .site-nav,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
