:root {
  --accent: #6558f5;
  --accent-dark: #5146d8;
  --accent-soft: #f1f0ff;
  --ink: #111827;
  --body: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #f8f8fc;
  --white: #fff;
  --hero-base: #fbfbff;
  --hero-spot: rgba(101, 88, 245, 0.14);
  --radius: 14px;
  --container: 1200px;
}

body.dark {
  --accent: #948bff;
  --accent-dark: #aea8ff;
  --accent-soft: #25233d;
  --ink: #f4f3ff;
  --body: #d1d0da;
  --muted: #aaa8b8;
  --line: #302e3d;
  --surface: #1b1a24;
  --white: #121118;
  --hero-base: #161520;
  --hero-spot: rgba(148, 139, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
footer {
  margin-top: 0;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--white);
  color: var(--body);
  /* font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      -webkit-font-smoothing: antialiased; */
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(calc(100% - 96px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  transform: translateY(-80px);
  border-radius: 8px;
  background: var(--ink);
  padding: 12px 16px;
  color: var(--white);
  font-weight: 700;
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 3px solid rgba(101, 88, 245, 0.45);
  outline-offset: 3px;
}

main {
  padding-top: 64px;
}

.theme-toggle {
  position: fixed;
  z-index: 60;
  top: 92px;
  right: 20px;
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--white) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 24px -16px rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(12px);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.theme-toggle .sun-icon {
  display: none;
}

.dark .theme-toggle .moon-icon {
  display: none;
}

.dark .theme-toggle .sun-icon {
  display: block;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 125%, var(--hero-spot), transparent 34%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 55px,
      rgba(101, 88, 245, 0.05) 56px
    ),
    var(--hero-base);
  padding: 112px 0 104px;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  left: 50%;
  content: "";
  border: 1px solid rgba(101, 88, 245, 0.12);
  border-radius: 50%;
  transform: translateX(-50%);
}

.hero::before {
  bottom: -410px;
  width: 820px;
  height: 820px;
}

.hero::after {
  bottom: -315px;
  width: 620px;
  height: 620px;
}

.hero .container {
  text-align: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(52px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 650px;
  margin: 30px auto 0;
  color: var(--body);
  font-size: 20px;
  line-height: 1.65;
}

.section {
  padding: 96px 0;
}

.section-muted {
  background: var(--surface);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 36px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.featured-card {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.featured-media {
  display: grid;
  overflow: hidden;
  aspect-ratio: 16/10;
  place-items: center;
  background: var(--surface);
}

.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 52px;
}

.article-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.featured-body h2 {
  margin: 20px 0 18px;
  color: var(--ink);
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.featured-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.read-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  color: var(--accent);
  font-weight: 750;
}

.read-link svg {
  width: 18px;
  transition: transform 0.2s ease;
}

.featured-card:hover {
  border-color: var(--accent);
}

.featured-card:hover img {
  transform: scale(1.015);
}

.featured-card:hover .read-link svg {
  transform: translateX(4px);
}

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

.article-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  animation: card-in 0.35s ease both;
}

.article-card a {
  display: flex;
  width: 100%;
  flex-direction: column;
  text-decoration: none;
}

.card-media {
  display: grid;
  overflow: hidden;
  aspect-ratio: 16/10;
  place-items: center;
  background: var(--surface);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.card-content h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 16px 0 12px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.card-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--body);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-footer {
  display: flex;
  min-height: 44px;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--muted);
  font-size: 13px;
}

.card-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
}

.card-arrow svg {
  width: 16px;
}

.article-card:hover {
  border-color: var(--accent);
}

.article-card:hover img {
  transform: scale(1.015);
}

.article-card:hover h3 {
  color: var(--accent);
}

.load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 48px;
}

.load-more {
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  padding: 0 26px;
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

.load-more:hover {
  background: var(--accent-dark);
}

.end-message {
  margin: 0;
  color: var(--muted);
}

footer p,
footer h4,
footer ul {
  margin: 0;
  padding: 0;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1023px) {
  .container {
    width: min(calc(100% - 64px), var(--container));
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-body {
    padding: 38px;
  }
}

@media (max-width: 767px) {
  .container {
    width: calc(100% - 40px);
  }

  .hero {
    padding: 80px 0 72px;
  }

  .hero h1 {
    font-size: 56px;
  }

  .hero p {
    font-size: 18px;
  }

  .section {
    padding: 72px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 16px;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-body {
    padding: 28px;
  }

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

  .theme-toggle {
    right: 12px;
    top: 92px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
