@font-face {
  font-family: Inter;
  src: url('/assets/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root { --paper: #f3f6fc; --ink: #202b48; --muted: #596680; --line: #dce4f1; --accent: #3154de; }
@font-face { font-family: D-DIN; src: url('/assets/fonts/d-din/D-DIN.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: D-DIN; src: url('/assets/fonts/d-din/D-DIN-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 Inter, 'Helvetica Neue', Arial, sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: #cfdaff; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
h1, h2, p { margin: 0; }
h1, h2 { font-weight: 500; letter-spacing: -.035em; }
.wrap { width: min(1110px, calc(100% - 112px)); margin-inline: auto; }
.site-header { min-height: 112px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 72px); border-bottom: 1px solid #becbe0; }
.site-header.wrap { width: 100%; margin: 0; padding-left: 24px; padding-right: max(36px, (100vw - 1110px) / 2); font-family: D-DIN, 'Arial Narrow', sans-serif; }
.wordmark { justify-self: start; font-size: 25px; line-height: 1.2; font-weight: 700; letter-spacing: .065em; white-space: nowrap; text-transform: uppercase; }
.site-header nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: 15px; color: var(--muted); }
.site-header nav a { position: relative; display: grid; place-items: center; min-height: 44px; padding: 8px 12px; white-space: nowrap; text-transform: uppercase; letter-spacing: .18em; }
.site-header nav a + a::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: #becbe0; }
.site-header nav a[aria-current] { color: var(--accent); font-weight: 650; }
.home-page { height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
.home-page .site-header { flex-shrink: 0; }
.home-page main { flex: 1; min-height: 0; }
.blog-page { height: 100svh; overflow: hidden; display: flex; flex-direction: column; }
.blog-page .site-header { flex-shrink: 0; }
.blog-page main { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; scroll-behavior: smooth; }
.blog-page main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.about-layout { height: 100%; display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr); grid-template-rows: minmax(0, 1fr); gap: clamp(50px, 7vw, 110px); padding-block: 24px 28px; }
.portrait { min-height: 0; display: flex; flex-direction: column; align-items: start; }
.portrait-image { display: block; width: 100%; flex: 1; min-height: 0; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center top; }
.portrait .hobbies { width: 100%; flex-shrink: 0; }
.experience { min-height: 0; display: flex; flex-direction: column; }
/* Labels appear only on hover or keyboard focus. */
.hobbies { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0; list-style: none; margin: 14px 0 0; padding: 0; }
.hobbies li { display: flex; justify-content: center; min-width: 0; }
.hobby { position: relative; display: grid; place-items: center; width: 100%; min-height: 40px; color: var(--muted); border-radius: 6px; cursor: default; }
.hobby svg { display: block; width: 22px; height: 22px; }
.hobby:hover, .hobby:focus { color: var(--accent); background: #e6ecfc; }
.hobby:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hobby-label { position: absolute; z-index: 2; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); padding: 5px 9px; background: var(--ink); color: #fff; border-radius: 5px; font-size: 12px; line-height: 1.5; white-space: nowrap; visibility: hidden; }
.hobby:hover .hobby-label, .hobby:focus .hobby-label { visibility: visible; }
.career-scroll { position: relative; display: flex; flex: 1; min-height: 0; }
.career-list { list-style: none; margin: 0; padding: 0 20px 24px 5px; flex: 1; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scroll-behavior: smooth; scrollbar-width: none; }
.career-list::-webkit-scrollbar { display: none; }
.reading-track { position: absolute; top: 12px; bottom: 12px; right: 3px; width: 1px; background: #cdd8ea; pointer-events: none; }
.reading-fill { position: absolute; inset: 0; background: var(--accent); transform: scaleY(var(--reading-ratio, 0)); transform-origin: top; }
.reading-dot { position: absolute; top: var(--reading-progress, 0%); left: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-50%); }
.career-scroll::after { content: ''; position: absolute; left: 0; right: 16px; bottom: 0; height: 64px; pointer-events: none; background: linear-gradient(transparent, var(--paper) 78%); }
.scroll-hint { position: absolute; z-index: 1; left: 93px; bottom: 0; color: var(--accent); font-size: 11px; letter-spacing: .03em; pointer-events: none; }
.career-scroll.is-at-end::after, .career-scroll.is-at-end .scroll-hint { opacity: 0; }
.career-scroll.is-static .reading-track { display: none; }
.intro { flex-shrink: 0; padding-bottom: 24px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.intro-heading { font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; line-height: 1.3; letter-spacing: -.04em; }
.intro-heading span { color: var(--accent); }
.intro-detail { margin-top: 7px; color: var(--muted); font-size: 15px; }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.bio-open { border: 0; padding: 4px 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.bio-open:hover { text-decoration: underline; text-underline-offset: 4px; }
.bio-open:focus-visible, .bio-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.about-dialog { width: min(620px, calc(100% - 40px)); max-height: calc(100svh - 40px); overflow-y: auto; padding: 48px 40px 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); }
.about-dialog::backdrop { background: rgb(32 43 72 / .32); backdrop-filter: blur(3px); }
.about-dialog h2 { margin: 0 0 24px; font-size: clamp(25px, 4vw, 34px); line-height: 1.2; }
.about-dialog p { color: var(--muted); line-height: 1.8; }
.about-dialog p + p { margin-top: 20px; }
.bio-close { position: absolute; top: 10px; right: 14px; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); font: 28px/1 Inter, sans-serif; cursor: pointer; }
.career-item { position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr); padding: 17px 0 19px; scroll-margin-top: 12px; }
.career-item::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.career-item:first-child::before { top: 29px; }
.career-item:last-child::before { bottom: calc(100% - 29px); }
.career-content { min-width: 0; }
.career-item + .career-item .career-content::before { content: ''; position: absolute; top: 0; left: 88px; right: 0; height: 1px; background: var(--line); }
.timeline-year { position: relative; align-self: start; display: flex; align-items: flex-start; min-height: 44px; padding-left: 23px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline-dot { position: absolute; top: 8px; left: 0; width: 9px; height: 9px; background: var(--paper); border: 1.5px solid #a9b8d0; border-radius: 50%; transition: background 180ms, border-color 180ms, box-shadow 180ms; }
.timeline-label { display: flex; flex-direction: column; transform: translateY(var(--year-shift, 0px)) scale(var(--year-scale, 1)); transform-origin: left 10px; transition: transform 160ms ease-out, color 160ms; }
.timeline-start { font-size: 13px; line-height: 1.65; font-weight: 500; }
.timeline-end { font-size: 9px; line-height: 1.5; opacity: .8; }
.career-item.is-active .timeline-year, .timeline-year:hover, .timeline-year:focus-visible { color: var(--accent); }
.career-item.is-active .timeline-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px #e2e9fc; }
.career-item.is-active h2 { color: var(--accent); }
.career-item h2 { transition: color 160ms; }
.career-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.career-heading h2 { font-size: 18px; line-height: 1.4; }
.career-item p { margin-top: 4px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.text-page { padding-top: 66px; padding-bottom: 100px; }
.text-page h1 { font-size: 32px; line-height: 1.25; margin-bottom: 34px; }
.empty-note { color: var(--muted); }
.email-link { display: inline-block; font-size: clamp(17px, 2.4vw, 26px); letter-spacing: -.035em; color: var(--accent); border-bottom: 1px solid #acbcf2; overflow-wrap: anywhere; }
.email-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.copy-email { min-height: 44px; padding: 8px 16px; border: 1px solid #acbcf2; border-radius: 6px; color: var(--accent); background: transparent; font: inherit; font-size: 14px; cursor: pointer; }
.copy-email:hover { background: #e6ecfc; }
.copy-email:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.copy-email:disabled { opacity: .6; cursor: wait; }
.copy-status { min-height: 1.5em; margin-top: 8px; color: var(--muted); font-size: 13px; }
.social-links { display: flex; gap: 28px; margin-top: 26px; font-size: 14px; color: var(--muted); }
.social-links span { margin-left: 5px; }
.article-list { max-width: 740px; }
.article-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 20px; border-top: 1px solid var(--line); padding-block: 25px; }
.article-icon { color: var(--accent); padding-top: 3px; }
.article-icon svg { display: block; width: 26px; height: 26px; }
.article-row time, .post-header time { font-size: 13px; color: var(--muted); }
.article-row h2 { font-size: 23px; margin-top: 7px; }
.article-row p { margin-top: 6px; color: var(--muted); }
.post { max-width: 740px; padding-block: 45px 100px; }
.back-link { display: inline-block; color: var(--muted); font-size: 14px; }
.post-header { margin-block: 42px; }
.post-header h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.2; margin-block: 16px 20px; }
.post-description { color: var(--muted); font-size: 18px; }
.post-source { font-size: 13px; color: var(--accent); }
.post-cover { margin: 0 0 38px; }
.post-cover img { display: block; width: 100%; height: auto; border-radius: 8px; }
.post-cover figcaption, .prose figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.prose { font-size: 17px; line-height: 1.9; }
.prose > * + * { margin-top: 24px; }
.prose h2 { font-size: 28px; line-height: 1.3; margin-top: 40px; }
.prose h3 { font-size: 21px; font-weight: 500; margin-top: 32px; }
.prose a { text-decoration: underline; text-underline-offset: 4px; }
.prose blockquote { margin-left: 0; border-left: 1px solid var(--muted); padding-left: 24px; color: var(--muted); }
.prose pre { background: #eee; padding: 18px; overflow: auto; font-size: 14px; }
.prose code { overflow-wrap: anywhere; }
.prose img { max-width: 100%; height: auto; }
.prose figure { margin-inline: 0; }
.prose figure img { display: block; margin-inline: auto; border-radius: 5px; }
.prose { overflow-wrap: anywhere; }
.skip-link { position: absolute; z-index: 10; top: -80px; left: 20px; background: var(--ink); color: white; padding: 12px 20px; }
.skip-link:focus { top: 12px; color: white; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 681px) {
  .about-layout.wrap { width: calc(100% - 24px - max(36px, (100vw - 1110px) / 2)); margin-left: 24px; margin-right: auto; gap: clamp(30px, 4vw, 64px); }
  .portrait { container-type: size; display: grid; grid-template-columns: auto 28px; grid-template-rows: auto; justify-content: start; align-content: start; gap: 8px; height: 100%; align-items: stretch; }
  .portrait-image { width: min(calc(100cqw - 36px), calc(100cqh * 2 / 3)); height: auto; aspect-ratio: 2 / 3; }
  .portrait img { object-position: left top; }
  .portrait .hobbies { display: flex; flex-direction: column; justify-content: space-between; margin: 0; gap: 0; }
  .portrait .hobby { min-height: 22px; }
  .portrait .hobbies li .hobby .hobby-label { left: calc(100% + 8px); right: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
}
@media (max-width: 1100px) {
  .hobbies { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 3px; }
}
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 72px); }
  .about-layout { grid-template-columns: minmax(210px, .8fr) minmax(0, 1.2fr); gap: 44px; }
  .career-heading { flex-wrap: wrap; gap: 4px 14px; }
}
@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr; gap: 16px; padding-block: 24px 14px; }
  .site-header nav { width: 100%; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 40px); }
  .wordmark { font-size: clamp(14px, 4.05vw, 24px); }
  .site-header.wrap { padding-left: 20px; padding-right: 20px; }
  .site-header nav { font-size: 13px; }
  .site-header nav a { padding-inline: 4px; letter-spacing: .16em; }
  .about-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 18px; padding-block: 18px; }
  .portrait { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 20px; }
  .portrait-image { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; }
  .portrait img { object-fit: cover; object-position: 50% 0%; transform: scale(1.3); transform-origin: 50% 24%; }
  .portrait .hobbies { margin: 0; }
  .hobby svg { width: 20px; height: 20px; }
  .hobby-label { top: auto; bottom: calc(100% + 3px); }
  .hobbies li:nth-child(5n) .hobby-label { right: 0; left: auto; transform: none; }
  .intro { padding-bottom: 14px; margin-bottom: 8px; }
  .intro-detail { font-size: 13px; line-height: 1.55; }
  .intro-actions { font-size: 12px; margin-top: 6px; }
  .about-dialog { padding: 48px 24px 28px; }
  .career-item { grid-template-columns: 79px minmax(0, 1fr); }
  .career-item + .career-item .career-content::before { left: 79px; }
  .career-heading h2 { font-size: 18px; }
  .career-item p { font-size: 15px; }
  .text-page { padding-top: 40px; }
  .text-page h1 { font-size: 28px; }
  .post { padding-top: 30px; }
}
@media (max-height: 600px) and (max-width: 1000px) {
  .home-page { height: auto; min-height: 100svh; overflow: visible; }
  .home-page main { flex: none; }
  .about-layout { height: auto; grid-template-rows: auto auto; }
  .portrait { container-type: normal; height: auto; align-self: start; }
  .career-scroll { flex: none; }
  .career-list { flex: none; width: 100%; overflow: visible; }
  .reading-track, .career-scroll::after, .scroll-hint { display: none; }
}
@media (max-height: 600px) and (min-width: 681px) and (max-width: 1000px) {
  .portrait-image { width: min(240px, calc(100vw * .35 - 36px)); }
}
@media (prefers-reduced-motion: reduce) {
  html, .career-list, .blog-page main { scroll-behavior: auto; }
  .timeline-label { transform: none; }
  .timeline-label, .timeline-dot, .career-item h2 { transition: none; }
}
