:root {
  --blue: #7B99C4;
  --blue-dark: #5d7ba6;
  --ink: #1f2733;
  --ink-soft: #4a5568;
  --bg: #fdfdfc;
  --line: #e4e7ec;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Inter, system-ui, sans-serif;
  font-weight: 350;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue-dark); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253,253,252,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-size: 15px; letter-spacing: .18em; font-weight: 500; }
.brand span { color: var(--blue-dark); }
nav.menu { display: flex; gap: 28px; align-items: center; font-size: 14px; letter-spacing: .08em; }
nav.menu a.active { color: var(--blue-dark); border-bottom: 1px solid var(--blue-dark); }
.lang { font-size: 12px; border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.menu-btn { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  nav.menu {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: 8px 0;
  }
  nav.menu.open { display: flex; }
  nav.menu a { padding: 14px 20px; width: 100%; text-align: center; min-height: 44px; }
}

/* Hero */
.hero { background: var(--blue); color: #fff; }
.hero .container { padding-top: 96px; padding-bottom: 96px; }
.hero h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 300; letter-spacing: .22em; margin: 0 0 8px; }
.hero .name-ja { font-size: clamp(16px, 2.4vw, 22px); letter-spacing: .3em; opacity: .95; margin: 0 0 28px; }
.hero p.tag { max-width: 40em; opacity: .95; margin: 0; }

/* Sections */
section.block { padding: 72px 0; }
h2.sec { font-size: 22px; font-weight: 400; letter-spacing: .14em; margin: 0 0 36px; }
h2.sec::after { content: ""; display: block; width: 40px; height: 2px; background: var(--blue); margin-top: 10px; }

/* Works grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; background: #eef1f5; }
.card h3 { font-size: 16px; font-weight: 500; margin: 12px 0 2px; }
.card .meta { font-size: 13px; color: var(--ink-soft); }

/* Work detail */
.work-hero img { width: 100%; max-height: 70vh; object-fit: contain; background: #f2f4f7; }
.work-title { font-size: clamp(22px, 3.4vw, 32px); font-weight: 400; margin: 36px 0 4px; }
.work-alt { color: var(--ink-soft); margin: 0 0 24px; font-size: 15px; }
table.specs { border-collapse: collapse; width: 100%; max-width: 560px; margin: 0 0 40px; font-size: 15px; }
table.specs th { text-align: left; font-weight: 500; color: var(--ink-soft); padding: 10px 24px 10px 0; white-space: nowrap; vertical-align: top; }
table.specs td { padding: 10px 0; }
table.specs tr { border-bottom: 1px solid var(--line); }
.essay { max-width: 42em; }
.essay p { margin: 0 0 1.6em; }
.gallery { display: grid; gap: 24px; margin-top: 48px; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.worknav { display: flex; justify-content: space-between; gap: 16px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }

/* About */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }
.cards4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 40px 0; }
@media (max-width: 640px) { .cards4 { grid-template-columns: 1fr; } }
.cards4 .c { border: 1px solid var(--line); border-top: 2px solid var(--blue); padding: 20px; }
.cards4 h3 { margin: 0 0 8px; font-size: 15px; font-weight: 500; }
.cards4 p { margin: 0; font-size: 14px; color: var(--ink-soft); }
table.timeline { border-collapse: collapse; font-size: 15px; }
table.timeline th { text-align: left; padding: 8px 28px 8px 0; color: var(--blue-dark); font-weight: 500; vertical-align: top; white-space: nowrap; }
table.timeline td { padding: 8px 0; }

/* Contact */
form.contact { max-width: 560px; display: grid; gap: 18px; }
form.contact label { font-size: 14px; font-weight: 500; display: grid; gap: 6px; }
form.contact input, form.contact select, form.contact textarea {
  font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; width: 100%;
}
form.contact button {
  font: inherit; background: var(--blue); color: #fff; border: 0; padding: 14px 32px;
  border-radius: 4px; cursor: pointer; letter-spacing: .1em; min-height: 44px;
}
form.contact button:hover { background: var(--blue-dark); }
.hp { position: absolute; left: -9999px; }

/* Footer */
footer.site { background: var(--blue); color: #fff; margin-top: 72px; }
footer.site .container { padding: 48px 20px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
footer.site a { color: #fff; opacity: .9; }
footer.site a:hover { opacity: 1; color: #fff; text-decoration: underline; }
footer .links { display: flex; gap: 24px; font-size: 14px; }
footer .copy { font-size: 12px; opacity: .8; }

/* Lightbox */
.lb { position: fixed; inset: 0; background: rgba(20,24,32,.92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lb button { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: #fff; font-size: 32px; cursor: pointer; padding: 10px; }

.note { font-size: 14px; color: var(--ink-soft); }
.btn-line { display: inline-block; border: 1px solid var(--ink); padding: 12px 28px; font-size: 14px; letter-spacing: .1em; margin-top: 24px; }
.btn-line:hover { border-color: var(--blue-dark); }
