/*
 * rumii.dev — Yeezy-shop inspired layout: stark type, flat grid, no chrome.
 * Tweak --pad and --max for density; CSS variables handle light/dark.
 */

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #737373;
  --line: rgba(0, 0, 0, 0.12);
  --max: 72rem;
  --pad: clamp(1rem, 4vw, 2.5rem);
  --font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #fafafa;
    --muted: #a3a3a3;
    --line: rgba(255, 255, 255, 0.12);
  }
}

#theme-toggle:checked ~ .site {
  --bg: #0a0a0a;
  --fg: #fafafa;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.12);
}

@media (prefers-color-scheme: dark) {
  #theme-toggle:checked ~ .site {
    --bg: #ffffff;
    --fg: #0a0a0a;
    --muted: #737373;
    --line: rgba(0, 0, 0, 0.12);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: clamp(0.8125rem, 0.85vw + 0.7rem, 0.9375rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

.theme-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.site,
.site * {
  transition: background-color 0.25s ease, color 0.25s ease;
}

.site {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
}

/* —— header (shop-style top bar) —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: var(--pad);
  padding-bottom: 1rem;
  background: var(--bg);
}

.brand {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  cursor: pointer;
  user-select: none;
  font: inherit;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.65rem;
}

.theme-toggle-text {
  display: none;
}

/*
 * Unchecked + light system → light UI → offer “dark”.
 * Checked → dark UI → offer “light”.
 * Dark system: invert which span shows; checked flips to light UI.
 */
.theme-for-light {
  display: inline;
}

#theme-toggle:checked ~ .site .theme-for-light {
  display: none;
}

#theme-toggle:checked ~ .site .theme-for-dark {
  display: inline;
}

@media (prefers-color-scheme: dark) {
  .theme-for-light {
    display: none;
  }
  .theme-for-dark {
    display: inline;
  }
  #theme-toggle:checked ~ .site .theme-for-light {
    display: inline;
  }
  #theme-toggle:checked ~ .site .theme-for-dark {
    display: none;
  }
}

/* —— main —— */
.main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) calc(var(--pad) * 2);
}

.section {
  padding-top: clamp(2.5rem, 8vw, 5rem);
}

.section-label {
  margin: 0 0 1.25rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* —— hero —— */
.hero-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 10vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: lowercase;
}

.tagline {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  text-transform: lowercase;
}

/* Tagline + ASCII (right) */
.hero-split {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  margin-top: 1.75rem;
}

.ascii {
  margin: 0;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: clamp(0.22rem, 0.5vw, 0.34rem);
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--muted);
  white-space: pre;
  overflow: hidden;
  user-select: none;
}

@media (min-width: 720px) {
  .hero-split {
    grid-template-columns: minmax(0, 28rem) minmax(0, 1fr);
    align-items: start;
  }

  .ascii {
    justify-self: end;
    max-width: 40rem;
  }
}

/* —— skills (SKU list) —— */
.skills-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

@media (min-width: 640px) {
  .skills-list {
    grid-template-columns: 1fr 1fr;
  }
}

.skills-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  font-size: 0.8125rem;
  text-transform: lowercase;
}

@media (min-width: 640px) {
  .skills-list li:nth-child(odd) {
    padding-right: 1.5rem;
  }
  .skills-list li:nth-child(even) {
    padding-left: 1.5rem;
  }
}

.skills-list .sku {
  color: var(--fg);
  letter-spacing: 0.04em;
}

.skills-list li span:last-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

/* —— projects (product grid) —— */
.product-grid {
  display: grid;
  gap: 0;
}

/* —— blog embed —— */
.embed-frame {
  padding: 1.25rem 0;
}

.substack-embed {
  width: 100%;
  height: clamp(520px, 85vh, 860px);
  border: 0;
  background: transparent;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.product {
}

@media (min-width: 768px) {
  .product:nth-child(odd) {
  }
}

.product-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-link:hover .product-name,
.product-link:focus-visible .product-name {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 1;
  background: var(--line);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-meta {
  padding: 1rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-code {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.product-name {
  font-size: 0.8125rem;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.product-detail {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.06em;
}

.product-placeholder .product-meta {
  min-height: 8rem;
  justify-content: center;
  padding: 2rem 0;
}

/* —— contact —— */
.contact-line {
  margin: 0;
}

.social-links {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  text-decoration: none;
}

.social-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.social-icon-link:hover,
.social-icon-link:focus-visible {
  color: var(--muted);
}

.link-inline {
  color: inherit;
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.link-inline:hover,
.link-inline:focus-visible {
  color: var(--muted);
  text-decoration-color: transparent;
}

/* —— footer —— */
.site-footer {
  margin-top: auto;
  padding: var(--pad);
}

.site-footer p {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
