@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700&family=Space+Grotesk:wght@500;600&display=swap");

:root {
  color-scheme: dark;
  /* typography */
  font-family: "Inter", "Space Grotesk", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --base-size: 16px;
  --base-line: 1.65;

  /* colors - Dark theme */
  --bg: #05060a;
  --bg-accent: radial-gradient(circle at 12% 18%, rgba(52, 116, 255, 0.18), transparent 62%), radial-gradient(circle at 84% 8%, rgba(162, 52, 255, 0.12), transparent 62%), radial-gradient(circle at 50% 100%, rgba(23, 158, 200, 0.12), transparent 62%);
  --surface: rgba(19, 22, 33, 0.82);
  --surface-2: rgba(28, 32, 48, 0.88);
  --glass: rgba(20, 24, 36, 0.68);
  --primary: #3f8cff;
  --accent: #37e0f2;
  --primary-strong: #70a6ff;
  --text: #eef1ff;
  --muted: rgba(198, 209, 255, 0.64);
  --border-weak: rgba(112, 128, 171, 0.28);
  --border-strong: rgba(111, 163, 255, 0.45);
  --shadow-ambient: 0 28px 60px rgba(5, 10, 30, 0.55);

  --cyan: #00f5ff;
  --magenta: #a855f7;
  --warning: #facc15;
  --danger: #f87171;

  /* scale & spacing */
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;

  /* radii */
  --radius-sm: 12px;
  --radius-md: 22px;
  --radius-lg: 32px;

  /* shadows */
  --shadow-1: 0 16px 40px rgba(5, 8, 20, 0.55);
  --shadow-2: 0 24px 60px rgba(5, 8, 20, 0.65);
  --shadow-glow: 0 0 44px rgba(63, 140, 255, 0.35);

  /* components */
  --card-bg: linear-gradient(165deg, rgba(23,27,45,0.88), rgba(16,19,29,0.92));

  /* code presentation */
  --code-inline-bg: rgba(63,140,255,0.18);
  --code-inline-border: rgba(63,140,255,0.38);
  --code-inline-text: #e6edff;
  --code-inline-shadow: inset 0 1px 0 rgba(83,140,255,0.35);
  --code-block-bg: linear-gradient(160deg, rgba(8,12,26,0.96), rgba(6,10,20,0.98));
  --code-block-border: rgba(63,140,255,0.25);
  --code-block-shadow: 0 28px 66px rgba(2,4,12,0.75);
  --code-block-heading: rgba(63,140,255,0.16);
  --code-scrollbar: rgba(63,140,255,0.48);
  --code-token-keyword: #7c9bff;
  --code-token-string: #8be9a7;
  --code-token-function: #ffd47f;
  --code-token-comment: rgba(197,214,255,0.52);
  --code-token-number: #ff9fb2;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image: var(--bg-accent);
  color: var(--text);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  font-size: var(--base-size);
  line-height: var(--base-line);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background: radial-gradient(880px circle at -10% 14%, rgba(63, 140, 255, 0.18), transparent 62%), radial-gradient(620px circle at 118% 18%, rgba(168, 85, 247, 0.18), transparent 65%), radial-gradient(520px circle at 50% 120%, rgba(0, 221, 255, 0.18), transparent 65%);
  filter: blur(0.45px);
  opacity: 0.9;
}

body::after {
  background: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(80,94,140,0.08)' stroke-width='0.5'%3E%3Cpath d='M0 25h100M0 50h100M0 75h100M25 0v100M50 0v100M75 0v100'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.25;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,8,16,0.9), rgba(10,12,22,0.92));
  z-index: -3;
}

a {
  color: inherit;
}

::selection {
  background: rgba(98, 216, 255, 0.35);
  color: #020308;
}

/* Highlight.js token colors */
.hljs {
  background: transparent;
  color: rgba(235,241,255,0.94);
}

.hljs-comment,
.hljs-quote {
  color: var(--code-token-comment);
  font-style: italic;
}

.hljs-keyword,
.hljs-meta .hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
  color: var(--code-token-keyword);
}

.hljs-string,
.hljs-doctag,
.hljs-template-tag,
.hljs-template-variable,
.hljs-symbol,
.hljs-addition {
  color: var(--code-token-string);
}

.hljs-function .hljs-title,
.hljs-title.function_,
.hljs-title.class_ {
  color: var(--code-token-function);
}

.hljs-number,
.hljs-attribute,
.hljs-variable,
.hljs-attr,
.hljs-selector-attr,
.hljs-selector-pseudo {
  color: var(--code-token-number);
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(78, 92, 130, 0.28);
  background: rgba(7, 10, 18, 0.92);
  backdrop-filter: blur(22px);
  box-shadow: 0 12px 32px rgba(2,4,12,0.38);
}

