/* ==========================================================================
   DE5 MEDIAHOUSE - Minimalist Monospace Aesthetic (Matching 0xCC / Screenshot Spec)
   ========================================================================== */

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

:root {
  --bg: #000000;
  --bg-card: #0d1117;
  --bg-code: #161b22;
  --border: #30363d;
  --border-light: #21262d;
  --text: #c9d1d9;
  --text-bright: #ffffff;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --link: #58a6ff;
  --link-hover: #79c0ff;
  --accent: #58a6ff;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ==========================================================================
   HOMEPAGE (Matching Screenshot 1: Centered Minimalist Hub + Slim Search)
   ========================================================================== */
.home-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem;
}

.home-card {
  width: 100%;
  max-width: 480px;
}

.home-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.home-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Slim Centered Search Bar */
.search-wrapper {
  margin-bottom: 1.75rem;
}

.slim-search {
  width: 100%;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.45rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-bright);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.slim-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.slim-search::placeholder {
  color: var(--text-dim);
}

/* Section Lists matching Image 1: • category \n ◦ item */
.list-group {
  margin-bottom: 1.5rem;
}

.list-heading {
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.list-heading::before {
  content: "•";
  color: var(--text-bright);
}

.sub-list {
  list-style: none;
  padding-left: 1.35rem;
}

.sub-item {
  margin-bottom: 0.35rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.sub-item::before {
  content: "◦";
  color: var(--text-muted);
}

.sub-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  min-width: 95px;
}

/* ==========================================================================
   PROFILE / POST PAGE (Matching Screenshot 2: Exact Layout & Typography)
   ========================================================================== */
.post-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-date-top {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.post-back-link {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.post-back-link:hover {
  color: var(--link-hover);
}

.post-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* Profile header widget (Avatar + Minimal Metadata) */
.author-pill {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 2rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.author-info-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
}

.author-info-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Monospace Body Typography */
.post-content {
  font-size: 0.92rem;
  color: #c9d1d9;
  line-height: 1.75;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 2.25rem 0 0.85rem;
  letter-spacing: -0.01em;
}

.post-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 1.75rem 0 0.6rem;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.35rem;
}

.post-content li {
  margin-bottom: 0.35rem;
}

/* Inline Code Badges */
code, .inline-code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: #161b22;
  border: 1px solid #30363d;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: #79c0ff;
}

/* Monospace Code Block Box */
.code-box {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e6edf3;
  white-space: pre;
}

.code-box .comment { color: var(--text-dim); }
.code-box .keyword { color: #ff7b72; }
.code-box .string { color: #a5d6ff; }
.code-box .output { color: #7ee787; }

/* Quote / Misleading Documentation Box */
.quote-box {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.85rem 1.15rem;
  margin: 1.25rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Timeline List */
.timeline-mono {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.5rem;
}

.timeline-mono li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}

.timeline-mono li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--link);
}

/* References Section */
.ref-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.75rem;
}

.ref-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
}

.ref-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--link);
}

/* Footer */
.post-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   KNOWLEDGE PANEL / INFOBOX  (Wikipedia + Google Knowledge Panel style)
   ========================================================================== */

.knowledge-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 2.25rem;
}

/* Portrait / Avatar at top of panel */
.kp-portrait-frame {
  position: relative;
  max-width: 200px;
  margin: 0 auto 1.25rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #161b22;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.kp-portrait {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #161b22;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: contrast(102%);
}

.kp-portrait-frame:hover .kp-portrait {
  transform: scale(1.02);
}

.kp-portrait-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #3fb950;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.kp-portrait-badge::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3fb950;
  box-shadow: 0 0 6px #3fb950;
}

.kp-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.15rem;
  text-align: center;
}

.kp-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Structured data table inside the panel */
.kp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.kp-table tr {
  border-bottom: 1px solid var(--border-light);
}

.kp-table tr:last-child {
  border-bottom: none;
}

