:root {
  --paper: #FAF8F2;
  --paper-2: #F2EFE6;
  --ink: #102F23;
  --ink-soft: #4C6559;
  --line: #DCDFD4;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 20px 96px;
}

.hero-mark {
  width: min(560px, 86vw);
  height: auto;
  margin-bottom: 36px;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.005em;
  margin: 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(440px, 80vw);
  margin: 22px auto 30px;
  color: var(--ink);
}
.divider span { flex: 1; height: 1px; background: currentColor; opacity: .55; }
.divider svg { width: 36px; height: auto; }

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.3;
  margin: 0 0 12px;
}

.intro {
  max-width: 34rem;
  margin: 0;
  color: var(--ink-soft);
}

/* gentle entrance */
.js .hero > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .9s var(--ease) forwards;
}
.js .hero > :nth-child(2) { animation-delay: .15s; }
.js .hero > :nth-child(3) { animation-delay: .25s; }
.js .hero > :nth-child(4) { animation-delay: .35s; }
.js .hero > :nth-child(5) { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Projects ---------- */
main { padding: 0 20px; }

.section-label {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-soft);
  margin: 0 0 36px;
}

.projects { max-width: 1120px; margin: 0 auto; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
a.card:hover, a.card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -26px rgba(19, 56, 42, .45);
  border-color: #C9D0C3;
}
a.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.card-art {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-art img {
  max-height: 64%;
  max-width: 64%;
  width: auto;
  transition: transform .7s var(--ease);
}
a.card:hover .card-art img { transform: scale(1.05); }

.art-froggy { background: radial-gradient(120% 90% at 50% 100%, #CEEDB5 0%, #E9F6DE 60%, #F4FAEE 100%); }
.art-grc { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.art-octopus { background: var(--ink); color: var(--paper); }
.art-gugu { background: var(--paper-2); color: var(--ink); }

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: .95;
  text-align: center;
}
.wordmark em { font-style: italic; font-size: .72em; opacity: .8; }

.card-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.card-kind {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.1;
  margin: 0 0 8px;
}
.card-body > p:not(.card-kind) { margin: 0 0 22px; color: var(--ink-soft); }

.card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: .95rem;
}
.card-link i { font-style: normal; display: inline-block; transition: transform .4s var(--ease); }
a.card:hover .card-link i { transform: translateX(5px); }
.card-link.soon {
  align-self: flex-start;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ---------- About ---------- */
.about {
  max-width: 980px;
  margin: 140px auto 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: center;
}
.about-mark { width: 100%; height: auto; opacity: .92; }
.about h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3rem);
  line-height: 1.05;
  margin: 0 0 18px;
}
.about p { margin: 0 0 14px; color: var(--ink-soft); max-width: 36rem; }
.about p:first-of-type { color: var(--ink); }
[lang="ja"] { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 150px;
  padding: 64px 20px 56px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer p { margin: 0; }
.footer-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.footer-kinds { color: var(--ink-soft); font-size: .92rem; margin-top: 4px !important; }
.footer-contact {
  display: inline-block;
  margin: 26px 0 30px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.footer-contact:hover { opacity: .7; }
.footer-copy { font-size: .8rem; color: var(--ink-soft); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.grid .card:nth-child(2) { transition-delay: .08s; }
.grid .card:nth-child(4) { transition-delay: .08s; }
.js a.card.reveal.in:hover { transition-delay: 0s; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .card-body { padding: 22px 22px 26px; }
  .about { grid-template-columns: 1fr; gap: 28px; margin-top: 100px; text-align: center; }
  .about-mark { width: 200px; margin: 0 auto; }
  .about p { margin-left: auto; margin-right: auto; }
  .footer { margin-top: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero > *, .js .reveal { opacity: 1; transform: none; animation: none; transition: none; }
  .card, .card-art img, .card-link i { transition: none; }
}