.site-header__inner {
  width: min(1120px, 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  overflow: hidden;
}

.site-header__logo-image {
  width: 100%;
  height: 100%;
  display: block;
}

.site-header__title {
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header__nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem;
  font-size: 0.9rem;
  color: rgba(194, 206, 255, 0.68);
  background: rgba(21, 24, 42, 0.85);
  box-shadow: 0 16px 40px rgba(4,8,20,0.46);
  border: 1px solid rgba(81, 115, 188, 0.32);
  border-radius: 999px;
}

/* mobile menu toggle */
.site-header__menu-toggle {
  display: none;
  background: rgba(27,30,46,0.9);
  border: 1px solid rgba(94,128,198,0.35);
  color: var(--text);
  font-size: 1.3rem;
  padding: 0.45rem 0.65rem;
  border-radius: 50%;
}

/* header state when nav is open */
.site-header--nav-open .site-header__nav {
  display: flex;
}


.site-header__nav-link {
  position: relative;
  z-index: 0;
  padding: 0.48rem 1.25rem;
  text-decoration: none;
  color: rgba(186, 202, 255, 0.76);
  font-weight: 500;
  letter-spacing: 0.12em;
  transition: color 0.25s ease;
}


.site-header__nav-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(63, 140, 255, 0.18), rgba(31, 216, 255, 0.16));
  opacity: 0;
  transform: translateY(3px) scale(0.92);
  filter: blur(0.65px);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  z-index: -1;
  border-radius: 999px;
}


.site-header__nav-link:hover {
  color: var(--primary);
}

.site-header__nav-link:hover::after {
  opacity: 0.7;
  transform: translateY(0) scale(1);
}

.site-header__nav-link.is-active {
  color: #f8fbff;
}

.site-header__nav-link.is-active::after {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow: 0 12px 34px rgba(63, 140, 255, 0.38);
}

.site-header__cta {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  
  background: linear-gradient(135deg, rgba(0,102,255,0.9), rgba(0,138,204,0.85));
  border: 1px solid rgba(0,102,255,0.3);
  box-shadow: 0 4px 16px rgba(0,102,255,0.25);
  color: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.site-header__cta:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0,102,255,1), rgba(0,138,204,0.95));
  box-shadow: 0 8px 24px rgba(0,102,255,0.35);
}

.site-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 3rem 0 4.5rem;
}

.site-main__inner {
  width: min(1180px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 3.4rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem clamp(1.8rem, 4vw, 4.2rem);
  background: linear-gradient(145deg, rgba(18,21,36,0.92), rgba(9,12,22,0.95));
  border: 1px solid rgba(94,128,198,0.24);
  box-shadow: 0 24px 60px rgba(2,6,18,0.62);
  isolation: isolate;
  border-radius: var(--radius-lg);
}

/* .hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at 10% 80%, rgba(118, 215, 255, 0.14), transparent 60%), radial-gradient(500px circle at 85% 20%, rgba(107, 127, 255, 0.18), transparent 65%);
  filter: blur(4px);
  transform: translateZ(0);
  z-index: -1;
  animation: ambientShift 12s ease-in-out infinite alternate;
} */

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  max-width: 640px;
}

/* Typography refinements */
h1, h2, h3, h4 {
  margin: 0 0 0.6rem 0;
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.0rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 600; }

p {color: var(--muted); }

a { color: var(--primary-strong); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--primary); }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,102,255,0.7);
  font-family: "Space Grotesk", sans-serif;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.2rem, 5.2vw, 3.85rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.75;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.35rem;
  min-height: 44px;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(.2,.9,.2,1), box-shadow 0.22s ease, background 0.22s ease;
  
  cursor: pointer;
}

.button--primary {
  background: linear-gradient(135deg, rgba(63,140,255,0.9), rgba(55,224,242,0.9));
  box-shadow: var(--shadow-glow), 0 8px 28px rgba(4,8,20,0.35);
  color: #070b16;
}

.button--primary:hover {
  transform: translateY(-3px) scale(1.01);
  background: linear-gradient(135deg, rgba(0,102,255,1), rgba(0,138,204,0.95));
  box-shadow: 0 8px 24px rgba(0,102,255,0.3), 0 4px 16px rgba(0,0,0,0.12);
}

