/* =====================
   CSS変数（カラーパレット）
   ===================== */
:root {
  /* 背景 */
  --bg:     #080b0f;
  --bg-2:   #0d1219;
  --bg-3:   #141c26;

  /* テキスト */
  --text:        #c8d0da;
  --text-dim:    #566070;
  --text-bright: #e8edf4;

  /* アクセント：シアン（端末ディスプレイ風） */
  --cyan:     #38c8e0;
  --cyan-dim: rgba(56, 200, 224, 0.12);

  /* アクセント：アンバー（警告・強調）*/
  --amber: #e0a830;

  /* ボーダー */
  --border:       #1a2535;
  --border-light: #253548;

  /* フォント */
  --font-body:    'Noto Sans JP', sans-serif;
  --font-display: 'Rajdhani', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;

  --nav-h: 60px;
}

/* =====================
   リセット・ベース
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul { list-style: none; }

.mono     { font-family: var(--font-mono); font-size: 0.85em; }
.text-dim { color: var(--text-dim); }

/* =====================
   ナビゲーション
   ===================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(8, 11, 15, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.cursor {
  color: var(--cyan);
  animation: blink 1.2s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.nav-menu {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.nav-link:hover          { color: var(--cyan); }
.nav-link:hover::after   { transform: scaleX(1); }

/* ハンバーガー（モバイル） */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.2s;
}

/* =====================
   ヒーロー
   ===================== */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* グリッド背景 */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
}

/* 右半分のグラデーション光 */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 40%, rgba(56,200,224,0.04) 0%, transparent 70%);
}

/* コンテンツエリア */
.hero-inner {
  flex: 1;
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  width: 100%;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-text { flex: 1; }

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin-bottom: 20px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-bright);
  line-height: 1;
  margin-bottom: 24px;
  text-shadow: 0 0 80px rgba(56, 200, 224, 0.18);
}

.hero-tagline {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.hero-sub {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 36px;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 44px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4cde80;
  box-shadow: 0 0 8px rgba(76, 222, 128, 0.7);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.hero-actions {
  display: flex;
  gap: 14px;
}

.btn {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  padding: 11px 28px;
  border: 1px solid;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--bg);
}
.btn-primary:hover {
  background: transparent;
  color: var(--cyan);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text-dim);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* キャラクター */
.hero-char {
  flex-shrink: 0;
  width: 360px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.char-frame {
  position: relative;
  cursor: pointer;
  user-select: none;
  mask-image: linear-gradient(to bottom, black 60%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 88%);
}

/* 四隅ブラケット装飾 */
.char-frame::before,
.char-frame::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0.6;
  transition: opacity 0.3s;
}
.char-frame::before {
  top: -6px; left: -6px;
  border-width: 2px 0 0 2px;
}
.char-frame::after {
  bottom: -6px; right: -6px;
  border-width: 0 2px 2px 0;
}
.char-frame:hover::before,
.char-frame:hover::after { opacity: 1; }

.char-img {
  max-height: 520px;
  width: auto;
  filter: drop-shadow(0 12px 40px rgba(56, 200, 224, 0.12));
  transition: filter 0.3s;
}
.char-frame:hover .char-img {
  filter: drop-shadow(0 12px 60px rgba(56, 200, 224, 0.28));
}

/* セリフバブル */
.dialogue-bubble {
  position: fixed;
  bottom: 100px;
  right: 32px;
  background: var(--bg-3);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--cyan);
  padding: 10px 18px;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  z-index: 200;
  animation: fadeUp 0.2s ease;
  pointer-events: none;
}

.dialogue-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px; right: 20px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--border-light);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================
   幾何学デコレーション
   ===================== */
.geo-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.geo {
  position: absolute;
  will-change: transform;
}

/* 斜めストライプ正方形A（右上・シアン） */
.geo-stripe-a {
  width: 100px;
  height: 100px;
  top: 22%;
  right: 6%;
  background: repeating-linear-gradient(
    -45deg,
    rgba(56, 200, 224, 0.16) 0px,
    rgba(56, 200, 224, 0.16) 3px,
    transparent 3px,
    transparent 9px
  );
}

/* 斜めストライプ正方形B（左下・アンバー） */
.geo-stripe-b {
  width: 90px;
  height: 90px;
  bottom: 22%;
  left: 3%;
  background: repeating-linear-gradient(
    45deg,
    rgba(224, 168, 48, 0.14) 0px,
    rgba(224, 168, 48, 0.14) 3px,
    transparent 3px,
    transparent 9px
  );
}

