:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --panel: #12141a;
  --text: #f4f6fb;
  --muted: #a3a9b8;
  --line: #242833;
  --accent: #7dd3fc;
}

@view-transition {
  navigation: auto;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 15, 0.88);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(960px, calc(100% - 32px));
  min-height: 58px;
  margin: 0 auto;
  gap: 18px;
}

.brand {
  font-size: 0.95rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.tabs a:hover,
.tabs a:focus-visible,
.tabs a[aria-current="page"] {
  background: #1b1f29;
  color: var(--text);
  outline: none;
}

main {
  width: min(960px, calc(100% - 32px));
  min-height: calc(100vh - 115px);
  margin: 0 auto;
}

.page {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 115px);
  padding: 72px 0;
}

.home-page {
  justify-items: center;
  text-align: center;
}

.about-page {
  align-content: start;
  justify-items: center;
  padding-top: 72px;
}

.profile-photo {
  width: clamp(140px, 20vw, 184px);
  height: clamp(140px, 20vw, 184px);
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: lowercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3.8vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.heading-link {
  text-decoration: none;
}

.heading-link:hover,
.heading-link:focus-visible {
  color: var(--accent);
  outline: none;
}

.lead,
.page p {
  max-width: 680px;
  color: var(--muted);
}

.lead {
  margin-bottom: 30px;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-weight: 750;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--text);
}

.social-follow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 20, 26, 0.82);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
}

.social-follow:hover,
.social-follow:focus-visible {
  border-color: rgba(125, 211, 252, 0.52);
  background: #151a23;
  outline: none;
}

.bluesky-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #1185fe;
}

.bluesky-icon svg {
  width: 17px;
  height: 17px;
  fill: #ffffff;
}

.app-list {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 24px;
}

.app-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.app-row:last-child {
  border-bottom: 1px solid var(--line);
}

.app-row p {
  margin-bottom: 0;
}

.app-icon-link {
  display: inline-flex;
  border-radius: 22px;
  text-decoration: none;
}

.app-icon-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.app-icon {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.34);
}

.app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.app-store-badge {
  display: inline-flex;
  overflow: hidden;
  width: 150px;
  height: 50px;
  border-radius: 8px;
}

.app-store-badge img {
  display: block;
  width: 150px;
  height: 50px;
}

.app-detail {
  align-content: start;
  padding-top: 72px;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 22px;
}

.app-title h1 {
  margin-bottom: 0;
}

.app-icon.large {
  width: 112px;
  height: 112px;
  border-radius: 26px;
}

.app-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  width: 100%;
  margin-top: 10px;
}

.app-detail-copy {
  max-width: 680px;
}

.app-detail-copy p,
.app-detail-copy li {
  color: var(--muted);
}

.app-detail-copy ul {
  margin: 0 0 28px;
  padding-left: 22px;
}

.app-detail-copy li + li {
  margin-top: 8px;
}

.support-panel {
  align-self: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.support-panel h2 {
  margin-bottom: 12px;
  font-size: 1.12rem;
}

.support-panel .app-store-badge {
  margin-bottom: 16px;
}

.scratchpad {
  width: min(720px, 100%);
  margin-top: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.scratchpad pre {
  overflow-x: auto;
  margin: 0;
  color: var(--text);
  font: inherit;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.text-link {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.contact-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent);
  font-size: 1.08rem;
  font-weight: 750;
  text-decoration: none;
}

.site-footer {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

::view-transition-old(root) {
  animation: tab-slide-out 240ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

::view-transition-new(root) {
  animation: tab-slide-in 240ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes tab-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-42px);
  }
}

@keyframes tab-slide-in {
  from {
    opacity: 0;
    transform: translateX(42px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 1ms;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
    gap: 10px;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .tabs a {
    flex: 1 0 auto;
  }

  .page {
    min-height: auto;
    padding: 64px 0 52px;
  }

  .about-page {
    justify-items: stretch;
  }

  .app-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .app-icon {
    width: 76px;
    height: 76px;
    border-radius: 18px;
  }

  .app-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .app-detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .app-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .app-icon.large {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .scratchpad {
    padding: 20px;
  }

  .actions,
  .button {
    width: 100%;
  }

  .social-follow {
    justify-content: center;
    width: 100%;
  }
}
