/* NAYAN DIARY — Matrix-inspired theme
   すべてのページで <link rel="stylesheet" href="./style.css"> を読み込めば同じ見た目になる。
   外部フォント・外部画像・JavaScriptは使用していない。
*/
:root {
  color-scheme: dark;
  --bg: #050a07;
  --panel: #07130d;
  --text: #b7e9c3;
  --muted: #76a889;
  --accent: #80ffa3;
  --accent-strong: #40f984;
  --line: #245338;
  --glow: 0 0 13px rgba(73, 255, 128, 0.22);
  --font-mono: Consolas, "Courier New", "MS Gothic", "ＭＳ ゴシック", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.9 var(--font-mono);
  letter-spacing: .035em;
  -webkit-font-smoothing: antialiased;
}
/* 全ページをうっすらCRT風の走査線で統一 */
body::before {
  position: fixed;
  inset: 0;
  z-index: 10;
  content: "";
  pointer-events: none;
  opacity: .30;
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 3px,
    rgba(28, 68, 39, .26) 4px, transparent 5px
  );
}
::selection { background: #83ffac; color: #041006; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* 見出し、フォーム、コード、表などにも同じ世界観を適用 */
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select {
  background: #061009;
  border: 1px solid var(--line);
  padding: .65em .8em;
}
button {
  padding: .45em 1em;
  border: 1px solid var(--accent-strong);
  background: #092014;
  cursor: pointer;
}
button:hover { background: #10331e; }
a { color: var(--accent); text-underline-offset: .25em; }
a:hover { color: #ceffdc; text-shadow: var(--glow); }
h1, h2, h3, h4, h5, h6 { color: var(--accent); line-height: 1.5; }
h1, h2, h3, h4, h5, h6, p { overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
blockquote { border-left: 2px solid var(--accent-strong); padding-left: 1rem; color: var(--muted); }
pre, code { font-family: var(--font-mono); }
pre { border: 1px solid var(--line); background: #061009; padding: 1rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--line); padding: .45em .75em; text-align: left; }
th { color: var(--accent); background: #092014; }
img, video { max-width: 100%; height: auto; }

.site-shell { width: min(100% - 48px, 900px); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.site-header { padding-top: 32px; }
.system-line, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .12em;
}
.system-line { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.system-status { display: inline-flex; align-items: center; gap: 9px; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 11px var(--accent-strong); }
.site-brand { padding: 56px 0 34px; }
.eyebrow, .section-label { margin: 0 0 13px; color: var(--muted); font-size: .77rem; letter-spacing: .16em; }
.site-brand h1 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(2.4rem, 8vw, 5.6rem);
  letter-spacing: 0;
  font-weight: 400;
  line-height: 1.13;
  text-shadow: 0 0 20px rgba(61, 255, 123, .16);
}
/* "NAYAN_DIARY" = 11文字。カーソルは文字列の右側を追いかける。 */
.typing-title {
  display: inline-block;
  width: 11ch;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  animation: typing-title 0.6s steps(11, end) both;
}
.title-separator { color: var(--muted);}
.cursor { display: inline-block; margin-left: .12em; font-size: .7em; color: var(--accent-strong); animation: blink 1.1s steps(1, end) infinite; }
.site-description { margin: 20px 0 0; color: var(--muted); font-size: .8rem; letter-spacing: .22em; }
.main-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 15px 0; border-block: 1px solid var(--line); }
.nav-link { text-decoration: none; font-size: .85rem; letter-spacing: .1em; }
.nav-link.current { color: #d4ffde; text-shadow: var(--glow); }
main { flex: 1; padding: 43px 0 70px; }
.content-panel { position: relative; min-height: 265px; padding: clamp(22px, 5vw, 42px); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(20, 57, 32, .2), rgba(5, 12, 7, .62)); }
.content-panel::before, .content-panel::after { content: ""; position: absolute; width: 12px; height: 12px; border-color: var(--accent-strong); border-style: solid; pointer-events: none; }
.content-panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.content-panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.content-panel h2 { font-size: clamp(1.15rem, 3vw, 1.6rem); margin: 21px 0 14px; font-weight: 500; text-shadow: var(--glow); }
.content-panel p { max-width: 65ch; }
.terminal-prompt span + span { margin-left: 8px; }
.prompt-cursor { animation: blink 1.1s steps(1, end) infinite; }
.site-footer { padding: 16px 0 27px; border-top: 1px solid var(--line); }
@keyframes typing-title {
  from { width: 0; }
  to { width: 11ch; }
}
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 600px) {
  .site-shell { width: min(100% - 30px, 900px); }
  .site-header { padding-top: 18px; }
  .site-brand { padding: 46px 0 31px; }
  .site-description { font-size: .72rem; }
  main { padding-top: 26px; padding-bottom: 44px; }
  .system-address { font-size: .63rem; }
}
@media (prefers-reduced-motion: reduce) {
  .typing-title { animation: none; width: 11ch; }
  .cursor, .prompt-cursor { animation: none; }
  html { scroll-behavior: auto; }
}