/* アウトライン矩形（大・右端） */
.geo-outline-a {
  width: 200px;
  height: 150px;
  top: 35%;
  right: 1%;
  border: 1px solid rgba(56, 200, 224, 0.05);
}

/* クロスヘア */
.geo-cross {
  width: 28px;
  height: 28px;
  bottom: 28%;
  left: 8%;
}
.geo-cross::before,
.geo-cross::after {
  content: '';
  position: absolute;
  background: rgba(224, 168, 48, 0.35);
}
.geo-cross::before {
  width: 1px;
  height: 100%;
  left: 50%;
}
.geo-cross::after {
  height: 1px;
  width: 100%;
  top: 50%;
}

/* キャラクタークリックバウンス */
@keyframes char-bounce {
  0%   { transform: translateY(0); }
  28%  { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}
.char-img.char-bounce {
  animation: char-bounce 0.5s linear;
}

/* 下部デコレーション */
.hero-deco {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.deco-line {
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.deco-text {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* =====================
   セクション共通
   ===================== */
.section {
  padding: 100px 24px;
}

.section-alt {
  background: var(--bg-2);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}

.section-num {
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-bright);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-light), transparent);
}

/* =====================
   パネル（カードベース）
   ===================== */
.panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 28px;
  position: relative;
}

/* 右上の隅ブラケット */
.panel::before {
  content: '';
  position: absolute;
  top: -1px; right: -1px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
}

.panel-label {
  font-size: 0.74rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  opacity: 0.8;
}

/* =====================
   プロフィール
   ===================== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 14px;
}

.profile-bio {
  color: var(--text-dim);
  line-height: 1.85;
  font-size: 0.93rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 8px;
  border: 1px solid var(--border-light);
  color: var(--cyan);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* =====================
   ワークス
   ===================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.work-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 28px;
  position: relative;
  transition: border-color 0.25s;
}

.work-card::before {
  content: '';
  position: absolute;
  top: -1px; right: -1px;
  width: 14px; height: 14px;
  border-top: 2px solid var(--border-light);
  border-right: 2px solid var(--border-light);
  transition: border-color 0.25s;
}

.work-card:hover              { border-color: var(--border-light); }
.work-card:hover::before      { border-color: var(--cyan); }

.card-tag {
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 24px;
}

.card-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  transition: opacity 0.2s;
}
.card-link:hover { opacity: 0.65; }

.card-status {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* =====================
   リンク
   ===================== */
.links-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background 0.2s, border-left-color 0.2s, transform 0.2s;
}

.link-card:hover {
  background: var(--bg-3);
  border-left-color: var(--cyan);
  transform: translateX(4px);
}

.link-icon {
  width: 40px;
  text-align: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: bold;
}

.link-info { flex: 1; }

.link-name {
  font-weight: 500;
  color: var(--text-bright);
  font-size: 0.95rem;
}

.link-handle {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.link-arrow {
  font-family: var(--font-mono);
  color: var(--text-dim);
  transition: color 0.2s;
}

.link-card:hover .link-arrow { color: var(--cyan); }

/* =====================
   Cookie同意バナー
   ===================== */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-3);
  border-top: 1px solid var(--border-light);
  padding: 14px 24px;
  z-index: 300;
}
.cookie-banner.visible {
  display: block;
}
.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-text {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
  min-width: 200px;
}
.cookie-text a {
  color: var(--cyan);
}
.cookie-text a:hover {
  text-decoration: underline;
}
.cookie-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  padding: 7px 18px;
  border: 1px solid;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.cookie-btn-accept {
  border-color: var(--cyan);
  color: var(--cyan);
}
.cookie-btn-accept:hover {
  background: var(--cyan);
  color: var(--bg);
}
.cookie-btn-decline {
  border-color: var(--border-light);
  color: var(--text-dim);
}
.cookie-btn-decline:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

/* =====================
   フィード（Twitter埋め込み）
   ===================== */
.feed-wrap {
  max-width: 600px;
  border: 1px solid var(--border);
}

/* =====================
   フッター
   ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }

/* =====================
   レスポンシブ（768px以下）
   ===================== */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(8, 11, 15, 0.97);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    display: none;
  }

  .nav-menu.open { display: flex; }

  .nav-toggle { display: flex; }

  .hero-inner {
    flex-direction: column-reverse;
    padding-top: 40px;
    gap: 32px;
    text-align: center;
  }

  .hero-char {
    width: 220px;
  }

  .char-img { max-height: 320px; }

  .hero-actions { justify-content: center; }

  .profile-grid { grid-template-columns: 1fr; }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
