/* Gravion portfolio — one stylesheet, no external requests. */

:root {
  --bg: #0d1117;
  --bg-raised: #161b22;
  --bg-inset: #010409;
  --border: #30363d;
  --border-soft: #21262d;
  --text: #e6edf3;
  --text-muted: #9198a1;
  --accent: #3fb950;
  --accent-dim: #1f6f2e;
  --accent-ink: #04140a;
  --link: #6cb6ff;
  --warn: #d29922;
  --radius: 8px;
  --maxw: 1080px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

code,
pre,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
}

code {
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

pre {
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
}

/* Layout */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(13, 17, 23, 0.92);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

nav.primary ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

nav.primary a {
  display: block;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

nav.primary a:hover {
  color: var(--text);
  background: var(--bg-raised);
}

nav.primary a[aria-current="page"] {
  color: var(--accent);
  background: var(--bg-raised);
}

.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0.35rem 0;
}

/* Typography */

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem);
  margin: 0 0 0.6rem;
}

h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.65rem);
  margin: 2.75rem 0 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-soft);
}

h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 68ch;
}

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

.small {
  font-size: 0.88rem;
}

/* Hero */

.hero {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--border-soft);
}

.hero h1 {
  margin-bottom: 0.75rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* Buttons */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: #4cc45e;
}

.btn-secondary {
  background: var(--bg-raised);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

/* Stats */

.stats {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.stats li {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.stat-value {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

/* Cards */

.card-grid {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}

.card p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.card .card-foot {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.tag {
  display: inline-block;
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin: 1.25rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

thead th {
  background: var(--bg-inset);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.filters button {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.filters button:hover {
  color: var(--text);
  border-color: var(--accent);
}

.filters button[aria-pressed="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: #e9ffec;
}

/* Misc */

.note {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.94rem;
}

.note.warning {
  border-left-color: var(--warn);
}

.stack > * + * {
  margin-top: 0.75rem;
}

.price {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.tier-name {
  font-weight: 700;
}

noscript .fallback {
  display: block;
}

.hide {
  display: none;
}

@media (max-width: 640px) {
  .hero {
    padding: 2.5rem 0 1.75rem;
  }

  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  h2 {
    margin-top: 2rem;
  }
}
