:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f5f7fb;
  --muted: #949aa8;
  --accent: #9effb8;
  --accent-soft: rgba(158, 255, 184, 0.14);
  --radius: 1.4rem;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

button,
a {
  font: inherit;
}

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

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.intro {
  padding: clamp(5rem, 10vw, 8.5rem) 0 clamp(5rem, 9vw, 7rem);
  border-bottom: 1px solid var(--border);
}

.eyebrow,
.section-number {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0.8rem 0 1.2rem;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: normal;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.intro > p:last-child {
  max-width: 39rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.65;
}

.demo-section {
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  border-bottom: 1px solid var(--border);
}

.section-heading {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0.3rem 0 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 620;
  letter-spacing: -0.055em;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.progress-card {
  padding: 1.4rem;
}

.progress-card > span {
  display: block;
  margin-bottom: 1.7rem;
  color: var(--muted);
  font-size: 0.83rem;
}

.progress {
  height: 0.72rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.progress::before {
  content: "";
  display: block;
  height: 100%;
  background: #6df291;
  border-radius: inherit;
  box-shadow: 0 0 24px #7dff9d4d;
  width: attr(data-progress %, 0%);
}

.ghost-button {
  padding: 0.65rem 0.95rem;
  color: var(--text);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: background 160ms ease, transform 160ms ease;
}

.ghost-button:hover {
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.notification-stage {
  position: relative;
  padding: clamp(1.2rem, 4vw, 3rem);
  overflow: hidden;
}

.notification-list {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.notification-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  opacity: 0;
  border-bottom: 1px solid var(--border);
  animation: notification-in 560ms cubic-bezier(0.17, 0.84, 0.3, 1) forwards;
  animation-delay: attr(data-delay ms, 0ms);
}

.notification-list li:last-child {
  border-bottom: none;
}

.notification-list.is-replaying li {
  animation-name: none;
}

.notification-icon {
  display: grid;
  width: 2.7rem;
  aspect-ratio: 1;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(158, 255, 184, 0.16);
  border-radius: 0.85rem;
}

.notification-list strong,
.notification-list small {
  display: block;
}

.notification-list strong {
  margin-bottom: 0.22rem;
  font-size: 0.93rem;
}

.notification-list small,
.notification-list time {
  color: var(--muted);
  font-size: 0.76rem;
}

@keyframes notification-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project-link {
  display: block;
}

.card, .hero-image {
  view-transition-name: attr(id type(<custom-ident>));
}

.card {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  background: #10131b;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 260ms ease;
}

.project-link:hover .card {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-6px);
}

.project-link__meta {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0.2rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.project-link__meta span:first-child {
  color: var(--text);
  font-weight: 650;
}

.article {
  padding-bottom: 5rem;
}

.article-back {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin: 2rem 0 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.article-back:hover {
  color: var(--text);
}

.hero-image {
  display: block;
  width: 100%;
  max-height: min(68vh, 560px);
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-body {
  width: 100%;
  margin-top: 2.5rem;
}

.article-body h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.article-body p {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

@view-transition {
  navigation: auto;
}

::view-transition-group(*) {
  animation-duration: 650ms;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (max-width: 820px) {
  .progress-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .card {
    height: 260px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .notification-list li {
    gap: 0.75rem;
  }

  .notification-icon {
    width: 2.35rem;
  }

  .intro h1 {
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
