:root {
  --ink: #1A1A1A;
  --grey: #6B6B6B;
  --line: #E6E6E3;
  --tile: #F4F4F3;
  --sun: #FFC933;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--sun); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 48px); margin: 0 auto; }

/* Header */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; }
.top .name { font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; padding: 12px 0; }
.top nav { display: flex; gap: 24px; color: var(--grey); }
.top nav a { padding: 12px 0; }
.top nav a:hover { color: var(--ink); }

/* Intro */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: end; gap: 48px; padding-top: clamp(32px, 6vw, 72px); }
.intro h1 {
  margin: 0;
  padding-bottom: clamp(24px, 4vw, 48px);
  max-width: 19em;
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.intro .quiet { color: var(--grey); }
.me-panel { background: var(--sun); border-radius: var(--r); padding: 36px 24px 0; overflow: hidden; display: flex; justify-content: center; }
.me { width: 92%; height: auto; }

/* Sections */
section + section { margin-top: clamp(72px, 10vw, 120px); }
#road { margin-top: clamp(56px, 7vw, 88px); }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.head p { margin: 0; color: var(--grey); font-size: 15px; }

/* Theme tiles */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.tile { grid-column: span 2; }
.tile.t-career, .tile.t-fitness { grid-column: span 3; }
.tile > a, .tile > div { display: flex; flex-direction: column; height: 100%; min-height: 220px; padding: 24px; border-radius: var(--r); background: var(--bg); color: var(--fg); }
.tile.t-career > *, .tile.t-fitness > * { min-height: 260px; }
.tile .word { margin-top: auto; font-size: clamp(28px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.tile .detail { margin-top: 10px; font-size: 15px; line-height: 1.4; }
.tile .gos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.go {
  display: inline-flex; align-items: center; align-self: flex-start;
  min-height: 40px; padding: 0 16px; margin-top: 16px;
  border-radius: 999px; background: var(--fg); color: var(--bg);
  font-size: 14px; font-weight: 600; line-height: 1.2;
  transition: transform .2s cubic-bezier(.2,.7,.2,1);
}
.gos .go { margin-top: 0; }
.tile > a:hover .go, .gos .go:hover { transform: translateX(3px); }
.tile > a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.gos .go:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.t-career  { --bg: #1F2A44; --fg: #FFFFFF; }
.t-fitness { --bg: #FF5A36; --fg: #1A1A1A; }
.t-reading { --bg: #3B5BFD; --fg: #FFFFFF; }
.t-travel  { --bg: #FF9EC0; --fg: #1A1A1A; }
.t-spanish { --bg: #C8F169; --fg: #1A1A1A; }

/* Photos */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 12px; list-style: none; margin: 0; padding: 0; }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 10px; }
.grid-6 .shot .frame, .grid-6 .shot button { border-radius: 14px; }
.grid-6 .shot p { flex-direction: column; gap: 0; font-size: 14px; line-height: 1.35; }
.shot button { all: unset; display: block; width: 100%; cursor: zoom-in; border-radius: 18px; }
.shot button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.shot .frame { overflow: hidden; border-radius: 18px; background: var(--tile); }
.shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.shot button:hover img { transform: scale(1.025); }
.shot p { margin: 12px 0 0; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.shot p span { color: var(--grey); }

/* Projects */
.project-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.project-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 160px; padding: 24px; border: 1.5px dashed #CFCFCB; border-radius: var(--r); color: var(--grey); text-align: center; }
.project { --bg: #FFC933; --fg: #1A1A1A; }
.project a { display: flex; flex-direction: column; min-height: 220px; height: 100%; padding: 24px; border-radius: var(--r); background: var(--bg); color: var(--fg); }
.project .p-status { font-size: 14px; font-weight: 500; }
.project .p-name { margin-top: auto; font-size: clamp(28px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.project .p-line { margin-top: 10px; font-size: 15px; line-height: 1.4; max-width: 36em; }
.project a:hover .go { transform: translateX(3px); }
.project a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Writing */
.substack { --bg: #FF6719; --fg: #1A1A1A; display: flex; flex-direction: column; min-height: 200px; padding: 24px; border-radius: var(--r); background: var(--bg); color: var(--fg); }
.substack .word { margin-top: auto; font-size: clamp(28px, 3.2vw, 40px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.substack .detail { margin-top: 10px; font-size: 15px; }
.substack:hover .go { transform: translateX(3px); }
.substack:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Footer */
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: clamp(72px, 10vw, 120px); padding: 20px 0 32px; border-top: 1px solid var(--line); color: var(--grey); font-size: 15px; }
.foot nav { display: flex; gap: 0 20px; flex-wrap: wrap; }
.foot nav a { color: var(--ink); padding: 12px 0; }
.foot nav a:hover { color: var(--grey); }

/* Photo viewer */
dialog.viewer { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #FFFFFF; color: var(--ink); font-family: var(--sans); }
dialog.viewer::backdrop { background: transparent; }
dialog.viewer[open] { display: grid; grid-template-rows: 1fr auto; animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.viewer figure { margin: 0; display: grid; place-items: center; padding: 32px 32px 0; min-height: 0; }
.viewer figure img { max-height: calc(100vh - 120px); width: auto; max-width: 100%; object-fit: contain; border-radius: 12px; }
.viewer .bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 32px 20px; }
.viewer .cap { margin: 0; }
.viewer .cap span { color: var(--grey); margin-left: 8px; }
.viewer .ctrl { display: flex; gap: 8px; }
.viewer button { all: unset; cursor: pointer; padding: 10px 14px; border-radius: 999px; background: var(--tile); font-size: 15px; font-weight: 500; }
.viewer button:hover { background: #E9E9E6; }
.viewer button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .go, .shot img { transition: none; }
  .tile > a:hover .go, .gos .go:hover, .substack:hover .go, .shot button:hover img { transform: none; }
  dialog.viewer[open] { animation: none; }
}

@media (max-width: 1000px) {
  .grid-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; gap: 28px; }
  .intro h1 { padding-bottom: 0; }
  .me-panel { width: 82%; justify-self: center; padding-top: 24px; border-radius: 18px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile, .tile.t-fitness { grid-column: span 1; }
  .tile.t-career { grid-column: span 2; }
  .tile > a, .tile > div, .tile.t-career > *, .tile.t-fitness > * { min-height: 180px; padding: 16px; border-radius: 18px; }
  .tile .word { font-size: 24px; }
  .tile .detail { font-size: 14px; }
  .go { font-size: 13px; padding: 0 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 8px; }
  .grid-6 .shot p { font-size: 13px; }
  .shot .frame, .shot button { border-radius: 14px; }
  .shot p { flex-direction: column; gap: 0; font-size: 14px; }
  .project a { min-height: 180px; padding: 18px; border-radius: 18px; }
  .project .p-name { font-size: 24px; }
  .substack { min-height: 160px; padding: 18px; border-radius: 18px; }
  .substack .word { font-size: 24px; }
  .viewer figure { padding: 16px 12px 0; }
  .viewer .bar { padding: 12px 16px 16px; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .top { flex-wrap: wrap; gap: 0; padding-bottom: 4px; }
  .top .name { padding-bottom: 0; }
  .top nav { width: 100%; justify-content: space-between; gap: 8px; font-size: 15px; }
}
