:root {
  --bg: #f7f8fc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --accent-2: #111827;
  --shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.hero {
  padding: 20px 24px 48px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
  border-bottom: 1px solid var(--line);
}

.nav,
.hero-content,
.section,
.footer {
  max-width: 1160px;
  margin: 0 auto;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 36px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.hero-content {
  padding: 54px 0 18px;
}

.eyebrow,
.section-label,
.meta {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--accent);
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin: 14px 0 18px;
}

.hero-text {
  max-width: 680px;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn,
.load-more-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 13px 20px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.load-more-btn:hover,
.dialog-close:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent-2);
}

.section {
  padding: 56px 24px 0;
}

.section-header {
  margin-bottom: 22px;
}

.section-header h2 {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.article-thumb {
  height: 210px;
  background-size: cover;
  background-position: center;
}

.article-content {
  padding: 20px;
}

.article-card h3 {
  margin: 8px 0 10px;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.article-card p {
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent);
  font-weight: 600;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.footer {
  padding: 28px 24px 40px;
  color: var(--muted);
}

.article-dialog {
  width: min(920px, calc(100vw - 24px));
  border: none;
  border-radius: 28px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

.article-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  transition: opacity 240ms ease;
}

.article-dialog[open] {
  animation: modalIn 260ms cubic-bezier(.2,.8,.2,1);
}

.article-dialog[open]::backdrop {
  animation: backdropIn 260ms ease;
}

@starting-style {
  .article-dialog[open] {
    opacity: 0;
    transform: translateY(22px) scale(0.92);
  }

  .article-dialog[open]::backdrop {
    opacity: 0;
  }
}

.article-dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dialog-hero {
  position: relative;
  height: min(400px, 42vw);
  overflow: hidden;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
}

.dialog-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dialog-content {
  padding: 28px;
}

.dialog-content h3 {
  margin: 8px 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.05em;
}

.dialog-content p {
  color: #6b7280;
  font-size: 1.02rem;
}

.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes backdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .article-dialog,
  .article-dialog::backdrop,
  .article-dialog[open],
  .article-dialog[open]::backdrop {
    animation: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  .articles-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    gap: 12px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 18px 18px 40px;
  }

  .section {
    padding: 46px 18px 0;
  }

  .dialog-media img {
    height: 240px;
  }
}

.category-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 2rem 0 2.5rem;
}

.category-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--accent);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-tab:hover {
  color: var(--accent-2);
  background: rgba(109, 94, 252, 0.08);
}

.category-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(109, 94, 252, 0.2);
}

section#about p {
  text-align: justify;
}