/* ============================================
   Netsa AI Blog — Premium Dark Medium Clone
   Faithful reproduction of Medium.com design layout
   Combined with ultra-professional dark aesthetic
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=Inter:wght@400;500;600;700&family=Noto+Serif+Ethiopic:wght@700;900&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Dark Theme Colors based on premium tech aesthetics */
  --bg: #0A0A0A;
  --bg-hover: #141414;
  --surface: #141414;
  --surface-elevated: #1F1F1F;

  --text: #F0F0F0;
  --text-secondary: #A3A3A3;
  --text-light: #737373;

  /* Professional adapted green for dark mode readability */
  --green: #29A822;
  --green-hover: #32D128;

  --border: #262626;
  --border-dark: #333333;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Charter, Georgia, Cambria, 'Times New Roman', serif;
  --font-mono: 'Menlo', 'Monaco', 'Courier New', monospace;

  --content-width: 720px;
  --page-width: 1192px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout --- */
.container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================
   NAVBAR — Medium-style sticky bar
   ================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.navbar-brand:hover {
  opacity: 0.8;
}

.brand-amharic {
  font-family: 'Noto Serif Ethiopic', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.brand-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.navbar-links a {
  font-family: var(--font-sans);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s;
  position: relative;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text);
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Search — pill-shaped, Medium-style */
.navbar-search {
  display: flex;
  align-items: center;
  position: relative;
}

.navbar-search form {
  position: relative;
}

.navbar-search input {
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 16px 10px 38px;
  border: 1px solid transparent;
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  width: 220px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-search input:focus {
  background: var(--bg);
  border-color: var(--border-dark);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
  width: 260px;
}

.navbar-search input::placeholder {
  color: var(--text-light);
  font-weight: 400;
}

.navbar-search::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.7;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* ================================
   HERO SECTION — Dark & Sleek
   ================================ */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 100%;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 720px;
  color: var(--text);
}

.hero p {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-top: 24px;
  max-width: 600px;
  line-height: 1.5;
  font-weight: 400;
}

/* ================================
   SECTION LAYOUT
   ================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.section-link {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

.section-link:hover {
  color: var(--text);
}

/* ================================
   ARTICLE CARDS — Medium feed style
   ================================ */
.grid-articles {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.article-card {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

/* Featured card (first/hero) */
.article-card.featured {
  flex-direction: column;
  gap: 20px;
  padding-top: 16px;
}

.article-card.featured .card-image {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  order: -1;
  border: 1px solid var(--border);
}

.article-card.featured .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Regular card */
.card-body {
  flex: 1;
  min-width: 0;
}

.card-image {
  width: 160px;
  height: 120px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  order: 1;
  background: var(--surface);
  border: 1px solid var(--border);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .card-image img {
  transform: scale(1.05);
}

.card-category {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--text);
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 2;
  letter-spacing: 0.05em;
}

.card-image {
  position: relative;
}

.card-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.card-title a {
  color: var(--text);
  text-decoration: none;
}

.card-title a:hover {
  text-decoration: underline;
}

.card-summary {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.card-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag,
.card-tags a {
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-secondary);
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.tag:hover,
.card-tags a:hover {
  background: var(--surface-elevated);
  color: var(--text);
  border-color: var(--border-dark);
}

/* ================================
   ARTICLE PAGE — Medium reading style
   ================================ */
.article-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.breadcrumbs {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 32px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.breadcrumbs a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.article-header {
  margin-bottom: 40px;
}

.article-category {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.article-page h1 {
  font-family: var(--font-sans);
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 32px;
  color: var(--text);
}

.article-meta {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.featured-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 48px;
  border: 1px solid var(--border);
}

/* Article Content — Medium-style typography */
.article-content {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.8;
  color: var(--text);
  word-wrap: break-word;
}

.article-content h2 {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 56px 0 24px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.article-content h3 {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 40px 0 16px;
  line-height: 1.4;
  color: var(--text);
}

.article-content p {
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.85);
  /* Slightly softer than pure white for reading */
}

.article-content ul,
.article-content ol {
  margin: 24px 0;
  padding-left: 24px;
  color: rgba(255, 255, 255, 0.85);
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 12px;
  padding-left: 8px;
}

.article-content li::marker {
  color: var(--text-secondary);
}

.article-content blockquote {
  border-left: 3px solid var(--text);
  padding: 8px 0 8px 24px;
  margin: 40px 0;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.article-content strong {
  font-weight: 700;
  color: var(--text);
}

.article-content a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--text-secondary);
  transition: text-decoration-color 0.2s;
}

.article-content a:hover {
  text-decoration-color: var(--text);
}

.article-content code {
  font-family: var(--font-mono);
  background: var(--surface);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid var(--border);
  color: var(--text);
}

.article-content pre {
  background: #000000;
  border: 1px solid var(--border);
  color: #E0E0E0;
  padding: 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 40px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
}

.article-content img {
  border-radius: 8px;
  margin: 48px 0;
  border: 1px solid var(--border);
}

/* Article Footer */
.article-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-btn:hover {
  background: var(--border);
  border-color: var(--text-secondary);
}

/* Related section */
.related-section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

/* ================================
   NEWSLETTER — Sleek Dark
   ================================ */
.newsletter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 56px 40px;
  margin: 64px 0;
  text-align: center;
}

.newsletter h3 {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.newsletter p {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 20px;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input:focus {
  border-color: var(--text-secondary);
}

.newsletter-form button {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  transition: opacity 0.2s;
}

.newsletter-form button:hover {
  opacity: 0.9;
}

/* ================================
   FOOTER — Clean, dark
   ================================ */
.footer {
  background: #000000;
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.footer-brand p {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-light);
}

/* ================================
   TRENDING & ARTICLE LIST IMPRESSIONS
   ================================ */
.trending-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.trending-item .rank {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--border-dark);
  min-width: 40px;
}

.trending-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-light);
}

/* ================================
   TRENDING / CATEGORY PAGE
   ================================ */
.trending-header,
.category-header {
  padding: 48px 0 24px;
}

.trending-header h1,
.category-header h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.15rem;
  }

  .navbar-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
    z-index: 200;
  }

  .navbar-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .navbar-search {
    display: none;
  }

  .article-card {
    flex-direction: column;
    gap: 16px;
    padding: 24px 0;
  }

  .card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    order: -1;
  }

  .article-page h1 {
    font-size: 2.2rem;
    line-height: 1.25;
  }

  .article-content {
    font-size: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .newsletter {
    padding: 40px 24px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .share-buttons {
    flex-wrap: wrap;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .article-page h1 {
    font-size: 1.9rem;
  }

  .article-content {
    font-size: 17px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero {
    padding: 48px 0;
  }

  .brand-amharic {
    font-size: 1.8rem;
  }

  .brand-name {
    font-size: 1.1rem;
  }
}