/* Chino's adaptation of Strata by HTML5 UP. Original license: CC BY 3.0. */
@font-face { font-family: Nunito; font-style: normal; font-weight: 200 1000; font-display: swap; src: url('./fonts/nunito-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: Pacifico; font-style: normal; font-weight: 400; font-display: swap; src: url('./fonts/pacifico-latin-400-normal.woff2') format('woff2'); }
:root {
  color-scheme: light;
  --canvas: #fffefd; --ink: #344367; --muted: #64718b; --subtle: #6c7892;
  --accent: #566fb2; --button: #586eaf; --line: #d2ddf2; --hover: #edf2fd; --rail-ink: #4e6185;
  --rail: #f1f6ff; --paper: #f3f6fd; --frame: #ffffff; --check: #dce9fc75;
  --rail-width: 36%; --body-font: Nunito, 'Hiragino Sans', 'Microsoft YaHei', sans-serif;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #202536; --ink: #e4eafb; --muted: #b8c1d8; --subtle: #acb8d2;
  --accent: #b4c4f2; --button: #526aaa; --line: #424d6b; --hover: #343d58; --rail-ink: #c4cfe6;
  --rail: #2b334a; --paper: #2b3248; --frame: #69728f; --check: #3c48684d;
}
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 17px/1.65 var(--body-font); -webkit-text-size-adjust: 100%; }
body, input, select, textarea, button { font-family: var(--body-font); }
h1, h2, h3, p, address, figure { margin: 0; }
h1, h2, h3 { color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); border-bottom: 0; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color 160ms ease, background-color 160ms ease; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 10px 16px; background: var(--canvas); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
#header {
  position: fixed; inset: 0 auto 0 0; width: var(--rail-width); height: 100dvh;
  padding: 26px 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(180px, 1fr) auto; justify-content: stretch;
  gap: 22px; align-items: stretch; color: var(--ink); text-align: center; overflow-y: auto; scrollbar-width: thin;
  background: repeating-linear-gradient(0deg, transparent 0 15px, var(--check) 15px 30px), repeating-linear-gradient(90deg, transparent 0 15px, var(--check) 15px 30px), var(--rail);
}
#header::after {
  content: ''; position: fixed; top: 0; left: calc(var(--rail-width) - 9px); width: 10px; height: 100dvh;
  background: radial-gradient(circle at 100% 50%, var(--canvas) 8px, transparent 8.5px) 0 0 / 10px 22px repeat-y; pointer-events: none;
}
#header > .inner { margin: 0; width: 100%; }
#header .wordmark {
  display: inline-flex; align-items: baseline; gap: 14px;
  font: 400 clamp(64px, 6.5vw, 94px)/1.35 Pacifico, cursive;
  color: var(--accent); letter-spacing: -3px; text-decoration: none;
}
.wordmark span { font-family: var(--body-font); font-size: 16px; font-weight: 500; letter-spacing: 3px; }
#header .tagline { margin: 0 auto; max-width: 340px; font-size: 15px; line-height: 1.6; color: var(--rail-ink); text-wrap: balance; }
#header .portrait {
  position: relative; align-self: center; justify-self: center; width: 100%; height: 100%;
  border: 6px solid var(--frame); border-radius: 240px 240px 28px 28px;
  outline: 1px solid var(--line); outline-offset: 4px; overflow: hidden; background: var(--paper);
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 54% 36%; }
.portrait .art-night { display: none; }
[data-theme='dark'] .portrait .art-day { display: none; }
[data-theme='dark'] .portrait .art-night { display: block; }
#header .identity { padding: 0 8px; font-size: 13px; line-height: 1.65; font-style: normal; color: var(--rail-ink); }
#header .identity p + p { margin-top: 3px; }
#header .identity p { margin-bottom: 0; color: inherit; }
#header .identity p:first-child { color: var(--ink); font-weight: 700; font-size: 15px; }
#header .identity a { color: var(--rail-ink); text-decoration: underline; }
#main { position: relative; width: auto; max-width: 1250px; margin-left: var(--rail-width); padding: 28px 42px 32px 44px; }
.navigation {
  display: flex; width: fit-content; justify-content: space-between; align-items: center; gap: 36px;
  min-height: 44px; padding: 4px 10px 4px 25px; border: 1px solid var(--line);
  border-radius: 32px; background: var(--paper); margin-bottom: 62px;
}
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--accent); font-weight: 800; font-size: 15px; padding: 10px 0; }
.nav-links a:hover { text-decoration: underline; }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 8px; border: 0;
  border-radius: 50%; box-shadow: none; background: transparent; color: var(--accent); line-height: 1; cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--hover); color: var(--accent); }
