:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --text-primary: #111111;
  --text-secondary: #8a8a8a;
  --accent: #ff7300;
  --border: #e9e9e9;
  --card-bg: #d9d9d9;
  --focus-overlay: rgba(0, 0, 0, 0.56);
  --container: 900px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --text-primary: #f5f5f5;
    --text-secondary: #b6b6b6;
    --accent: #ff8a2f;
    --border: #3a3a3a;
    --card-bg: #3f3f3f;
    --focus-overlay: rgba(0, 0, 0, 0.74);
  }

  .site-header .brand-mark img,
  .site-header .social-links a img,
  .control-chip img,
  .post-quick-link img,
  .audio-toggle .icon,
  .manifesto-item-icon,
  .device-icon {
    filter: brightness(0) invert(1);
  }

  .close-btn img {
    filter: brightness(0) invert(1) saturate(0) contrast(200%);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
}

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

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.site-header {
  padding-top: 5rem;
}

.top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.brand-mark {
  display: inline-flex;
}

.brand-mark img {
  width: 108px;
  height: 46.5px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.social-links a img {
  width: 30px;
  height: 30px;
}

.hero-copy {
  padding: 8rem 0 8.5rem;
}

.hero-name,
.hero-role,
.hero-tagline {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.06;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
}

.hero-role,
.hero-tagline {
  font-size: clamp(2.3rem, 4.8vw, 3.9rem);
  font-weight: 400;
}

.hero-tagline {
  min-height: 1.12em;
}

.type-cursor {
  color: var(--accent);
  animation: blink 1s steps(1, end) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.tab-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-secondary);
}

.tab-nav-inner {
  height: 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}

.tab-link {
  position: relative;
  text-align: center;
  font-size: 17px;
  line-height: 1;
  font-weight: 400;
  padding: 0.8rem 0.4rem;
  color: var(--text-primary);
}

.tab-link.is-active {
  font-weight: 700;
}

.tab-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: transparent;
}

.tab-link.is-active::after {
  background: var(--accent);
}

.section {
  padding: 2.5rem 0 6rem;
}

.blog-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.9rem;
}

.control-chip {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: var(--bg-secondary);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.control-chip img,
.control-chip svg {
  width: 24px;
  height: 24px;
}

.control-chip.is-active {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
}

.blog-search-panel,
.blog-filter-panel {
  display: none;
  margin-bottom: 2.2rem;
}

.blog-search-panel.is-open,
.blog-filter-panel.is-open {
  display: block;
}

.blog-search-panel input,
.blog-filter-panel select,
.newsletter-form input {
  width: 100%;
  min-height: 48px;
  padding: 0.72rem 0.88rem;
  font: inherit;
  font-size: 17px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 0;
  border-radius: 8px;
}

.blog-filter-panel {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.blog-filter-panel.is-open {
  display: grid;
}

.blog-views [data-view-panel] {
  display: none;
}

.blog-views [data-view-panel].is-visible {
  display: block;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 2rem;
}

.tile-image-wrap {
  aspect-ratio: 434 / 330;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.tile-image,
.tile-image-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--card-bg);
}

.post-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
  font-weight: 590;
  letter-spacing: -0.02em;
}

.tile-card .post-title,
.list-post .post-title,
.work-item h3,
.manifesto-item h2,
.timeline-copy h2 {
  font-size: clamp(1.55rem, 2.1vw, 2rem);
}

.post-date {
  margin: 0.35rem 0 1rem;
  font-size: 21px;
  color: var(--text-secondary);
}

.post-excerpt,
.rich-content p,
.manifesto-item p,
.timeline-copy p {
  margin: 0;
  font-size: 17px;
  color: var(--text-primary);
}

.list-feed {
  display: grid;
  gap: 4.5rem;
}

