:root {
    --black: #111;
    --line: #d5d5d5;
    --white: #fff;
    --bg: #f7f7f7
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

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

a {
    color: inherit
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px clamp(18px, 5vw, 64px);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px)
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -.03em
}

.brand img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(1)
}

.site-header nav {
    display: flex;
    gap: 26px
}

.site-header nav a {
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    color: #333
}

.site-header nav a:hover {
    text-decoration: underline
}

.hero {
    display: grid;
    grid-template-columns: minmax(240px, 390px) 1fr;
    align-items: center;
    gap: clamp(38px, 7vw, 100px);
    min-height: 480px;
    padding: clamp(52px, 7vw, 90px) clamp(20px, 8vw, 110px);
    background: #e8e8e8;
    border-bottom: 1px solid #ccc
}

.hero-logo {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .14)
}

.hero-content {
    max-width: 720px
}

.eyebrow {
    margin: 0 0 14px;
    color: #666;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .14em
}

h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 76px);
    line-height: .98;
    letter-spacing: -.055em
}

.hero-copy {
    max-width: 580px;
    margin: 25px 0 0;
    color: #555;
    font-size: 17px;
    line-height: 1.55
}

.hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px
}

.button {
    padding: 12px 17px;
    border: 1px solid #aaa;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750
}

.button.primary {
    background: var(--black);
    border-color: var(--black);
    color: #fff
}

.button.secondary {
    background: #fff
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 44px;
    color: #777;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em
}

.hero-stats strong {
    color: #111;
    font-size: 13px
}

.section {
    padding: clamp(64px, 8vw, 100px) clamp(18px, 7vw, 90px)
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 45px;
    align-items: end;
    margin-bottom: 34px
}

.section-heading h2,
.connect h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -.05em
}

.section-heading>p {
    max-width: 390px;
    margin: 0;
    color: #666;
    line-height: 1.55
}

.catalog-tools {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.search {
    position: relative;
    display: flex
}

.search input {
    width: 100%;
    padding: 16px 52px 16px 18px;
    border: 1px solid #c8c8c8;
    border-radius: 9px;
    background: #fff;
    color: #111;
    font: inherit;
    font-size: 15px;
    outline: 0
}

.search input:focus {
    border-color: #333;
    box-shadow: 0 0 0 3px #ddd
}

.search>span {
    position: absolute;
    right: 18px;
    top: 9px;
    font-size: 26px
}

.filters {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px
}

.filters button {
    white-space: nowrap;
    padding: 8px 11px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer
}

.filters button span {
    margin-left: 5px;
    color: #888
}

.filters button.active {
    background: #222;
    border-color: #222;
    color: #fff
}

.results-row {
    display: flex;
    justify-content: space-between;
    margin: 20px 0 10px;
    color: #666;
    font-size: 11px;
    font-weight: 700
}

.results-row button {
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer
}

.product-grid {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line)
}

.product-card {
    display: grid;
    grid-template-columns: 42px minmax(220px, 1.15fr) minmax(240px, 1.8fr) 84px;
    gap: 18px;
    align-items: center;
    min-height: 82px;
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    animation: rise .25s both;
    animation-delay: var(--delay);
    transition: background .15s
}

.product-card:hover {
    background: #fff
}

.card-number {
    font: 700 10px ui-monospace, monospace;
    color: #999
}

.product-main {
    min-width: 0
}

.category {
    display: block;
    margin-bottom: 4px;
    color: #777;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase
}

.product-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: -.02em
}

.product-description {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.45
}

.product-card>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 11px;
    border: 1px solid #aaa;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none
}

.product-card>a:hover {
    background: #111;
    color: #fff;
    border-color: #111
}

.empty-state {
    text-align: center;
    padding: 60px 20px
}

.projects {
    background: #e5e5e5;
    border-block: 1px solid #ccc
}

.project-grid {
    display: grid;
    gap: 8px
}

.project-card {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 22px;
    background: #f8f8f8;
    border: 1px solid #d1d1d1;
    border-radius: 10px
}

.project-number {
    color: #888;
    font: 700 12px ui-monospace, monospace
}

.project-card h3 {
    margin: 0 0 4px;
    font-size: 22px;
    letter-spacing: -.035em
}