.button--ghost {
  background: rgba(30, 32, 48, 0.85);
  color: rgba(218, 227, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(108, 132, 204, 0.28);
  border: 1px solid rgba(87, 116, 198, 0.4);
}

.button--ghost:hover {
  transform: translateY(-2px);
  background: rgba(0,0,0,0.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.timeline__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline__title {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
}

.timeline__subtitle {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.timeline__list {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Form controls (global) */
.form-field select,
.form-field input,
input, select, textarea {
  width: 100%;
  background: #ffffff;
  color: var(--text);
  padding: 0.75rem 0.95rem;
  font-size: 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
}

.form-field select:focus,
.form-field input:focus,
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,102,255,0.12), 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
  border-color: var(--primary);
}

.post-card {
  position: relative;
  background: var(--card-bg);
  /* box-shadow: var(--shadow-2); */
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  isolation: isolate;
  transform: translateY(12px);
  opacity: 0;
  animation: floatUp 0.85s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  animation-delay: calc(var(--card-index, 0) * 80ms);
  /* */
}

.post-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(120px circle at 20% 20%, rgba(0,102,255,0.08), transparent 55%), radial-gradient(160px circle at 80% 0%, rgba(138,43,226,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: -1;
}

.post-card__link {
  display: block;
  padding: 1.6rem 1.8rem;
  text-decoration: none;
  height: 100%;
}

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

.post-card__date {
  font-family: "Space Grotesk", sans-serif;
}

.post-card__icon {
  width: 2rem;
  height: 2rem;
  
  background: rgba(0,102,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  transform: translateX(-6px);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.post-card__title {
  margin: 1rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.post-card__description {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--muted);
}

.post-card:hover::before {
  opacity: 1;
}

.post-card:hover .post-card__icon {
  transform: translateX(0);
  background: rgba(0,102,255,0.15);
  color: var(--primary-strong);
}

.post-card:hover {
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(250,251,252,1));
  border-color: rgba(0,102,255,0.15);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.post {
  position: relative;
  width: min(820px, 100%);
  margin: 0 auto;
  padding: clamp(1.85rem, 4vw, 2.9rem);
  background: var(--card-bg);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(91,132,201,0.2);
  box-shadow: 0 28px 64px rgba(2,6,18,0.58);
  border-radius: var(--radius-lg);
}

.post::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at 15% 20%, rgba(0,102,255,0.04), transparent 60%), radial-gradient(380px circle at 85% 85%, rgba(138,43,226,0.03), transparent 65%);
  z-index: -1;
  opacity: 0.85;
}

.post__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.post__meta {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  display: inline-flex;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  
  background: rgba(0,102,255,0.06);
  border: 1px solid rgba(0,102,255,0.15);
}

.post__body {
  margin-top: 2rem;
  line-height: 1.8;
  font-size: 1.04rem;
  color: var(--text);
}

.post__body h2,
.post__body h3,
.post__body h4 {
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.post__body p {
  margin: 0.85rem 0;
}

.post__body a {
  color: var(--primary-strong);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,102,255,0.3);
}

.post__body a:hover {
  border-bottom-color: rgba(0,102,255,0.6);
}

.post__body ul,
.post__body ol {
  margin: 0.75rem 0 0.75rem 1.5rem;
  padding-left: 0.25rem;
}

.post__body li + li {
  margin-top: 0.45rem;
}

.site-footer {
  padding: 2.8rem 0 3.5rem;
  border-top: 1px solid rgba(72, 92, 132, 0.28);
  background: rgba(6, 8, 16, 0.92);
  backdrop-filter: blur(28px);
  box-shadow: 0 -18px 44px rgba(3,6,16,0.45);
}

.site-footer__inner {
  width: min(1180px, 94vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
  text-align: center;
  color: rgba(176, 190, 238, 0.72);
  font-size: 0.92rem;
}

.site-footer__note {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(80, 90, 110, 0.5);
}

@keyframes ambientShift {
  0% {
    transform: translate3d(-4%, 2%, 0) scale(1);
  }
  100% {
    transform: translate3d(4%, -3%, 0) scale(1.05);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  .site-header__menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    background: rgba(255,255,255,0.98);
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.6rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    
    border: 1px solid rgba(0,0,0,0.06);
    z-index: 30;
  }

  .site-header__nav .site-header__nav-link {
    padding: 0.75rem 1rem;
    display: block;
  }

  .site-header--nav-open .site-header__nav {
    display: flex;
  }

  /* overlay shown when mobile nav open */
  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 25;
  }

  /* prevent body scroll when nav open */
  .no-scroll {
    overflow: hidden !important;
    height: 100%;
  }

  .site-header__cta {
    padding: 0.55rem 1rem;
  }

  .hero {
    padding: 3rem 1.75rem;
  }

  .timeline__list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .site-main {
    padding: 2.3rem 0 3.2rem;
  }

  .site-main__inner {
    gap: 2.5rem;
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .post {
    padding: 1.75rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