.list-post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.list-post-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.post-select-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.post-quick-link {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-quick-link img {
  width: 24px;
  height: 24px;
}

.rich-content {
  display: grid;
  gap: 1rem;
}

.rich-content ul,
.timeline-copy ul {
  margin: 0;
  padding-left: 1.35rem;
  display: grid;
  gap: 0.72rem;
  font-size: 17px;
}

.audio-player {
  margin: 0.9rem 0 1.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.audio-toggle {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.audio-toggle .icon {
  width: 48px;
  height: 48px;
}

.audio-toggle .icon-pause {
  display: none;
}

.audio-player.is-playing .audio-toggle .icon-play {
  display: none;
}

.audio-player.is-playing .audio-toggle .icon-pause {
  display: block;
}

.audio-track-wrap {
  display: grid;
  gap: 0.28rem;
}

.audio-track {
  width: 100%;
  height: 8px;
  margin: 0;
  appearance: none;
  border-radius: 8px;
  background: var(--card-bg);
  cursor: pointer;
}

.audio-track::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-primary);
}

.audio-time {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.focus-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  overflow-y: auto;
  padding: 4rem 1rem;
}

.focus-modal.is-open {
  display: block;
}

.focus-backdrop {
  position: fixed;
  inset: 0;
  background: var(--focus-overlay);
}

.focus-post-card {
  position: relative;
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 3rem;
  border-radius: 24px;
  background: var(--bg-primary);
}

.focus-post-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.close-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #000;
  color: #fff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.close-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1) saturate(0) contrast(200%);
}

.single-post {
  padding: 0;
}

.section-manifesto .manifesto-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4rem 2rem;
  padding-top: 1rem;
}

.manifesto-item-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

.manifesto-item h2 {
  margin: 0 0 0.45rem;
  font-weight: 590;
}

.manifesto-item p {
  font-size: 17px;
  line-height: 1.35;
}

.section-work .work-gate {
  text-align: center;
  margin: 3rem 0 5.5rem;
}

.device-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}

.work-gate h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 590;
}

.work-gate p {
  margin: 0.8rem auto 1.7rem;
  width: min(100%, 390px);
  font-size: 17px;
}

.btn-primary,
.newsletter-form button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1rem 2rem;
  cursor: pointer;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.2rem 2rem;
}

.work-item h3 {
  margin: 0;
  font-weight: 590;
}

.site-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(16px);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 120;
}

.site-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.timeline {
  display: grid;
  gap: 3rem;
  padding-top: 1rem;
}

.timeline-item {
  display: grid;
  gap: 1rem;
}

.timeline-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.timeline-copy h2 {
  margin: 0;
  font-weight: 590;
}

.timeline-dates {
  margin: 0.3rem 0 0.8rem;
  color: var(--text-secondary);
  font-size: 17px;
}

.timeline-copy h3 {
  margin: 1rem 0 0.4rem;
  font-size: 17px;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.newsletter h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 590;
}

.newsletter p {
  margin: 0.4rem 0 1rem;
  color: var(--text-secondary);
  font-size: 17px;
}

.newsletter-form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.copyright {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

[data-animate="reveal"],
[data-animate="hero"] {
  opacity: 0;
  transform: translateY(16px);
}

.is-inview {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

@media (max-width: 1024px) {
  .hero-copy {
    padding: 5rem 0 5.5rem;
  }

  .section-manifesto .manifesto-grid,
  .work-grid,
  .tile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding-top: 1.5rem;
  }

  .brand-mark img {
    width: 84px;
    height: auto;
  }

  .social-links {
    gap: 0.7rem;
  }

  .social-links a img {
    width: 24px;
    height: 24px;
  }

  .hero-copy {
    padding: 2.7rem 0 3.5rem;
  }

  .tab-nav-inner {
    min-width: 360px;
    overflow-x: auto;
  }

  .blog-filter-panel.is-open {
    grid-template-columns: 1fr;
  }

  .list-post-header {
    flex-direction: column;
    gap: 0.4rem;
  }

  .focus-modal {
    padding: 2rem 0.8rem;
  }

  .focus-post-card {
    padding: 1.25rem;
  }

  .newsletter-form,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
