/* =============================================
   HOSCHITECH GHOST THEME – screen.css
   Navy · Cyan · Amber · Blueprint HUD
   ============================================= */

:root {
  --bg-deep:      #070912;
  --bg-mid:       #0a0e1a;
  --bg-card:      #0d1120;
  --bg-elevated:  #121828;
  --bg-hover:     #18203a;
  --cyan:         #00D4FF;
  --cyan-bright:  #33DFFF;
  --cyan-dim:     #0099bb;
  --cyan-glow:    rgba(0,212,255,0.12);
  --cyan-border:  rgba(0,212,255,0.25);
  --cyan-border2: rgba(0,212,255,0.1);
  --amber:        #F5A623;
  --text:         #FFFFFF;
  --text-sub:     #c8d8e8;
  --text-muted:   #6a7f9a;
  --border:       rgba(0,212,255,0.08);
  --border-mid:   rgba(0,212,255,0.18);
  --radius:       12px;
  --radius-sm:    6px;
  --font:         'Exo 2', system-ui, sans-serif;
  --font-mono:    'Share Tech Mono', 'Courier New', monospace;
  --font-display: 'Space Grotesk', 'Exo 2', sans-serif;
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

/* RESET */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* BLUEPRINT BACKGROUND */
.blueprint-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  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: 60px 60px;
}

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* UTILITIES */
.cyan { color: var(--cyan); }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,9,18,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-mid);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
.logo-sys { color: var(--text-muted); }
.logo-name { color: var(--text); font-weight: 600; }
.logo-tech { color: var(--cyan); }

.site-nav ul {
  display: flex; align-items: center; gap: 4px;
}
.site-nav ul li a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-transform: uppercase;
}
.site-nav ul li a:hover {
  color: var(--cyan);
  background: var(--cyan-glow);
}
.nav-yt {
  color: var(--cyan) !important;
  border: 1px solid var(--cyan-border) !important;
}
.nav-yt:hover {
  background: var(--cyan-glow) !important;
  box-shadow: 0 0 12px rgba(0,212,255,0.2);
}

.nav-toggle {
  display: none;
  background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer; padding: 8px;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--cyan);
  background: var(--cyan-glow);
  border: 1px solid var(--cyan-border);
  padding: 6px 18px;
  border-radius: 40px;
  margin-bottom: 28px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-sub);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-val { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: 0.65rem; letter-spacing: 0.12em; }
.stat-sep { color: var(--text-muted); font-size: 1.4rem; }

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cyan);
  color: var(--bg-deep);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border: none; cursor: pointer;
}
.btn-primary:hover {
  background: var(--cyan-bright);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.35);
}
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cyan-border);
  transition: all var(--transition);
  cursor: pointer;
}
.btn-outline:hover {
  background: var(--cyan-glow);
  border-color: var(--cyan);
  color: var(--cyan-bright);
}
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-elevated);
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  transition: all var(--transition);
}
.btn-secondary:hover {
  color: var(--cyan);
  border-color: var(--cyan-border);
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 40px;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--cyan);
  white-space: nowrap;
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--cyan-border), transparent);
}

/* =============================================
   FEATURED POST
   ============================================= */
.featured-post { padding: 0 0 60px; }

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,212,255,0.08);
  transition: all var(--transition);
}
.featured-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 60px rgba(0,212,255,0.15);
  transform: translateY(-2px);
}

.featured-card-img {
  display: block; overflow: hidden;
  min-height: 320px;
}
.featured-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.featured-card:hover .featured-card-img img { transform: scale(1.04); }

.featured-card-body {
  padding: 40px;
  display: flex; flex-direction: column;
  justify-content: center; gap: 16px;
}
.featured-title {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 800;
  line-height: 1.2;
}
.featured-title a { color: var(--text); transition: color var(--transition); }
.featured-title a:hover { color: var(--cyan); }

.featured-excerpt {
  color: var(--text-sub);
  line-height: 1.7;
  font-size: 0.95rem;
}
.featured-meta {
  display: flex; align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* =============================================
   POSTS SECTION
   ============================================= */
.posts-section { padding: 60px 0 80px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* POST CARD */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
  position: relative;
}
.post-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius);
  background: var(--cyan-glow);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.post-card:hover {
  border-color: var(--cyan-border);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,212,255,0.1);
}
.post-card:hover::before { opacity: 1; }

.post-card-img {
  display: block;
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--bg-elevated);
}
.post-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-img img { transform: scale(1.03); }

.post-card-img--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated);
}
.placeholder-icon { font-size: 3rem; opacity: 0.3; }

.card-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--bg-deep);
  background: var(--cyan);
  padding: 3px 10px;
  border-radius: 3px;
  text-transform: uppercase;
}

.post-card-body {
  padding: 20px;
  display: flex; flex-direction: column;
  flex: 1;
}
.post-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}
.post-card-title a { color: var(--text); transition: color var(--transition); }
.post-card-title a:hover { color: var(--cyan); }

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.post-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.post-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.card-read-more {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  transition: color var(--transition);
}
.card-read-more:hover { color: var(--cyan-bright); }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 48px;
  font-family: var(--font-mono); font-size: 0.8rem;
}
.pagination a {
  color: var(--cyan);
  border: 1px solid var(--cyan-border);
  padding: 8px 18px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.pagination a:hover { background: var(--cyan-glow); }
.page-number { color: var(--text-muted); }

/* =============================================
   TAG HEADER
   ============================================= */
.tag-header { padding: 80px 0 40px; text-align: center; }
.tag-count {
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text-muted); margin-top: 12px;
}