.project-card p {
    margin: 0;
    color: #666;
    font-size: 12px
}

.status {
    padding: 7px 10px;
    border-radius: 6px;
    background: #ddd;
    color: #555;
    font-size: 10px;
    font-weight: 750
}

.connect {
    background: #fff
}

.connect h2 {
    max-width: 700px
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 38px
}

.social-grid a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    text-decoration: none
}

.social-grid a span {
    font-size: 18px;
    font-weight: 800
}

.social-grid a small {
    grid-column: 1;
    color: #777
}

.social-grid a b {
    grid-column: 2;
    grid-row: 1/3;
    font-size: 20px
}

.social-grid a[data-placeholder] {
    cursor: not-allowed;
    opacity: .6
}

footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
    padding: 30px clamp(18px, 5vw, 64px);
    background: #181818;
    color: #eee
}

footer p {
    max-width: 620px;
    margin: 0 auto;
    color: #999;
    font-size: 10px;
    line-height: 1.5
}

footer>span {
    font-size: 10px;
    color: #999
}

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

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(4px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@media(max-width:900px) {
    .hero {
        grid-template-columns: 220px 1fr
    }

    .product-card {
        grid-template-columns: 34px minmax(190px, 1fr) 80px
    }

    .product-description {
        display: none
    }

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

    .site-header nav a:nth-child(2) {
        display: none
    }
}

@media(max-width:620px) {
    .site-header nav {
        gap: 14px
    }

    .site-header nav a {
        font-size: 11px
    }

    .hero {
        grid-template-columns: 90px 1fr;
        align-items: start;
        gap: 20px;
        min-height: 0
    }

    .hero-logo {
        width: 90px
    }

    .hero-copy {
        font-size: 15px
    }

    .hero-actions,
    .hero-stats {
        flex-wrap: wrap
    }

    .product-card {
        grid-template-columns: 26px 1fr 72px;
        gap: 9px
    }

    .product-card h3 {
        font-size: 14px
    }

    .product-card>a {
        padding: 8px;
        font-size: 10px
    }

    .social-grid {
        grid-template-columns: 1fr
    }

    .project-card {
        grid-template-columns: 38px 1fr
    }

    .project-card .status {
        grid-column: 2;
        justify-self: start
    }

    .section-heading {
        gap: 16px
    }

    footer {
        grid-template-columns: 1fr
    }

    footer p {
        margin: 0
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    .product-card {
        animation: none
    }
}

/* ---------- Homepage ---------- */

.home-hero {
  display: grid;
  grid-template-columns: minmax(240px, 390px) 1fr;
  align-items: center;
  gap: clamp(38px, 7vw, 100px);
  padding: clamp(60px, 8vw, 110px) clamp(20px, 8vw, 110px);
  background: #e8e8e8;
  border-bottom: 1px solid #ccc;
}

.home-logo {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(1);
  box-shadow: 0 8px 30px rgba(0,0,0,.14);
}

.home-intro {
  max-width: 760px;
}

.home-section {
  padding: clamp(60px, 8vw, 100px) clamp(18px, 7vw, 90px);
}

.home-section > h2 {
  margin: 0 0 30px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -.05em;
}


/* ---------- Homepage cards ---------- */

.home-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: #e5e5e5;
  border-top: 1px solid #ccc;
}

.home-card {
  display: block;
  padding: clamp(28px, 4vw, 50px);
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  text-decoration: none;
}

.home-card:hover {
  border-color: #777;
}

.home-card h2 {
  margin: 5px 0 15px;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -.045em;
}

.home-card p:not(.eyebrow) {
  max-width: 520px;
  color: #666;
  line-height: 1.55;
}

.home-card > span {
  display: inline-block;
  margin-top: 20px;
  font-weight: 750;
}


/* ---------- Inner page heading ---------- */

.page-header {
  padding: clamp(60px, 8vw, 100px) clamp(18px, 7vw, 90px);
  background: #e8e8e8;
  border-bottom: 1px solid #ccc;
}

.page-header h1 {
  margin-bottom: 22px;
}

.page-header > p:last-child {
  max-width: 700px;
  margin: 0;
  color: #555;
  font-size: 17px;
  line-height: 1.55;
}


/* ---------- Clickable product rows ---------- */

.product-card {
  color: inherit;
  text-decoration: none;
}

.view-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #aaa;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.product-card:hover .view-link {
  background: #111;
  color: #fff;
  border-color: #111;
}


