/* ───────── Tokens ───────── */
:root {
  --accent: #2e6b57;
  --accent-dark: #1f4d3e;
  --accent-soft: #9fd1bd;
  --text: #22262a;
  --text-2: #4b5157;
  --text-3: #5b6168;
  --bg: #ffffff;
  --bg-alt: #f6f7f5;
  --bg-muted: #eceeea;
  --line: #e6e8e5;
  --line-2: #d5d9d4;
  --dark: #22262a;
  --wrap: 960px;
  --gutter: 24px;
  --font: "Noto Sans JP", "Noto Sans Myanmar", "Hiragino Sans", "Yu Gothic", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.skip { position: absolute; left: -9999px; top: 8px; background: var(--bg); padding: 8px 16px; z-index: 100; }
.skip:focus { left: 8px; }

/* ───────── Header ───────── */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-weight: 700; font-size: 16px; letter-spacing: 0.02em; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--text); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 14px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.nav-links a:hover { color: var(--accent); }

.lang-toggle { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.lang-toggle button { min-width: 44px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: 500 13px var(--font); cursor: pointer; }
.lang-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ───────── Hero ───────── */
.hero { padding: 104px 0 96px; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 64px; }
.hero-text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--accent); }
.hero-name { font-size: clamp(38px, 6vw, 60px); line-height: 1.15; font-weight: 700; letter-spacing: 0.01em; }
.hero-sub { font-size: 18px; color: var(--text-3); letter-spacing: 0.08em; }
.rule { display: block; width: 48px; height: 2px; background: var(--accent); margin: 10px 0; }
.hero-role { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.hero-lead { max-width: 600px; font-size: clamp(19px, 2.4vw, 23px); line-height: 1.6; font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }

.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 28px; border-radius: 8px; font-size: 15px; font-weight: 500; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border: 1px solid #cfd4ce; color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.photo { flex-shrink: 0; width: 280px; margin-right: 56px; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--bg-muted); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); font-size: 13px; }

/* ───────── Sections ───────── */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--dark); color: #fff; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 64px; }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.split > .section-head { margin-bottom: 0; }
.num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.dark .num { color: var(--accent-soft); }
.section-head h2 { font-size: 30px; font-weight: 700; line-height: 1.3; }
.section-body { display: flex; flex-direction: column; min-width: 0; }

/* About */
.about-text { display: flex; flex-direction: column; gap: 18px; }
.about-text p { font-size: 17px; line-height: 1.9; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.fact { padding: 20px; background: #fff; border: 1px solid #e3e6e2; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.fact-label { font-size: 12px; color: var(--text-3); letter-spacing: 0.06em; }
.fact-value { font-size: 15px; font-weight: 500; line-height: 1.5; }

/* Skills */
.skill-group { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.skill-group:last-child { margin-bottom: 0; }
.skill-label { font-size: 14px; color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 6px; font-family: var(--mono); font-size: 14px; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.project { background: #fff; border: 1px solid #e3e6e2; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.project-shot { aspect-ratio: 16 / 10; background: var(--bg-muted); border-bottom: 1px solid #e3e6e2; }
.project-shot img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.project-num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.project h3 { font-size: 19px; font-weight: 700; }
.project p { font-size: 14px; line-height: 1.7; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; background: #f0f2ef; border-radius: 4px; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.project-links { display: flex; gap: 20px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--bg-muted); }
.project-links a { font-size: 14px; font-weight: 500; text-decoration: none; }
.empty { grid-column: 1 / -1; padding: 48px 24px; text-align: center; color: var(--text-3); font-size: 15px; background: #fff; border: 1px dashed var(--line-2); border-radius: 12px; }

/* Education */
.timeline li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.timeline li:first-child { padding-top: 0; }
.period { font-family: var(--mono); font-size: 13px; color: var(--text-3); padding-top: 3px; }
.school { font-size: 16px; font-weight: 500; }
.detail { font-size: 14px; color: var(--text-3); }

/* Certifications */
.cert-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid #e0e3df; }
.cert-list li:first-child { padding-top: 0; }
.cert-name { font-size: 16px; font-weight: 500; }
.cert-status { font-size: 14px; color: var(--text-3); white-space: nowrap; }
.cert-status.studying { color: var(--accent); }
.sub-label { font-size: 14px; color: var(--text-3); margin: 36px 0 14px; }
.langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lang { padding: 20px; background: #fff; border: 1px solid #e3e6e2; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.lang-native { font-size: 18px; font-weight: 500; }
.lang-meta { font-size: 13px; color: var(--text-3); }

/* Contact */
.contact-lead { font-size: 17px; color: #c9cdd1; }
.contact-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.contact-links:empty { display: none; }
.contact-link { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 24px; border: 1px solid #4a5056; border-radius: 10px; color: #fff; font-size: 15px; text-decoration: none; word-break: break-all; }
.contact-link:hover { border-color: var(--accent-soft); color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--text-3); }

.noscript { padding: 24px; text-align: center; }

/* Fade-in */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ───────── Responsive ───────── */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .header-inner { height: 60px; }
  html { scroll-padding-top: 68px; }
  .hero { padding: 48px 0 64px; }
  .hero-inner { flex-direction: column-reverse; align-items: flex-start; gap: 32px; }
  .photo { width: 160px; margin-right: 0; }
  .section { padding: 64px 0; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .section-head { margin-bottom: 28px; }
  .section-head h2 { font-size: 26px; }
  .facts, .langs, .projects { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cert-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .contact-link { width: 100%; }
}
