:root {
  --desk: #211d17;
  --desk-raised: #29241d;
  --paper: #ece2c8;
  --paper-line: #cdbd93;
  --ink: #2b2318;
  --ink-dim: #5c5140;
  --text: #e7ddc4;
  --text-dim: #ada088;
  --seal: #9c3324;
  --seal-soft: rgba(156, 51, 36, 0.14);
  --ember: #e2703a;
  --max-width: 880px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--text);
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2 {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  color: var(--text);
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

/* ---------- Hanko seal mark ---------- */

.seal {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid var(--ember);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 0 1.8rem;
  transform: rotate(-7deg);
  flex-shrink: 0;
  animation: stamp-down 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.seal::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid var(--ember);
  border-radius: 50%;
  opacity: 0.3;
  transform: rotate(9deg);
}

.seal::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid var(--ember);
  border-radius: 50%;
  opacity: 0.6;
}

.seal span {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 700;
  font-size: 2.8rem;
  color: var(--ember);
  line-height: 1;
}

.seal--mini {
  width: 32px;
  height: 32px;
  margin: 0;
  border-width: 2px;
  animation: none;
}

.seal--mini::before { inset: -2px; }
.seal--mini::after { inset: 3px; }
.seal--mini span { font-size: 0.85rem; }

@keyframes stamp-down {
  0% { transform: rotate(-7deg) scale(1.6); opacity: 0; }
  65% { transform: rotate(-7deg) scale(0.94); opacity: 1; }
  100% { transform: rotate(-7deg) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .seal { animation: none; }
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: rgba(33, 29, 23, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(156, 51, 36, 0.25);
}

.masthead-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.masthead-name {
  font-family: "Shippori Mincho", serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.toc {
  display: flex;
  gap: 1.3rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.toc::-webkit-scrollbar { display: none; }

.toc a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.86rem;
  white-space: nowrap;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover,
.toc a.is-active {
  color: var(--text);
  border-color: var(--ember);
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.id-card {
  background: var(--paper);
  border-radius: 8px;
  width: 168px;
  padding: 12px 12px 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  transform: rotate(4deg);
  flex-shrink: 0;
  position: relative;
  margin-top: 1.6rem;
}

.id-card::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 12px;
  background: var(--desk);
  border-radius: 0 0 6px 6px;
}

.id-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid var(--paper-line);
}

.id-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.id-name {
  font-family: "Shippori Mincho", serif;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0.6rem 0 0;
  text-align: center;
}

.id-role {
  color: var(--ink-dim);
  font-size: 0.72rem;
  margin: 0.15rem 0 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  margin: 0 0 1.1rem;
  font-weight: 800;
}

.tagline {
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 30rem;
  margin: 0 0 2rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.social-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 1px solid var(--paper-line);
  padding-bottom: 0.1rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--ember);
  border-color: var(--ember);
}

/* ---------- Main / entries ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}

.entry {
  margin-bottom: 3.4rem;
  scroll-margin-top: 4.5rem;
}

.entry-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0 0 0.6rem;
}

.entry-head-text {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
}

.pinned-photo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  transform: rotate(-4deg);
  position: relative;
}

.pinned-photo--right {
  transform: rotate(4deg);
}

.pinned-photo::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 40px;
  height: 15px;
  background: rgba(236, 226, 200, 0.5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.pinned-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.folio {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ember);
  font-variant-numeric: tabular-nums;
}

.entry h2 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
}

.lead {
  color: var(--text-dim);
  margin: 0 0 1.3rem;
  max-width: 34rem;
  font-size: 0.95rem;
}

.sheet {
  background: var(--paper);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  text-decoration: none;
  border-bottom: 1px solid var(--paper-line);
  transition: background 0.12s ease;
}

.sheet .row:last-child { border-bottom: none; }

a.row:hover,
a.row:focus-visible {
  background: rgba(156, 51, 36, 0.08);
}

.row-avatar {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: visible;
  background: #fff;
  border: 1px solid var(--paper-line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.row-avatar .stamp {
  position: absolute;
  bottom: -3px;
  right: -3px;
  border: 2px solid var(--paper);
}

.stamp {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stamp--live {
  background: var(--seal);
}

.stamp--wip {
  border: 1.5px solid var(--ink-dim);
  background: transparent;
}

.stamp--review {
  border: 1.5px dashed var(--seal);
  background: transparent;
}

.row-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-grow: 1;
  min-width: 0;
}

.row-title {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.98rem;
}

.row-desc {
  color: var(--ink-dim);
  font-size: 0.86rem;
  line-height: 1.55;
}

.row-meta {
  color: var(--ink-dim);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.row-status {
  color: var(--seal);
  font-size: 0.84rem;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

div.row .row-status {
  color: var(--ink-dim);
  font-weight: 500;
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3.5rem;
  border-top: 1px solid rgba(156, 51, 36, 0.2);
  color: var(--text-dim);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0.3rem 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 700px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .id-card {
    align-self: center;
    transform: rotate(-3deg);
    margin-top: 2rem;
  }
}

@media (max-width: 640px) {
  .masthead {
    gap: 1rem;
    padding: 0.6rem 1.1rem;
  }

  .hero {
    padding: 3rem 1.2rem 2.4rem;
  }

  .row {
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
  }

  .row-status {
    margin-left: 3.7rem;
  }

  .pinned-photo {
    width: 56px;
    height: 56px;
  }
}

/* ---------- Dark/light: this brand is dark-first by design ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --desk: #211d17;
    --desk-raised: #29241d;
  }
}
