:root {
  /* Sizes */
  --desktop-container-width: 900px;
  --desktop-small-container-width: 800px;
  --desktop-large-container-width: 2560px;

  --radius-sm: 8px;
  --radius-md: 12px;

  --header-height: 60px;

  /* Colors */
  /* --bg: #121212; */
  --bg: #131019;
  --bg-card: #222222;
  --bg-card-purple: #1A1A24;
  --purple: #8448ea;
  --purple-light: #A78BFA;
  --white: #eae4fe;
  --grey-100: #dddae4;
  --grey-300: #b2adc1;
  --grey-500: #8e899b;
  --header-bg: #201c2a;
  --hero-bg: #201c2a;
  --placeholder-grad-start: #3A3A3A;
  --placeholder-grad-end: #2A1A3E;
  --border: #2E2E2E;

  /* Transitions */
  --nav-hover-transition: 0.2s ease-out;
  --link-hover-transition: 0.2s ease-out;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', --apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--grey-100);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
  max-width: var(--desktop-container-width);
  margin: 0 auto;
  padding: 0 24px;
  padding-left: calc(24px + 100vw - 100%);
}

.small-container {
  max-width: var(--desktop-small-container-width);
  margin: 0 auto;
  padding: 0 24px;
  padding-left: calc(24px + 100vw - 100%);
}

.large-container {
  max-width: var(--desktop-large-container-width);
  margin: 0 auto;
  padding: 0 24px;
  padding-left: calc(24px + 100vw - 100%);
}

/* Header */
.header {
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  /* padding-left: calc(100vw - 100%); */
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-height);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--grey-300);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--nav-hover-transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  scale: 0;
  height: 2px;
  background-color: var(--purple);
  transition: scale var(--nav-hover-transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
  scale: 1;
}

/* Hero */
.hero-container {
  margin: 24px auto 24px;
  max-width: var(--desktop-container-width);
}

.hero {
  padding: 20px;
  margin: 0 24px;
  background: var(--hero-bg);
  border-radius: var(--radius-sm) var(--radius-md);
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  white-space: nowrap;
}

.hero-image {
  height: 160px;
  width: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border-width: 2px;
  border-style: solid;
  border-color: var(--purple-light);
}

.hero-blurb {
  height: 160px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-blurb-text {
  color: var(--grey-100);
  line-height: 1.5;
}

/* Blog Hero */
.blog-hero {
  padding: 30px 0 30px;
  background: var(--hero-bg);
  position: relative;
  overflow: hidden;
}

/* Section */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 48px;
  position: relative;
  letter-spacing: -0.3px;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background-color: var(--purple);
  margin-top: 12px;
  border-radius: 2px;
}

/* Featured Project */
#featured-project {
  padding-top: 24px;
}

.featured-project {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.featured-screenshot {
  width: 100%;
  /* max-width: calc(max(300px, 100vh - (160px + var(--header-height))) * 16 / 9); */
  max-width: calc(max(300px, 100vh - (148px)) * 16 / 9);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border-width: 1px;
  border-color: var(--purple-light);
  border-style: solid;
}

.featured-screenshot iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  border-radius: calc(var(--radius-md) - 1px);
}

.featured-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

.featured-info {
  max-width: var(--desktop-container-width);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.featured-title {
  font-size: 0.95rem;
  color: var(--grey-100);
  line-height: 1.7;
}

.featured-description {
  font-size: 0.95rem;
  color: var(--grey-300);
  line-height: 1.7;
}

/* Links */
.text-link {
  color: var(--purple-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color var(--link-hover-transition);
}

.text-link:hover {
  color: var(--white);
}

.text-link-disabled {
  color: var(--purple-light);
  font-weight: 500;
}

.section-more {
  margin-top: 24px;
  text-align: right;
  font-size: 0.9rem;
}

/* Blog List */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.blog-item {
  display: flex;
  gap: 24px;
  text-decoration: none;
  transition: opacity var(--link-hover-transition);
}

.blog-item:hover {
  opacity: 0.8;
}

.blog-image {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-card);
}

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

.blog-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--placeholder-grad-start) 0%, var(--placeholder-grad-end) 100%);
}

.blog-text {
  flex: 1;
  min-width: 0;
}

.blog-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
}

.blog-text p {
  font-size: 0.9375rem;
  color: var(--grey-300);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-meta {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--grey-500);
  font-weight: 500;
}

/* Post */
.post-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3em;
  margin-bottom: 0.5rem;
}

.post-content {
  padding-top: 40px;
  padding-bottom: 0;
}

.post-meta {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--grey-500);
  margin-bottom: 2rem;
}

.post-hero-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 40px;
}

.post-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose {
  /* max-width: 680px; */
  font-size: 1.0625rem;
  color: var(--grey-300);
  line-height: 1.8;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  margin: 40px 0 16px;
}

.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin: 32px 0 12px;
}

.prose p {
  margin-bottom: 16px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px 24px;
}

.prose li {
  margin-bottom: 6px;
}

.prose strong {
  color: var(--white);
}

.prose pre {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.6em;
  background: var(--bg-card-purple);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--grey-300) var(--bg-card);
}

.prose pre code {
  font-size: 0.85rem;
  background: none;
  color: var(--grey-300);
  padding: 0;
  border-radius: 0;
}

.prose code {
  font-family: "JetBrains Mono";
  font-size: 0.875rem;
  background: var(--bg-card-purple);
  color: var(--purple-light);
  padding: 2px 6px;
  border-radius: 4px;
}

.post-nav {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-nav-links {
  display: flex;
  gap: 24px;
}

/* Footer */
.footer {
  background: var(--bg);
  padding: 40px 0;
  text-align: center;
  border-top: none;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.copyright-text {
  font-size: 0.8rem;
  color: var(--grey-500);
}

/* Responsive */
@media (max-width: 768px) {
  .section {
    padding: 36px 0;
  }

  .post-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 580px) {
  .hero-content {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-blurb {
    text-align: center;
    height: auto;
  }

  .hero-blurb .copyright-text {
    margin-top: 14px;
  }
}

@media (max-width: 480px) {
  .nav {
    gap: 20px;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .blog-item {
    flex-direction: column;
    gap: 16px;
  }

  .blog-image {
    width: 100%;
    height: auto;
  }

  .blog-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 140 / 100;
  }
}