:root {
  color-scheme:light;
  --ink:#202d3d;
  --muted:#536579;
  --paper:#f4f6f8;
  --line:#d9e1e9;
  --accent:#ffb454;
  --navy:#172b40;
}
* {
  box-sizing:border-box;
}
html {
  scroll-behavior:smooth;
}
body {
  margin:0;
  color:var(--ink);
  background:var(--paper);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Noto Sans CJK JP","Yu Gothic",Meiryo,sans-serif;
  line-height:1.85;
}
a {
  color:#175b91;
  text-underline-offset:.2em;
}
a:hover {
  text-decoration-thickness:2px;
}
a:focus-visible {
  outline:3px solid #b46700;
  outline-offset:4px;
}
.container {
  max-width:1060px;
  margin:auto;
  padding:0 28px;
}
.skip-link {
  position:absolute;
  top:-80px;
  left:20px;
  z-index:2;
  background:white;
  padding:10px 16px;
}
.skip-link:focus {
  top:12px;
}
.hero {
  background:var(--navy);
  color:white;
  padding:24px 0 48px;
  border-bottom:4px solid var(--accent);
}
.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:38px;
  font-size:.85rem;
}
.brand {
  letter-spacing:.14em;
  color:#c4d3e2;
}
.lang-switch {
  display:flex;
  gap:12px;
}
.lang-switch a {
  color:#e1eaf2;
}
.lang-switch [aria-current] {
  color:var(--accent);
}
.eyebrow {
  margin:0 0 10px;
  color:#e3b677;
  font-size:.8rem;
  font-weight:700;
  letter-spacing:.13em;
}
.hero h1 {
  margin:0;
  font-size:clamp(2rem,5vw,3rem);
  line-height:1.3;
  letter-spacing:.04em;
}
.hero-identity {
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:20px 28px;
}
.name-en {
  display:inline-block;
  margin-left:16px;
  color:#c4d3e2;
  font-size:1rem;
  font-weight:400;
  letter-spacing:.02em;
}
.hero-title {
  font-size:clamp(1.1rem,3vw,1.4rem);
  font-weight:700;
  margin:20px 0 10px;
}
.hero-description {
  max-width:780px;
  color:#d4dfea;
  margin:0 0 16px;
}
.hero-meta {
  color:#bdccdb;
  font-size:.85rem;
}
.actions {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:26px;
}
.button {
  display:inline-block;
  padding:9px 18px;
  border:1px solid #74879b;
  border-radius:5px;
  color:white;
  font-weight:650;
  font-size:.95rem;
  text-decoration:none;
}
.button:hover {
  background:#2a425b;
}
.button-primary {
  background:var(--accent);
  border-color:var(--accent);
  color:#172b40;
}
.button-primary:hover {
  background:#ffca88;
}
main.container {
  padding-top:24px;
}
.section-nav {
  display:flex;
  flex-wrap:wrap;
  gap:12px 24px;
  margin-bottom:28px;
  font-size:.9rem;
}
.section-nav a {
  color:var(--muted);
}
.card {
  background:white;
  border:1px solid var(--line);
  border-radius:8px;
  padding:30px;
  margin-bottom:24px;
  scroll-margin-top:20px;
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:18px;
}
h2 {
  font-size:1.35rem;
  margin:0;
  line-height:1.5;
}
h3 {
  font-size:1.05rem;
  margin:0 0 8px;
}
p {
  margin:0 0 12px;
}
p:last-child {
  margin-bottom:0;
}
.section-label,.period,.note {
  color:var(--muted);
  font-size:.85rem;
}
.tag {
  background:#eaf1f7;
  color:#284e70;
  padding:3px 10px;
  border-radius:4px;
  font-size:.75rem;
  font-weight:650;
}
.architecture {
  background:#f4f7fa;
  border:1px solid var(--line);
  border-radius:5px;
  padding:18px;
  margin:20px 0;
}
.architecture figcaption {
  font-size:.8rem;
  color:var(--muted);
  margin-bottom:12px;
}
.architecture img {
  display:block;
  width:100%;
  height:auto;
  border:1px solid var(--line);
  border-radius:4px;
}
.flow {
  display:none;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:8px 0;
  font-size:.85rem;
}
.flow span {
  background:white;
  border:1px solid #c7d4e0;
  padding:5px 10px;
  border-radius:4px;
}
.flow b {
  color:#6d7f91;
  font-weight:400;
}
.project-grid,.skill-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px 28px;
}
.project-grid ul,.job ul {
  padding-left:1.2em;
  margin:0;
}
.project-grid li,.job li {
  margin-bottom:6px;
}
.project-footer {
  border-top:1px solid var(--line);
  padding-top:16px;
  margin-top:20px;
}
.project-links {
  display:flex;
  flex-wrap:wrap;
  gap:12px 24px;
  margin-top:14px;
  font-weight:650;
  font-size:.9rem;
}
.skills {
  margin:0;
}
.skills dt {
  font-weight:700;
  font-size:.85rem;
  color:#335b7d;
  margin-bottom:4px;
}
.skills dd {
  margin:0 0 16px;
}
.skills dd:last-child {
  margin-bottom:0;
}
.job+.job {
  border-top:1px solid var(--line);
  margin-top:24px;
  padding-top:24px;
}
.job-head {
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:4px 18px;
}
.job-summary {
  color:var(--muted);
  font-size:.9rem;
  margin:2px 0 12px;
}
.certs {
  list-style:none;
  margin:0;
  padding:0;
}
.certs li {
  display:flex;
  align-items:baseline;
  gap:16px;
  padding:7px 0;
}
.cert-date {
  flex:0 0 75px;
  color:var(--muted);
  font-size:.85rem;
}
.badge {
  display:inline-block;
  margin-left:8px;
  background:#fff1db;
  color:#754500;
  border-radius:4px;
  padding:0 8px;
  font-size:.75rem;
}
.footer {
  padding-top:8px;
  padding-bottom:28px;
  color:var(--muted);
  font-size:.8rem;
}
.visitor-badge {
  display:grid;
  gap:2px;
  max-width:100%;
  padding:12px 20px;
  border:1px solid var(--accent);
  border-radius:6px;
  background:#102338;
  box-shadow:0 0 0 4px rgb(255 180 84 / 8%);
}
.visitor-label {
  color:#d4dfea;
  font-size:.75rem;
  font-weight:600;
  letter-spacing:.06em;
}
#visitor-count {
  color:var(--accent);
  font-family:ui-monospace,monospace;
  font-size:clamp(1.6rem,4vw,2.25rem);
  font-variant-numeric:tabular-nums;
  font-weight:700;
  line-height:1.2;
  overflow-wrap:anywhere;
}
@media(max-width:650px) {
  .container {
    padding:0 18px;
  }
  .hero {
    padding-bottom:32px;
  }
  .topbar {
    margin-bottom:26px;
  }
  .brand {
    font-size:.7rem;
    letter-spacing:.06em;
  }
  .name-en {
    display:block;
    margin:8px 0 0;
  }
  .card {
    padding:22px 18px;
  }
  .project-grid,.skill-grid {
    grid-template-columns:1fr;
    gap:18px;
  }
  .certs li {
    gap:10px;
  }
  .cert-date {
    flex-basis:65px;
  }
  .architecture {
    padding:12px;
    margin-left:0;
    margin-right:0;
  }
  .architecture img {
    display:none;
  }
  .flow {
    display:flex;
    font-size:.75rem;
    gap:5px;
  }
  .flow span {
    padding:4px 7px;
  }
}
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
}
@media print {
  body {
    background:white;
    font-size:10pt;
  }
  .hero {
    background:white;
    color:var(--ink);
    padding:10px 0 20px;
  }
  .hero-description,.hero-meta,.name-en,.eyebrow {
    color:var(--muted);
  }
  .topbar,.actions,.section-nav,.visitor-badge,.skip-link {
    display:none;
  }
  .card {
    border-radius:0;
    padding:16px 0;
    border-width:0 0 1px;
  }
  h2,h3,.section-heading {
    break-after:avoid;
  }
  .job,.project-grid>div,.skill-grid>dl {
    break-inside:avoid;
  }
}