/* =============================================
   SINGLE POST
   ============================================= */
.post-full { padding-bottom: 80px; }

.post-header {
  padding: 80px 0 40px;
  background: linear-gradient(180deg, var(--bg-mid) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.post-header-inner { max-width: 780px; }

.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 12px 0 20px;
  letter-spacing: -0.01em;
}

.post-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.post-sep { opacity: 0.4; }
.post-author { color: var(--cyan); }

.post-feature-img {
  margin-bottom: 48px;
}
.post-feature-img img {
  width: 100%; max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-mid);
}

/* POST CONTENT (markdown output) */
.post-content {
  max-width: 780px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-sub);
}
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 2em 0 0.6em;
  line-height: 1.25;
}
.post-content h2 { font-size: 1.7rem; color: var(--cyan); }
.post-content h3 { font-size: 1.35rem; }
.post-content p { margin-bottom: 1.4em; }
.post-content a { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(0,212,255,0.3); }
.post-content a:hover { color: var(--cyan-bright); }
.post-content strong { color: var(--text); font-weight: 700; }
.post-content em { color: var(--amber); font-style: italic; }
.post-content blockquote {
  border-left: 3px solid var(--cyan);
  padding: 12px 24px;
  background: var(--bg-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 2em 0;
  color: var(--text-sub);
  font-style: italic;
}
.post-content code {
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  color: var(--cyan);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  border: 1px solid var(--border-mid);
}
.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  margin: 2em 0;
}
.post-content pre code {
  background: none; border: none; padding: 0;
  font-size: 0.88rem; color: var(--text-sub);
}
.post-content ul, .post-content ol {
  padding-left: 28px; margin-bottom: 1.4em;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.4em; }
.post-content img {
  width: 100%; border-radius: var(--radius);
  margin: 2em 0;
  border: 1px solid var(--border-mid);
}
.post-content hr {
  border: none; border-top: 1px solid var(--border-mid); margin: 3em 0;
}
.post-content table {
  width: 100%; border-collapse: collapse; margin: 2em 0;
  font-size: 0.9rem;
}
.post-content th, .post-content td {
  padding: 12px 16px;
  border: 1px solid var(--border-mid);
  text-align: left;
}
.post-content th {
  background: var(--bg-card);
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

/* POST TAGS */
.post-tags {
  display: flex; align-items: center; gap: 10px;
  max-width: 780px; margin-top: 40px; flex-wrap: wrap;
}
.tags-label {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted); letter-spacing: 0.1em;
}
.tag-pill {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--cyan); letter-spacing: 0.06em;
  border: 1px solid var(--cyan-border);
  padding: 4px 12px; border-radius: 20px;
  transition: all var(--transition);
}
.tag-pill:hover { background: var(--cyan-glow); }

/* POST FOOTER */
.post-footer {
  max-width: 780px; margin-top: 48px;
  display: flex; gap: 16px; flex-wrap: wrap;
  padding-top: 32px; border-top: 1px solid var(--border);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid var(--border-mid);
  background: var(--bg-mid);
  padding: 48px 0 32px;
  position: relative; z-index: 1;
  margin-top: auto;
}
.footer-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 20px; text-align: center;
}
.footer-brand {
  font-family: var(--font-mono);
  font-size: 1rem;
}
.footer-version { color: var(--text-muted); font-size: 0.85rem; }
.footer-links {
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: center;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--cyan); }
.footer-meta {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted);
}
.footer-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 6px var(--cyan); }
  50%      { opacity: 0.5; box-shadow: 0 0 2px var(--cyan); }
}

/* =============================================
   GHOST KOENIG CARD WIDTHS (required)
   ============================================= */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 2em calc(50% - 42.5vw);
}
.kg-width-full {
  position: relative;
  width: 100vw;
  margin: 2em calc(50% - 50vw);
}
.kg-image-card img,
.kg-gallery-card img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-mid);
}
.kg-gallery-container {
  display: flex; flex-direction: column; gap: 8px;
}
.kg-gallery-row {
  display: flex; gap: 8px;
}
.kg-gallery-image { flex: 1; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }

.kg-video-card video { width: 100%; border-radius: var(--radius); }
.kg-embed-card { margin: 2em 0; }
.kg-embed-card iframe { width: 100%; border-radius: var(--radius); }

.kg-bookmark-card {
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2em 0;
  background: var(--bg-card);
}
.kg-bookmark-container {
  display: flex; text-decoration: none;
  color: var(--text);
}
.kg-bookmark-content { padding: 20px; flex: 1; }
.kg-bookmark-title { font-weight: 700; margin-bottom: 6px; }
.kg-bookmark-description { font-size: 0.85rem; color: var(--text-muted); }
.kg-bookmark-thumbnail { width: 180px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.kg-callout-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border-left: 3px solid var(--cyan);
  margin: 2em 0;
}
.kg-callout-emoji { font-size: 1.5rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .hero { padding: 60px 0 50px; }
  .hero-title { font-size: 2.2rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card-img { min-height: 220px; }
  .featured-card-body { padding: 24px; }
  .featured-title { font-size: 1.3rem; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: rgba(7,9,18,0.98); padding: 16px; border-bottom: 1px solid var(--border-mid); }
  .nav-toggle { display: block; }
  .hero-actions { flex-direction: column; align-items: center; }
  .post-footer { flex-direction: column; }
  .featured-meta { flex-direction: column; gap: 12px; align-items: flex-start; }
  .kg-width-wide { width: 100%; margin: 2em 0; }
  .kg-width-full { width: 100%; margin: 2em 0; }
}
