/* sureshmohan.com — Japanese editorial grid
   hairline grid · fine bilingual type · vermilion (朱) accent · 縦書き */

:root {
  --gothic: "Zen Kaku Gothic New", system-ui, -apple-system, sans-serif;
  --mincho: "Zen Old Mincho", Georgia, "Times New Roman", serif;
  --mono:   "Space Mono", ui-monospace, "SF Mono", monospace;

  --paper:    #f4f2ec;
  --paper-2:  #ece9e1;
  --ink:      #16140f;
  --ink-soft: #57534a;
  --ink-faint:#9c968a;
  --line:     #d8d3c7;
  --shu:      #cf3a22;   /* 朱色 vermilion */
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper:    #13110d;
    --paper-2:  #1c1a15;
    --ink:      #ece8df;
    --ink-soft: #a8a397;
    --ink-faint:#6a655b;
    --line:     #2a2720;
    --shu:      #e8553a;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--shu); color: var(--paper); }

/* ---- frame & grid ------------------------------------------------------- */
.frame {
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px 1fr;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.rail {
  border-right: 1px solid var(--line);
  padding: 2.1rem 1.6rem;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.main {
  padding: 2.6rem clamp(1.5rem, 4vw, 3.2rem) 3rem;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- rail / sidebar ----------------------------------------------------- */
.wordmark {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .mark {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--shu);
}
.wordmark .wm-name {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  font-weight: 500;
  line-height: 1.55;
  padding-top: 0.4rem;
}

.rail-nav { margin-top: 2.3rem; display: flex; flex-direction: column; }
.rail-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
  transition: color 0.15s ease, padding-left 0.15s ease;
}
.rail-nav a:last-child { border-bottom: 1px solid var(--line); }
.rail-nav a:hover { color: var(--shu); padding-left: 0.35rem; }
.rail-nav a.active { color: var(--ink); box-shadow: inset 2px 0 0 var(--shu); padding-left: 0.5rem; }
.rail-nav .ix {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  min-width: 1.8em;
}
.rail-nav a.active .ix { color: var(--shu); }
.rail-nav .lbl { font-size: 0.95rem; font-weight: 500; }

.rail-vertical {
  flex: 1;
  display: flex;
  align-items: center;
  margin: 1.8rem 0;
}
.rail-vertical span {
  writing-mode: vertical-rl;
  text-orientation: sideways;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.66rem;
  color: var(--ink-faint);
}

.rail-foot { display: flex; gap: 0.7rem; align-items: flex-end; }
.rail-foot .mark-sm {
  color: var(--shu);
  font-size: 0.8rem;
  line-height: 1;
}
.rail-foot .mono {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: var(--ink-faint);
}

/* ---- index hero --------------------------------------------------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--gothic);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  letter-spacing: -0.02em;
  line-height: 1.14;
}
.hero-lede {
  font-family: var(--mincho);
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 42ch;
  margin-top: 1.15rem;
}
.hero-lede a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--shu); }
.hero-lede a:hover { color: var(--shu); }

/* ---- blocks ------------------------------------------------------------- */
.block { margin-top: clamp(2.6rem, 6vw, 4rem); }
.block--first { margin-top: 0.75rem; }

/* empty / in-progress state */
.empty-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mincho);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.empty-note .pulse {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--shu);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(207, 58, 34, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(207, 58, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(207, 58, 34, 0); }
}
.block-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}
.block-head .num { font-family: var(--mono); font-size: 0.72rem; color: var(--shu); }
.block-head .bt { font-size: 1.02rem; font-weight: 700; }
.block-head .rule { flex: 1; height: 1px; background: var(--line); }

/* ---- post list ---------------------------------------------------------- */
.post-list { list-style: none; }
.post-list a {
  display: grid;
  grid-template-columns: 6.2rem 1fr auto auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: padding-left 0.18s ease;
}
.post-list li:first-child a { border-top: 1px solid var(--line); }
.post-list a:hover { padding-left: 0.6rem; }
.post-list a:hover .p-title { color: var(--shu); }
.post-list a:hover .p-arrow { color: var(--shu); transform: translateX(3px); }
.p-date  { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-faint); }
.p-title { font-size: 1.04rem; font-weight: 500; transition: color 0.15s ease; }
.p-tags  { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.04em; color: var(--ink-faint); }
.p-arrow { color: var(--ink-faint); transition: transform 0.18s ease, color 0.18s ease; }

/* ---- about excerpt ------------------------------------------------------ */
.about-excerpt {
  font-family: var(--mincho);
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink-soft);
  max-width: 44ch;
  margin-top: 1.1rem;
}
.more {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--shu);
  text-decoration: none;
}
.more:hover { border-bottom: 1px solid var(--shu); }

/* ---- footers ------------------------------------------------------------ */
.main-foot {
  margin-top: auto;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.main-foot a { color: var(--ink-soft); text-decoration: none; }
.main-foot a:hover { color: var(--shu); }

/* ---- post / article ----------------------------------------------------- */
.post { max-width: 42em; }
.post-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.4rem;
}
.post-eyebrow .shu-no { color: var(--shu); }
.post-title {
  font-family: var(--gothic);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.16;
}
.post-lede {
  font-family: var(--mincho);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 1rem;
  max-width: 40ch;
}
.post-rule { height: 1px; background: var(--line); margin: 2rem 0 2.4rem; }

.post-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.post-foot a { color: var(--ink-soft); text-decoration: none; }
.post-foot a:hover { color: var(--shu); }

/* ---- prose -------------------------------------------------------------- */
.prose { font-size: 1.02rem; line-height: 1.8; color: var(--ink); }
.prose > * + * { margin-top: 1.2rem; }
.prose h2 {
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.prose h3 { font-size: 1.08rem; font-weight: 700; margin-top: 1.8rem; }
.prose a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--shu); }
.prose a:hover { color: var(--shu); }
.prose strong { font-weight: 700; }
.prose em { font-family: var(--mincho); font-style: italic; }
.prose blockquote {
  border-left: 2px solid var(--shu);
  padding-left: 1.2rem;
  color: var(--ink-soft);
  font-family: var(--mincho);
  font-size: 1.08rem;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--paper-2);
  padding: 0.12em 0.4em;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.prose pre {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--shu);
  padding: 1rem 1.2rem;
  overflow-x: auto;
}
.prose pre code { background: none; border: none; padding: 0; font-size: inherit; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-top: 0.4rem; }
.prose li::marker { color: var(--shu); }
.prose hr { border: none; text-align: center; margin: 2.4rem 0; }
.prose hr::before { content: "◆ ◆ ◆"; color: var(--ink-faint); letter-spacing: 0.5em; font-size: 0.6rem; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line); display: block; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; }
.prose th {
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 760px) {
  .frame { grid-template-columns: 1fr; border-left: none; border-right: none; }
  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.4rem;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 1.2rem 1.3rem;
  }
  .wordmark .mark { font-size: 2rem; }
  .rail-nav { margin-top: 0; flex-direction: row; gap: 1.1rem; margin-left: auto; }
  .rail-nav a { border: none; padding: 0.2rem 0; }
  .rail-nav a:last-child { border: none; }
  .rail-nav a.active { box-shadow: none; padding-left: 0; }
  .rail-nav .ix { display: none; }
  .rail-vertical, .rail-foot { display: none; }
  .main { padding: 1.8rem 1.3rem 2.5rem; }
  .post-list a { grid-template-columns: 1fr auto; gap: 0.25rem 0.8rem; padding: 0.85rem 0; }
  .p-date { grid-column: 1 / -1; order: -1; }
  .p-tags { display: none; }
}