/* Disable old nested-link styling */

.product-card > a {
  all: unset;
}


/* ---------- Projects ---------- */

.project-detail {
  max-width: none;
}

.project-detail h2 {
  margin: 0 0 22px;
  font-size: clamp(38px, 6vw, 68px);
  letter-spacing: -.05em;
}

.project-detail > p {
  max-width: 760px;
  color: #555;
  line-height: 1.6;
}

.project-lead {
  font-size: 20px;
  color: #222 !important;
}

.project-links {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.alt-section {
  background: #e5e5e5;
  border-block: 1px solid #ccc;
}


/* ---------- Project versions ---------- */

.version-list {
  display: grid;
  gap: 8px;
  margin-top: 40px;
  max-width: 800px;
}

.version-list div {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 25px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.version-list span {
  color: #666;
}


/* ---------- Repository cards ---------- */

.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 38px;
}

.repo-grid a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 22px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  text-decoration: none;
}

.repo-grid a:hover {
  border-color: #777;
}

.repo-grid strong {
  font-size: 18px;
}

.repo-grid span {
  grid-column: 1;
  color: #777;
  font-size: 12px;
}

.repo-grid b {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 20px;
}


/* ---------- Mobile ---------- */

@media(max-width: 700px) {

  .home-hero {
    grid-template-columns: 90px 1fr;
    align-items: start;
    gap: 20px;
  }

  .home-logo {
    width: 90px;
  }

  .home-cards {
    grid-template-columns: 1fr;
  }

  .repo-grid {
    grid-template-columns: 1fr;
  }

  .version-list div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

}

/* ---------- Private catalog editor ---------- */
.admin-shell{max-width:1180px;margin:0 auto;padding:70px 24px 100px}.admin-heading{margin-bottom:36px}.admin-heading h1{font-size:clamp(42px,7vw,72px)}.admin-heading>p:last-child{max-width:650px;color:#666;line-height:1.6}.admin-panel{padding:28px;background:#fff;border:1px solid #d3d3d3;border-radius:12px}.admin-panel h2{margin:0 0 22px;font-size:26px}.admin-panel form{display:grid;grid-template-columns:2fr 1fr;gap:18px}.admin-panel label{display:grid;gap:7px;color:#555;font-size:12px;font-weight:750}.admin-panel input,.admin-panel select,.admin-panel textarea,.admin-search input{width:100%;padding:12px;border:1px solid #bbb;border-radius:7px;background:#fff;color:#111;font:inherit}.admin-panel textarea{resize:vertical}.admin-panel .wide{grid-column:1/-1}.admin-actions{display:flex;align-items:center;gap:10px}.admin-actions button{cursor:pointer}.admin-actions #form-status{color:#555;font-size:12px}.admin-list-section{margin-top:70px}.admin-list-heading{display:flex;align-items:end;justify-content:space-between;gap:25px;margin-bottom:18px}.admin-list-heading h2{margin:0;font-size:40px}.admin-search{display:grid;gap:6px;color:#666;font-size:11px}.admin-list{border-top:1px solid #ccc}.admin-row{display:grid;grid-template-columns:1fr auto;gap:20px;align-items:center;padding:16px 8px;border-bottom:1px solid #d5d5d5}.admin-row h3{margin:3px 0 5px;font-size:16px}.admin-row p{margin:0;color:#777;font-size:12px}.admin-row-actions{display:flex;gap:7px}.admin-row-actions button{padding:8px 11px;border:1px solid #aaa;border-radius:6px;background:#fff;font:inherit;font-size:11px;font-weight:750;cursor:pointer}.admin-row-actions .danger{color:#8a1717;border-color:#d5aaaa}.admin-empty,.admin-error{padding:30px 8px;color:#666}.admin-error{color:#8a1717}@media(max-width:650px){.admin-panel form{grid-template-columns:1fr}.admin-panel label{grid-column:1}.admin-list-heading{align-items:stretch;flex-direction:column}.admin-row{align-items:start}.admin-row-actions{flex-direction:column}}
