:root {
  color-scheme: light;
  --paper: #f7f0e4;
  --paper-light: #fffaf1;
  --ink: #352f2b;
  --ink-soft: #6f645d;
  --line: #d8ccbc;
  --terracotta: #c9785d;
  --terracotta-dark: #9f543f;
  --green: #667a62;
  --mustard: #d5a84f;
  --shadow: 0 18px 55px rgb(74 56 39 / 9%);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 9%, rgb(201 120 93 / 12%) 0 8rem, transparent 8.1rem),
    linear-gradient(90deg, transparent 49.8%, rgb(104 84 66 / 3%) 50%, transparent 50.2%),
    var(--paper);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", system-ui, sans-serif;
  line-height: 1.8;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.9rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.hero,
.section,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-mark {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50% 47% 45% 48%;
  color: var(--paper-light);
  background: var(--terracotta);
  font-family: serif;
  font-size: 1.1rem;
  transform: rotate(-5deg);
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: 0.88rem;
  font-weight: 600;
}

nav a {
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--terracotta-dark);
}

.nav-github {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  padding-block: 5rem;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--terracotta-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.eyebrow span {
  display: inline-block;
  width: 7px;
  aspect-ratio: 1;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--terracotta);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.35rem, 5.5vw, 4.8rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.04em;
}

h1 em {
  position: relative;
  color: var(--terracotta-dark);
  font-style: normal;
}

h1 em::after {
  position: absolute;
  right: -0.03em;
  bottom: -0.08em;
  left: -0.03em;
  height: 7px;
  border-radius: 50%;
  background: rgb(213 168 79 / 50%);
  content: "";
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 680px;
  margin: 2rem 0 0;
  color: var(--ink-soft);
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgb(53 47 43 / 12%);
}

.button-primary {
  color: var(--paper-light);
  background: var(--ink);
}

.button-secondary {
  border-color: var(--line);
  background: rgb(255 250 241 / 60%);
}

.hero-note {
  position: relative;
  padding: 2.2rem 2rem 1.8rem;
  border: 1px solid #dfd1bd;
  border-radius: 4px 9px 5px 7px;
  background: #fff9e9;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

.note-tape {
  position: absolute;
  top: -17px;
  left: 50%;
  width: 88px;
  height: 30px;
  background: rgb(215 185 128 / 45%);
  transform: translateX(-50%) rotate(-3deg);
}

.note-label {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.hero-note ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-note li {
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
  font-family: "Yu Mincho", "YuMincho", serif;
  font-weight: 600;
}

.hero-note li span {
  display: inline-block;
  width: 1.8rem;
  color: var(--terracotta-dark);
  text-align: center;
}

.note-foot {
  margin: 1.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.section {
  padding-block: 7rem;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 3rem;
}

h2 {
  margin: 0;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 600;
  line-height: 1.4;
}

.section-heading > p {
  margin: 0 0 0.35rem;
  color: var(--ink-soft);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.project-card {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.6rem;
  border: 1px solid rgb(53 47 43 / 12%);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(74 56 39 / 6%);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px) rotate(-0.25deg);
  box-shadow: var(--shadow);
}

.card-terracotta {
  background: #efc7b8;
}

.card-green {
  background: #cbd5c1;
}

.card-mustard {
  background: #eddaaa;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-number {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
}

.tag {
  padding: 0.25rem 0.7rem;
  border: 1px solid rgb(53 47 43 / 22%);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.project-card h3 {
  margin: 0 0 1rem;
  font-family: "Yu Mincho", "YuMincho", serif;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.45;
}

.project-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.8;
}

.project-link,
.text-link {
  width: fit-content;
  text-underline-offset: 0.25em;
  font-size: 0.83rem;
  font-weight: 800;
}

.project-media {
  height: 168px;
  display: grid;
  margin: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgb(53 47 43 / 18%);
  border-radius: 13px;
  box-shadow: 0 7px 18px rgb(53 47 43 / 9%);
}

.project-media-light {
  background: #faf6f3;
}

.project-media-dark {
  background: #202125;
}

.project-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.project-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.project-status span {
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--terracotta-dark);
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 8vw, 8rem);
}

.about-body {
  color: var(--ink-soft);
}

.about-body p:first-child {
  margin-top: 0;
}

.about-body .text-link {
  display: inline-block;
  margin-top: 1.2rem;
  color: var(--terracotta-dark);
}

footer {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.76rem;
}

footer p {
  margin: 0.2rem 0;
}

.footer-name {
  color: var(--ink);
  font-family: "Yu Mincho", "YuMincho", serif;
  font-size: 1.05rem;
  font-weight: 700;
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 4rem;
    padding-block: 4.5rem 6rem;
  }

  .hero-note {
    width: min(420px, 92%);
    margin-inline: auto;
  }

  .section-heading,
  .about {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 330px;
  }
}

@media (max-width: 600px) {
  .site-header,
  .hero,
  .section,
  footer {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    min-height: 76px;
  }

  .brand > span:last-child {
    display: none;
  }

  nav a:not(.nav-github) {
    display: none;
  }

  h1 {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }

  .section {
    padding-block: 5rem;
  }

  footer {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
