:root {
  --bg: #090c14;
  --surface: #101624;
  --surface-soft: #151d30;
  --ink: #e8eefc;
  --muted: #9fb0d0;
  --line: #263457;
  --brand: #46d3ff;
  --brand-2: #ff8f4d;
  --brand-3: #6dffb2;
  --brand-4: #ffe066;
  --shadow: 0 20px 36px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(70, 211, 255, 0.12), transparent 35%),
    radial-gradient(circle at 85% 12%, rgba(255, 143, 77, 0.14), transparent 35%),
    radial-gradient(circle at 76% 85%, rgba(109, 255, 178, 0.11), transparent 30%),
    linear-gradient(175deg, #080b13, #0c1120 48%, #090d18);
  min-height: 100%;
}

a {
  color: inherit;
}

.page-wrap {
  width: min(1120px, calc(100vw - 28px));
  margin: 18px auto 44px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(12, 18, 32, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  font-family: "Syne", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav a {
  text-decoration: none;
  border: 1px solid var(--line);
  background: #111a2d;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  color: #c4d2f3;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.nav a:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  background: #162442;
}

.nav a[aria-current="page"] {
  border-color: var(--brand);
  color: #f1f7ff;
  background: #16304b;
}

.hero,
.panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(145deg, rgba(17, 23, 38, 0.98), rgba(20, 29, 47, 0.98));
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
}

.hero-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #bfeeff;
  background: rgba(70, 211, 255, 0.12);
  border: 1px solid rgba(70, 211, 255, 0.4);
  border-radius: 999px;
  padding: 6px 10px;
}

h1,
h2,
h3 {
  font-family: "Syne", sans-serif;
  margin: 0;
}

h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  max-width: 14ch;
}

.lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 70ch;
  line-height: 1.56;
}

.hero-cta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  text-decoration: none;
  font-weight: 800;
  border-radius: 12px;
  padding: 10px 14px;
  display: inline-block;
  border: 1px solid transparent;
}

.button-primary {
  background: #1b5f7a;
  border-color: #2f9ec9;
  color: #eaf7ff;
}

.button-secondary {
  background: #132039;
  border-color: var(--line);
  color: #d5e2ff;
}

.grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.card h3 {
  font-size: 1.2rem;
}

.card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.section-head p,
.section-head small {
  margin: 0;
  color: var(--muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge-blue {
  background: rgba(70, 211, 255, 0.14);
  border-color: rgba(70, 211, 255, 0.35);
  color: #b9ecff;
}

.badge-orange {
  background: rgba(255, 143, 77, 0.15);
  border-color: rgba(255, 143, 77, 0.35);
  color: #ffd5be;
}

.badge-green {
  background: rgba(109, 255, 178, 0.14);
  border-color: rgba(109, 255, 178, 0.33);
  color: #c9ffe6;
}

.note {
  margin-top: 14px;
  border: 1px dashed rgba(70, 211, 255, 0.45);
  background: rgba(70, 211, 255, 0.09);
  border-radius: 12px;
  padding: 12px;
  color: #bdeaff;
}

.search {
  width: 100%;
  max-width: 460px;
  border: 1px solid #325187;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #e6efff;
  background: #0d1528;
}

.search::placeholder {
  color: #7f95c2;
}

.track-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.track-tab {
  border: 1px solid #365083;
  background: #101b31;
  color: #d9e7ff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.track-tab .track-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid #355181;
  background: #142340;
  font-size: 0.75rem;
}

.track-tab.active,
.track-tab[aria-pressed="true"] {
  border-color: var(--brand);
  background: #16304b;
  color: #f2f8ff;
}

.project-groups {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.group-block {
  border: 1px solid #2a3b62;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(150deg, #0f1729, #131f35);
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.group-title {
  margin: 0;
  font-size: 1.2rem;
}

.group-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.project-card {
  border: 1px solid #30456f;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1526;
}

.blog-card {
  border: 1px solid #30456f;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1526;
}

.blog-card-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 170px;
  border-bottom: 1px solid #2f436e;
  overflow: hidden;
}

.blog-card-shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.blog-card-meta {
  margin-bottom: 10px;
  color: #9db4db;
  font-size: 0.84rem;
}

.project-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 210px;
  border-bottom: 1px solid #2f436e;
  padding: 0;
  background:
    linear-gradient(130deg, rgba(70, 211, 255, 0.21), rgba(255, 143, 77, 0.19)),
    linear-gradient(160deg, #0d1527, #121d31);
  overflow: hidden;
}

.project-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.preview-fallback {
  display: none;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  color: #d7e4ff;
}

.preview-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1;
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.preview-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d5e2ff;
  opacity: 0.52;
}

.project-url {
  margin-top: 8px;
  font-size: 0.76rem;
  color: #c5d8ff;
  border: 1px solid #365182;
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(17, 32, 60, 0.86);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-body {
  padding: 12px;
}

.project-body p {
  margin: 8px 0;
  color: #9cb0d3;
  line-height: 1.45;
}

.project-link {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  color: #e8f6ff;
  background: #20577a;
  border: 1px solid #3ea9db;
  border-radius: 10px;
  padding: 8px 11px;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.post-title-only {
  margin-bottom: 0.7rem;
}

.post-title-only h1,
.post-title-only h3 {
  margin: 0;
}

.post-cover {
  position: relative;
  height: clamp(180px, 28vw, 300px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #35507f;
  margin-bottom: 0.9rem;
  background: #0f1a31;
}

.post-cover-media {
  position: absolute;
  inset: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  object-fit: cover;
  object-position: center;
  filter: blur(7px) brightness(0.65);
  transform: scale(1.06);
}

.post-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 20, 0.28), rgba(8, 12, 20, 0.72));
}

.post-cover-title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  color: #f6fbff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.post-article > h1:first-child,
.post-article > h2:first-child,
.post-article > h3:first-child {
  margin-top: 0;
}

.post-content {
  border: 1px solid #2f4572;
  border-radius: 12px;
  background: #0d1527;
  min-height: 260px;
  padding: 16px;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  margin-top: 1em;
}

.post-content p,
.post-content li {
  color: #bdd0f0;
  line-height: 1.58;
}

.post-content img {
  max-width: 100%;
  width: min(100%, 760px);
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 10px;
}

.post-content {
  overflow-x: auto;
}

.post-content blockquote {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--brand);
  background: rgba(70, 211, 255, 0.09);
  color: #daf4ff;
  border-radius: 10px;
}

.post-content .post-hero-image {
  margin: 0.5rem 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #37527f;
  position: relative;
}

.post-content .post-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(70, 211, 255, 0.06));
  pointer-events: none;
}

.post-content .post-hero-image img {
  width: 100%;
  max-width: none;
  margin: 0;
  filter: brightness(1.08) saturate(1.06);
}

.post-content a {
  color: #7be8ff;
}

.post-content pre {
  background: #060a14;
  color: #d6e9ff;
  padding: 12px;
  border-radius: 10px;
  overflow: auto;
}

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

.state {
  color: #9cb0d3;
}

.footer {
  margin-top: 16px;
  text-align: center;
  color: #7e92b8;
  font-size: 0.9rem;
}

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

  .project-preview {
    min-height: 170px;
  }

  .topbar {
    position: static;
  }
}