.kp-table td {
  padding: 0.45rem 0;
  vertical-align: top;
}

.kp-table .kp-label {
  color: var(--text-muted);
  min-width: 100px;
  padding-right: 0.75rem;
  white-space: nowrap;
  font-weight: 500;
}

.kp-table .kp-value {
  color: var(--text);
}

.kp-table .kp-value a {
  color: var(--link);
}

/* Social Media Links Grid */
.kp-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.kp-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  background: var(--bg-code);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.kp-social-link:hover {
  color: var(--link);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.06);
  text-decoration: none;
}

.kp-social-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Hot Topics / Breakthroughs Section */
.hot-topics {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}

.hot-topics-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--link);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hot-topics-title::before {
  content: "⚡";
}

.hot-topic-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.hot-topic-item::before {
  content: "▸";
  color: var(--accent);
  flex-shrink: 0;
}

.hot-topic-year {
  color: var(--text-dim);
  font-size: 0.8rem;
  min-width: 48px;
  flex-shrink: 0;
}

.hot-topic-desc {
  color: var(--text);
}

.hot-topic-desc strong {
  color: var(--text-bright);
}

/* FAQ / Structured Data Section for SEO */
.faq-section {
  margin: 2rem 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.35rem;
}

.faq-a {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}

/* Key Stats Row */
.kp-stats {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.kp-stat {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 0.5rem 0.25rem;
}

.kp-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
}

.kp-stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   VISUAL DOSSIER / PHOTOGRAPHIC ARCHIVE (Tech HUD Style)
   ========================================================================== */
.dossier-section {
  margin: 2.75rem 0;
  padding: 1.25rem;
  background: rgba(22, 27, 34, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
}

.dossier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dossier-header .dossier-tag {
  color: #58a6ff;
  font-weight: 600;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
}

.dossier-card {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.dossier-card:hover {
  border-color: #58a6ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(88, 166, 255, 0.15);
}

.dossier-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  background: #161b22;
  border-bottom: 1px solid var(--border-light);
}

.dossier-card-id {
  color: #3fb950;
  font-weight: 600;
}

.dossier-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #090d13;
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.dossier-open-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(13, 17, 23, 0.88);
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: #79c0ff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  opacity: 0.8;
  transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.dossier-img-wrap:hover .dossier-open-badge,
.dossier-card:hover .dossier-open-badge {
  opacity: 1;
  background: rgba(13, 17, 23, 0.98);
  border-color: #58a6ff;
  color: #58a6ff;
  box-shadow: 0 0 10px rgba(88, 166, 255, 0.4);
  transform: translateY(-1px);
}

.dossier-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: contrast(102%);
}

.dossier-img-wrap:hover .dossier-img,
.dossier-card:hover .dossier-img {
  transform: scale(1.05);
}

.dossier-caption {
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.45;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dossier-caption-text {
  margin-bottom: 0.4rem;
}

.dossier-source {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.dossier-source a {
  color: #58a6ff;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.dossier-source a:hover {
  color: #79c0ff;
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (min-width: 640px) {
  .post-wrapper {
    max-width: 780px;
  }
  
  .kp-portrait {
    max-width: 180px;
    float: right;
    margin: 0 0 1rem 1.25rem;
  }
  
  .kp-name, .kp-tagline {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .post-title {
    font-size: 1.35rem;
  }
  
  .knowledge-panel {
    padding: 1rem;
  }
  
  .kp-table .kp-label {
    min-width: 80px;
  }
  
  .kp-socials {
    gap: 0.4rem;
  }
  
  .kp-social-link {
    font-size: 0.72rem;
    padding: 0.25rem 0.45rem;
  }
  
  .hot-topic-item {
    font-size: 0.8rem;
  }
  
  .home-title {
    font-size: 1.5rem;
  }
  
  .kp-stats {
    gap: 0.5rem;
  }
  
  .kp-stat {
    min-width: 65px;
  }
}
