/* style.css
 * コードエディタ(VSCode Dark+風)のシンタックスハイライトをイメージした配色。
 * profile / achievements / projects / contact は、すべて同じ「term-list」という
 * リスト形式に統一して表示している([ラベル] + 本文、という構造)。
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #0d1117;
  --fg: #d4d4d4;

  /* シンタックスハイライトのトークン色(VSCode Dark+相当) */
  --tok-key: #9cdcfe;       /* 変数・キー: 水色 */
  --tok-string: #ce9178;    /* 文字列: サーモンオレンジ */
  --tok-fn: #dcdcaa;        /* 関数・コマンド名: 黄色 */
  --tok-keyword: #c586c0;   /* キーワード・フラグ: 紫 */
  --tok-number: #b5cea8;    /* 数値: 薄緑 */
  --tok-comment: #6a9955;   /* コメント: 緑がかったグレー */
  --tok-dir: #4fc1ff;       /* ディレクトリ: 明るい青 */
  --tok-error: #f14c4c;     /* エラー: 赤 */

  --border: rgba(255, 255, 255, 0.12);

  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- CRT演出(走査線・ビネット) --- */

.crt-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0.25) 2px,
    rgba(0, 0, 0, 0) 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.35;
}

.crt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 11;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

/* --- レイアウト --- */

.terminal {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 20px 96px;
}

.term-block {
  margin-bottom: 40px;
}

.prompt {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

/* --- シンタックスハイライトのトークン --- */

.tok-path    { color: var(--tok-comment); }
.tok-key     { color: var(--tok-key); }
.tok-string  { color: var(--tok-string); }
.tok-fn      { color: var(--tok-fn); font-weight: 700; }
.tok-keyword { color: var(--tok-keyword); }
.tok-number  { color: var(--tok-number); }
.tok-comment { color: var(--tok-comment); }
.tok-dir     { color: var(--tok-dir); }
.tok-error   { color: var(--tok-error); }

/* --- ヘッダー --- */

.name {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: 0.01em;
  color: var(--fg);
}

.name .handle {
  display: block;
  font-size: 0.45em;
  color: var(--tok-comment);
  margin-top: 6px;
  font-weight: 400;
}

/* --- 統一リスト形式(profile / achievements / projects / contact 共通) --- */

.term-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}

.term-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 0 0 20px 20px;
  position: relative;
}

.term-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  background: var(--tok-comment);
}

.term-marker {
  white-space: nowrap;
  font-weight: 700;
  padding-top: 1px;
}

.term-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--fg);
}

.term-detail {
  margin: 0;
  color: var(--tok-comment);
  font-size: 0.92rem;
  line-height: 1.7;
}

.term-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--tok-dir);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 193, 255, 0.35);
  font-size: 0.85rem;
  word-break: break-all;
}

.term-link:hover,
.term-link:focus-visible {
  border-bottom-color: var(--tok-dir);
}

.term-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

.term-tag {
  font-size: 0.78rem;
  color: var(--tok-string);
}

/* --- ウィンドウ枠付き画像(macOSのウィンドウをイメージした見出しバー) --- */

.window-frame {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  max-width: 480px;
  background: #161b22;
}

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #21262d;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red    { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #27c93f; }

.window-image {
  display: block;
  width: 100%;
  height: auto;
}

/* --- キーボードフォーカス(アクセシビリティ) --- */

a:focus-visible {
  outline: 2px solid var(--tok-dir);
  outline-offset: 2px;
}

/* --- レスポンシブ --- */

@media (max-width: 520px) {
  .terminal {
    padding: 32px 16px 72px;
  }
}
