/* Base reset */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --step--2: clamp(0.8rem, 0.78rem + 0.1vw, 0.88rem);
  --step--1: clamp(0.94rem, 0.9rem + 0.2vw, 1rem);
  --step-0: clamp(1rem, 0.98rem + 0.3vw, 1.1rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.8vw, 1.6rem);
  --step-2: clamp(1.56rem, 1.3rem + 1.4vw, 2.2rem);
  --step-3: clamp(1.95rem, 1.45rem + 2.2vw, 3rem);
  --step-4: clamp(2.44rem, 1.6rem + 3.2vw, 3.8rem);
  --step-5: clamp(3.05rem, 1.9rem + 4.5vw, 5rem);

  --bg: #0b0c10;
  --card: #111319;
  --muted: #9aa2af;
  --text: #e8ecf1;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --radius: 1.25rem;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* inter-300 - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  src: url('./fonts/inter-v19-latin-300.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-regular - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/inter-v19-latin-regular.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-600 - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('./fonts/inter-v19-latin-600.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-800 - latin */
@font-face {
  font-display: swap;
  /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  src: url('./fonts/inter-v19-latin-800.woff2') format('woff2');
  /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%,
      rgba(124, 92, 255, 0.25),
      transparent 40%),
    radial-gradient(900px 600px at 120% 10%,
      rgba(0, 212, 255, 0.18),
      transparent 40%),
    var(--bg);
}

.wrap {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.small {
  max-width: 680px;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h1 {
  font-size: var(--step-4);
}

h2 {
  font-size: var(--step-2);
}

h3 {
  font-size: var(--step-1);
}

a {
  color: var(--text);
}

.p,
p {
  font-size: var(--step-0);
  color: var(--text);
}

.lead {
  font-size: var(--step-1);
  color: var(--muted);
}

.sub {
  font-size: var(--step--1);
  color: var(--muted);
}

.mega {
  font-size: var(--step-5);
  letter-spacing: -0.02em;
  font-weight: 800;
  background: linear-gradient(90deg, var(--text), #b9c3ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(1.2) blur(8px);
  background: rgba(11, 12, 16, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.9;
}


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

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 4%;
    top: 56px;
    background: var(--card);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .nav-toggle {
    display: block;
  }
}

/* Hero */
.hero {
  padding: 8vh 0 6vh;
}

.hero .lead {
  margin: 0.6rem 0;
}

/* Cards */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card .content {
  padding: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.62rem 1rem;
  margin: 1rem 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #0b0c10;
  text-decoration: none;
  font-weight: 600;
  border: 0;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Blog */
.post-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.post-list li {
  padding: 0.6rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.post-list.big a {
  font-size: var(--step-1);
}

.post {
  padding: 2rem 0;
}

.post .cover {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.prose {
  font-size: var(--step-0);
  line-height: 1.6;
}

.prose h2 {
  margin-top: 1.5rem;
}

.prose a {
  color: #c6d1ff;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

.site-footer .wrap {
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.site-footer .footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer .footer-left img {
  width: 32px;
  height: 32px;
}

.site-footer .footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.site-footer .small {
  display: flex;
  justify-content: center;
  opacity: 0.7;
}

/*footer responsive*/
@media (max-width: 720px) {
  .site-footer .wrap {
    flex-direction: column-reverse;
    gap: 0;
  }
}


/* Micro interactions */
a:hover {
  opacity: 0.9;
}

.btn:hover {
  filter: brightness(1.05);
}