/* ginet.vip — project index */

:root {
  --bg: #101012;
  --text: #ededeb;
  --muted: #8e8e8a;
  --faint: #6a6a68;
  --line: #26262a;
  --accent: #d99a6c;
  --accent-soft: #38291f;

  --measure: 40rem;
  --gutter: clamp(1.25rem, 5vw, 2rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Narrow screens: one column, one measure, shared by every band. */
.topbar,
.site-header,
main,
.site-footer {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { flex: 1; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- header ---------- */

.topbar {
  display: flex;
  justify-content: flex-end;
  padding-top: clamp(1.5rem, 5vh, 2.5rem);
}

.site-header {
  padding-bottom: clamp(2.5rem, 8vh, 4.5rem);
}

h1 {
  margin: clamp(2rem, 8vh, 4rem) 0 0;
  font-size: clamp(2.75rem, 10vw, 4.5rem);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .04em;
  padding: .32rem .68rem;
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: #17110c;
}

/* ---------- projects ---------- */

/* Single column at a readable measure: it stays orderly at three projects and
   at eight, with no widowed card in a half-filled row. */
.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
}

.card {
  position: relative;
  display: block;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
}

.card:hover,
.card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.card-arrow {
  position: absolute;
  top: 1.35rem;
  right: 1.4rem;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card:hover .card-arrow,
.card:focus-visible .card-arrow {
  stroke: var(--accent);
  transform: translate(1px, -1px);
}

.card-head { padding-right: 2rem; }

.card-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.012em;
}

.card-name-alt {
  margin: .12rem 0 0;
  font-size: .85rem;
  color: var(--faint);
}

.card-desc {
  margin: .85rem 0 0;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--muted);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.05rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  letter-spacing: .02em;
  color: var(--faint);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.badges {
  display: inline-flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.badge {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .045em;
  padding: .2rem .52rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1.4rem;
  margin-top: clamp(3rem, 10vh, 5rem);
  padding-top: 1.4rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: .82rem;
}

.site-footer a {
  color: var(--faint);
  text-decoration: none;
}

.site-footer a:hover { color: var(--text); }

/* Pushed to the far end of the footer — the one thing on the page that sits
   bottom-right. Tabular figures so the number does not jitter when it is
   edited. */
.uptime {
  margin-left: auto;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: no-preference) {
  .card,
  .card-arrow,
  .site-footer a,
  .lang-btn {
    transition: color .15s ease, background-color .15s ease,
                border-color .15s ease, stroke .15s ease, transform .15s ease;
  }
}

/* ---------- wide screens ---------- */

/* Below this width the page is one centred column, which is the right shape for
   a phone. Above it there is room for a real composition: the heading takes a
   left rail and the list takes the right, so a desktop window reads as a page
   instead of a phone layout stretched down the middle. The rail is sized by the
   heading itself (`auto`), so it stays correct if the type scale changes. */
@media (min-width: 60rem) {
  body {
    display: grid;
    grid-template-columns: auto minmax(0, 40rem);
    grid-template-rows: auto 1fr auto;
    column-gap: clamp(3rem, 7vw, 6rem);
    justify-content: center;
    padding-inline: var(--gutter);
  }

  /* The bands stop being self-centring boxes — the grid places them now. */
  .topbar,
  .site-header,
  main,
  .site-footer {
    max-width: none;
    margin-inline: 0;
    padding-inline: 0;
  }

  .topbar { grid-column: 1 / -1; grid-row: 1; }
  .site-header { grid-column: 1; grid-row: 2; padding-bottom: 0; }
  main { grid-column: 2; grid-row: 2; }
  .site-footer { grid-column: 1 / -1; grid-row: 3; }

  /* One offset for both columns so the heading and the first card start on the
     same line. */
  h1 { margin-top: clamp(3rem, 9vh, 5rem); }
  main { padding-top: clamp(3rem, 9vh, 5rem); }

  .projects { gap: .9rem; }
  .card { padding: 1.5rem 1.75rem; }
  .card-arrow { top: 1.5rem; right: 1.65rem; }
}