.theme-toggle svg { width: 21px; height: 21px; }
.theme-toggle .sun { display: none; }
[data-theme='dark'] .theme-toggle .sun { display: block; }
[data-theme='dark'] .theme-toggle .moon { display: none; }
.sky-stars { position: absolute; top: 25px; right: 32px; width: 95px; height: 95px; color: var(--line); pointer-events: none; }
#main > section { margin: 0; padding: 0; border: 0; }
#about h1 { font-size: clamp(44px, 4.5vw, 67px); line-height: 1.13; letter-spacing: -1.6px; font-weight: 900; margin: 0 0 20px; text-wrap: balance; }
#about h1 span { color: var(--accent); }
.intro { max-width: 780px; font-size: 20px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.arrow { width: 23px; height: 23px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.primary-link.button {
  display: inline-flex; gap: 16px; align-items: center; min-height: 52px; padding: 12px 25px;
  margin-top: 24px; border: 1px solid transparent; border-radius: 30px; box-shadow: 0 4px 0 var(--line);
  background: var(--button); color: #ffffff !important; font-size: 17px; font-weight: 700; line-height: 1.5;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.primary-link.button:hover { background: var(--button); border-color: transparent; transform: translateY(-2px); box-shadow: 0 6px 0 var(--line); }
#main > #projects { position: relative; margin-top: 40px; padding-top: 28px; border-top: 2px dotted var(--line); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
h2 { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -0.5px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.text-link .arrow { width: 19px; height: 19px; }
.project { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 0; text-decoration: none; }
.project + .project { border-top: 1px solid var(--line); }
.project > div { min-width: 0; flex: 1; }
.project h3 { color: var(--ink); font-size: 25px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.3; margin: 0 0 6px; }
.project p { max-width: 650px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.project .project-topics { margin-top: 8px; color: var(--accent); font-size: 13px; font-weight: 600; }
.project-topics span { padding: 0 5px; }
.project-icon { width: 56px; height: 56px; flex-shrink: 0; align-self: flex-start; padding: 16px; color: var(--accent); background: var(--paper); border-radius: 50%; }
.project > .arrow { width: 38px; height: 38px; padding: 8px; border: 1px solid var(--line); border-radius: 50%; transition: transform 180ms ease, background-color 180ms ease; }
.project:hover h3 { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.project:hover > .arrow { transform: translateX(3px); background: var(--hover); }
#main > #writing { display: grid; grid-template-columns: 1fr 1.05fr; margin-top: 6px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--paper); }
.writing-copy { padding: 25px; align-self: center; }
.coffee-icon { display: inline-block; vertical-align: middle; width: 26px; height: 26px; margin-bottom: 10px; color: var(--accent); }
#writing h2 { font-size: 24px; }
.writing-copy p { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.writing-copy .text-link { margin-top: 16px; }
.writing-art { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 31% center; min-height: 230px; }
#footer {
  position: static; width: auto; bottom: auto; margin-top: 30px; padding: 25px 0 0; border-top: 2px dotted var(--line);
  display: flex; justify-content: space-between; align-items: start; gap: 24px; background: none; color: var(--ink); text-align: left;
}
#footer h2 { font-size: 23px; margin-bottom: 3px; }
#footer a { text-decoration: underline; }
#footer .credit, .art-credits { font-size: 11px; color: var(--muted); }
#footer .credit a { color: inherit; }
.credits { padding-top: 5px; }
.art-credits { margin-top: 7px; max-width: 250px; }
.art-credits summary { cursor: pointer; width: fit-content; text-underline-offset: 3px; }
.art-credits summary:hover { text-decoration: underline; }
.art-credits p { margin-top: 8px; }
.art-credits a { display: block; margin-top: 5px; }
@media (min-width: 1600px) {
  :root { --rail-width: 33%; }
  #header { padding-left: 40px; padding-right: 40px; }
  #header .portrait { max-width: 470px; }
  #main { padding-left: 70px; padding-right: 64px; }
}
@media (max-width: 1100px) {
  #header { padding: 26px 20px; gap: 20px; }
  #header .wordmark { font-size: 65px; }
  .wordmark span { font-size: 13px; letter-spacing: 1px; }
  #header .tagline { font-size: 14px; }
  #main { padding: 26px 30px; }
  #about h1 { font-size: 47px; letter-spacing: -1.3px; }
  .intro { font-size: 18px; }
  .navigation { gap: 20px; }
  .sky-stars { display: none; }
  h2 { font-size: 24px; }
  .text-link { font-size: 13px; }
  .project { gap: 14px; }
  .project-icon { width: 44px; height: 44px; padding: 12px; }
  .project p { font-size: 16px; }
  .writing-copy { padding: 20px; }
  #writing h2 { font-size: 22px; }
  #footer { flex-wrap: wrap; gap: 18px; }
}
@media (max-width: 760px) {
  #header { position: relative; width: 100%; height: auto; min-height: 0; padding: 22px 28px 28px; grid-template-rows: auto auto auto; grid-template-columns: 1fr; gap: 22px; text-align: center; }
  #header::after { position: absolute; inset: auto 0 0; width: 100%; height: 9px; background: radial-gradient(circle at 50% 100%, var(--canvas) 7px, transparent 7.5px) 0 0 / 20px 9px repeat-x; }
  #header > .inner { grid-column: 1 / -1; }
  #header .wordmark { font-size: 67px; }
  .wordmark span { font-size: 15px; letter-spacing: 2px; }
  #header .tagline { font-size: 15px; max-width: none; text-wrap: initial; margin-top: 4px; }
  #header .portrait { grid-column: 1; grid-row: 2; height: 390px; max-width: 340px; border-width: 5px; border-radius: 180px 180px 22px 22px; outline-offset: 3px; }
  #header .portrait img { object-position: 54% 22%; }
  #header .identity { grid-column: 1; grid-row: 3; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 0; font-size: 12px; overflow-wrap: anywhere; text-align: left; }
  #header .identity p:first-child { font-size: 13px; }
  #header .identity p + p { margin-top: 0; }
  #header .identity p:nth-child(2n) { text-align: right; }
  #main { margin-left: 0; padding: 22px 28px 28px; max-width: none; }
  .navigation { width: 100%; padding: 3px 6px 3px 16px; margin-bottom: 34px; gap: 10px; }
  .nav-links { gap: 23px; }
  .nav-links a { font-size: 14px; }
  #about h1 { font-size: clamp(36px, 8.4vw, 48px); line-height: 1.16; letter-spacing: -1px; margin-bottom: 20px; }
  .intro { font-size: 17px; line-height: 1.75; }
  .primary-link.button { font-size: 16px; min-height: 50px; padding: 11px 22px; margin-top: 24px; }
  #main > #projects { margin-top: 38px; padding-top: 26px; }
  .section-title { flex-wrap: wrap; gap: 12px; }
  h2 { font-size: 25px; }
  .project { gap: 15px; padding: 24px 0; }
  .project-icon { display: none; }
  .project h3 { font-size: 24px; }
  .project p { font-size: 16px; }
  .project .project-topics { font-size: 12px; }
  .project-topics span { padding: 0 3px; }
  #main > #writing { grid-template-columns: 1fr; margin-top: 10px; }
  .writing-copy { padding: 24px; }
  #writing h2 { font-size: 25px; }
  .writing-copy p { font-size: 16px; }
  .writing-copy .text-link { font-size: 15px; }
  .writing-art { height: auto; min-height: 0; aspect-ratio: 1400 / 986; object-fit: contain; }
  #footer { display: block; padding-top: 24px; }
  .credits { margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
