/*
Theme Name: dorago
Theme URI: https://dorago01.com
Author: dorago01
Description: Dark terminal-style theme matching dorago01.com design
Version: 1.0
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f0f;
  --bg-sub: #1a1a1a;
  --bg-card: #141414;
  --text: #e0e0e0;
  --text-dim: #888;
  --accent: #00d4ff;
  --accent-dim: rgba(0,212,255,0.15);
  --accent-glow: rgba(0,212,255,0.4);
  --border: rgba(0,212,255,0.2);
  --radius: 6px;
  --font-mono: 'JetBrains Mono','Fira Code','Courier New',monospace;
  --font-sans: 'Inter','Noto Sans JP',system-ui,sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

a { color: var(--accent); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { opacity: .8; }
img { max-width: 100%; display: block; }

/* ===== NAVBAR ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,15,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; max-width: 960px; margin: 0 auto; padding: 0 24px;
}
.site-title a {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--accent); letter-spacing: .05em;
}
.site-title a span { color: var(--text-dim); }

.main-nav ul { display: flex; gap: 28px; list-style: none; }
.main-nav a {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-dim); letter-spacing: .05em;
}
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--accent); opacity: 1; }

/* ===== LAYOUT ===== */
.site-main {
  max-width: 960px; margin: 0 auto;
  padding: 80px 24px 60px;
}

/* ===== POSTS LIST ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s, box-shadow .2s;
}
.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-dim);
}
.post-card .post-date {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 8px;
}
.post-card h2 { font-size: 17px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--accent); opacity: 1; }
.post-card .post-excerpt { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.post-card .read-more {
  display: inline-block; margin-top: 14px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent); letter-spacing: .05em;
}

/* ===== SINGLE POST ===== */
.post-header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.post-header .post-date {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 12px;
}
.post-header h1 { font-size: clamp(24px,4vw,38px); font-weight: 700; line-height: 1.3; }

.post-content { max-width: 720px; }
.post-content h1,.post-content h2,.post-content h3 {
  color: var(--text); margin: 32px 0 12px; font-weight: 700;
}
.post-content h2 { font-size: 22px; border-left: 3px solid var(--accent); padding-left: 12px; }
.post-content h3 { font-size: 18px; color: var(--accent); }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 18px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px; margin: 24px 0;
  background: var(--bg-sub); border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dim);
}
.post-content code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--bg-sub); color: var(--accent);
  padding: 2px 6px; border-radius: 4px;
}
.post-content pre {
  background: var(--bg-sub); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; overflow-x: auto;
  margin-bottom: 18px;
}
.post-content pre code { background: none; padding: 0; color: var(--text); }
.post-content img { border-radius: var(--radius); margin: 24px 0; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

/* ===== PAGE TITLE ===== */
.page-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.page-hero-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); letter-spacing: .2em;
  text-transform: uppercase; margin-bottom: 8px;
}
.page-hero h1 { font-size: clamp(28px,5vw,48px); font-weight: 700; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; gap: 8px; justify-content: center;
  margin-top: 48px; font-family: var(--font-mono); font-size: 13px;
}
.pagination .page-numbers {
  padding: 6px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-dim);
}
.pagination .current {
  background: var(--accent); color: #0f0f0f;
  border-color: var(--accent); font-weight: 700;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-dim);
  margin-top: 60px;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); opacity: 1; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .main-nav { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
}
