*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-nav-bg: #d8d8d8;
  --color-page-bg: #f2f2f2;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-border: #888888;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --nav-height: 2.75rem;
  --nav-card-padding-y: 0.625rem;
  --header-outer-padding: var(--space-sm);
  --header-total-height: calc(
    var(--header-outer-padding) * 2 + var(--nav-card-padding-y) * 2 + var(--nav-height)
  );
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--color-page-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ── Navigation ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--header-outer-padding);
  background: transparent;
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--nav-height);
  padding: var(--nav-card-padding-y) var(--space-sm);
  gap: var(--space-sm);
  background: rgba(216, 216, 216, 0.95);
  border-radius: 0.75rem;
}

.nav-left {
  min-width: 0;
}

.site-title {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  color: var(--color-text);
}

.site-title:hover,
.site-title:focus-visible {
  color: var(--color-text);
  outline: none;
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  flex-wrap: wrap;
}

.nav-link {
  white-space: nowrap;
  color: var(--color-text-muted);
  font-weight: 400;
  transition: color 0.15s ease;
}

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

.nav-link.is-active {
  color: var(--color-text);
  font-weight: 700;
}

.nav-link-number {
  display: inline;
}

.nav-mobile-menu {
  display: none;
}

/* ── Main content ── */

.site-main {
  padding-top: var(--header-total-height);
  min-height: 100vh;
}

.page-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  text-align: center;
}

.page-panel[hidden] {
  display: none;
}

.page-heading {
  margin: 0 0 var(--space-md);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.page-placeholder {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ── About page ── */

.page-about {
  padding: 0;
  align-items: stretch;
  text-align: left;
  min-height: calc(100vh - var(--header-total-height));
  background: var(--color-page-bg);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  min-height: calc(100vh - var(--header-total-height) - 2.5rem);
}

.about-image-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: var(--color-page-bg);
}

.about-image {
  display: block;
  width: min(100%, 28rem);
  height: auto;
  max-height: calc(100vh - var(--header-total-height) - 4rem);
  object-fit: contain;
}

.about-content-col {
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  background: var(--color-page-bg);
}

.about-doc-title {
  margin: 0 0 var(--space-md);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.about-rule {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0 0 var(--space-md);
}

.about-rule--short {
  margin: var(--space-sm) 0;
  max-width: 12rem;
}

.about-rule--full {
  margin: 0;
}

.about-doc-grid {
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) 1fr;
  gap: var(--space-md);
  align-items: start;
}

.about-sidebar {
  margin: 0;
}

.about-sidebar-item {
  margin: 0;
  line-height: 1.45;
}

.about-sidebar-item + .about-sidebar-item {
  margin-top: 0.125rem;
}

.about-sidebar-item--bold {
  font-weight: 700;
}

.about-work-includes {
  margin: 0;
}

.about-work-list {
  margin: 0.125rem 0 0;
  padding: 0;
  list-style: none;
}

.about-work-list li {
  position: relative;
  padding-left: 0.85rem;
  line-height: 1.45;
  font-weight: 700;
}

.about-work-list li::before {
  content: "•";
  position: absolute;
  left: 0;
}

.about-sidebar-link a {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
}

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

.about-prose {
  max-width: 22rem;
}

.about-prose p {
  margin: 0 0 var(--space-sm);
  line-height: 1.55;
}

.about-lead {
  font-weight: 700;
}

.about-prose-muted {
  color: var(--color-text-muted);
}

.about-prose-emphasis {
  font-weight: 700;
  font-style: italic;
}

.about-page-footer {
  margin-top: auto;
}

.about-footer-bar {
  height: 2.5rem;
  background: var(--color-page-bg);
}

/* ── Feed (Objects for sale) ── */

.page-feed {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-xl);
}

.feed {
  width: min(100%, 42rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feed-card {
  margin: 0;
  background: #f0f0ec;
  border: 1px solid #333333;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feed-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
  padding: var(--space-md);
}

.feed-card-media--placeholder {
  background: linear-gradient(145deg, #e8e8e4 0%, #d8d8d4 100%);
}

.feed-card-media--alt {
  background: linear-gradient(145deg, #ececec 0%, #dcdcdc 100%);
}

.feed-card-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feed-card-media--corso {
  gap: 0.35rem;
  background: #f5f5f0;
}

.corso-block {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 3.25rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.corso-c { background: #e6332a; }
.corso-o1 { background: #2b5ea8; }
.corso-r { background: #1a1a2e; }
.corso-s { background: #e6332a; }
.corso-o2 { background: #1a1a2e; color: #f5d547; }

.feed-card-caption {
  margin: 0;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  :root {
    --nav-height: 5.5rem;
    --nav-card-padding-y: var(--space-sm);
    --header-total-height: calc(
      var(--header-outer-padding) * 2 + var(--nav-card-padding-y) * 2 + var(--nav-height)
    );
  }

  .site-nav {
    display: block;
    min-height: var(--nav-height);
    padding: var(--space-sm);
  }

  .nav-left {
    float: left;
    max-width: 55%;
  }

  .nav-center {
    display: none;
  }

  .nav-mobile-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.125rem;
    float: right;
    text-align: right;
  }

  .nav-mobile-menu .nav-link {
    font-size: 0.8125rem;
    line-height: 1.35;
  }

  .site-nav::after {
    content: "";
    display: table;
    clear: both;
  }

  .page-panel {
    padding: var(--space-md) var(--space-sm) var(--space-lg);
  }

  .page-about {
    padding: 0;
  }

  .about-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .about-image-col {
    padding: var(--space-sm);
  }

  .about-image {
    width: min(100%, 20rem);
    max-height: none;
  }

  .about-content-col {
    padding: var(--space-md) var(--space-sm);
  }

  .about-doc-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .about-prose {
    max-width: none;
  }

  .page-feed {
    padding-top: var(--space-sm);
  }

  .page-heading {
    margin-bottom: var(--space-md);
    font-size: 1.125rem;
  }

  .feed {
    width: 100%;
    gap: var(--space-sm);
  }

  .feed-card {
    border-radius: 0.875rem;
  }

  .feed-card-media {
    min-height: 12rem;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 0.8125rem;
    line-height: 1.35;
  }

  .nav-mobile-menu .nav-link {
    font-size: 0.75rem;
  }

  .page-panel {
    padding: var(--space-sm) var(--space-sm) var(--space-md);
  }

  .corso-block {
    width: 2.25rem;
    height: 2.75rem;
    font-size: 1.375rem;
  }
}
