/*
  /projects theme: ramen. Carries over public/designs/ramen.css:
  cream paper, the red banner as the header, Noto Serif JP black headings with the red dot,
  IBM Plex Mono labels, heavy black rules, square red buttons with an arrow,
  covers set in the dark side panel.
  Contract: src/projects-themes.md.
*/

:root[data-theme="ramen"] {
  color-scheme: light;

  --stage: #f3ead8;
  --shot: #1c1714;
  --line: #1c1714;
  --fg: #1c1714;
  --muted: #5c524a;
  --sub: #3a322c;
  --accent: #b5241b;
  --accent-text: #b5241b;
  --on-accent: #f3ead8;
  --accent-soft: rgba(181, 36, 27, 0.1);

  --f-text: "DM Sans", sans-serif;
  --f-mono: "IBM Plex Mono", monospace;

  --s-hero: clamp(3rem, 8vw, 6.5rem);
  --s-xl: clamp(1.7rem, 3vw, 2.5rem);

  --r-sm: 0;
  --r-md: 0;

  --ramen-red: #b5241b;
  --ramen-red-dark: #8f1c15;
  --ramen-cream: #f3ead8;
}

.theme-ramen {
  background: var(--stage);
}

.theme-ramen a:focus-visible,
.theme-ramen .btn:focus-visible {
  outline: 3px solid var(--ramen-red);
  outline-offset: 3px;
}

/* Header: the red banner, laid flat like the landing page on a phone */
.theme-ramen .site-header {
  --fg: var(--ramen-cream);
  --muted: var(--ramen-cream);
  background: var(--ramen-red);
  border-bottom: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.theme-ramen .site-header__inner {
  min-height: 64px;
}

.theme-ramen .site-header__home {
  font-family: "Noto Serif JP", serif;
  font-weight: 900;
  font-size: 1.35rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

@media (max-width: 479px) {
  .theme-ramen .site-header {
    font-size: 0.72rem;
    letter-spacing: 0;
  }

  .theme-ramen .site-header__home {
    font-size: 1.15rem;
    letter-spacing: 0.02em;
  }
}

.theme-ramen .site-header a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.theme-ramen .site-header a:focus-visible {
  outline-color: var(--ramen-cream);
}

/* Headings: Noto Serif JP black */
.theme-ramen h1,
.theme-ramen h2,
.theme-ramen h3 {
  font-family: "Noto Serif JP", serif;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.theme-ramen .projects__intro {
  max-width: none;
  padding-bottom: 28px;
  border-bottom: 3px solid var(--line);
}

/* No projects: the contact rule follows directly, so drop the intro's own */
.theme-ramen .projects__intro:has(+ .projects__contact) {
  padding-bottom: 0;
  border-bottom: 0;
}

.theme-ramen .projects__intro h1 {
  line-height: 0.95;
}

.theme-ramen .projects__intro h1::after {
  content: "." / "";
  color: var(--ramen-red);
}

.theme-ramen .projects__lede {
  max-width: 38ch;
  margin-top: 32px;
  font-size: 1.2rem;
  color: var(--sub);
}

/* Featured: the cover sits in the dark side panel */
.theme-ramen .featured__media,
.theme-ramen .entry__media {
  border: 0;
  padding: clamp(10px, 2vw, 24px);
  background: var(--shot);
}

.theme-ramen .entry__media {
  padding: 10px;
}

.theme-ramen .featured__title,
.theme-ramen .entry__title {
  line-height: 1.1;
}

.theme-ramen .featured__title a:hover,
.theme-ramen .entry__title a:hover {
  color: var(--ramen-red);
}

.theme-ramen .featured__pitch {
  font-size: 1.1rem;
}

/* Meta: the mono menu labels */
.theme-ramen .meta {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.theme-ramen .planet--coral {
  background: var(--ramen-red);
  box-shadow: none;
}

.theme-ramen .planet--neutral {
  background: transparent;
  border: 2px solid var(--fg);
  box-shadow: none;
}

.theme-ramen .planet--off {
  background: #d9cdb6;
  border: 1px solid var(--muted);
}

/* Button: the solid red side link, square, with its arrow */
.theme-ramen .btn {
  min-height: 52px;
  padding: 14px 20px;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
}

.theme-ramen .btn--ghost {
  justify-content: space-between;
  gap: 32px;
  min-width: min(100%, 240px);
  background: var(--ramen-red);
  border: 0;
  color: var(--ramen-cream);
}

.theme-ramen .btn--ghost::after {
  content: "\2192" / "";
}

.theme-ramen .btn--ghost:hover {
  background: var(--ramen-red-dark);
  color: var(--ramen-cream);
}

/* More projects: a heavy rule, then the list split by thin rules */
.theme-ramen .more__title {
  padding-top: 16px;
  border-top: 3px solid var(--line);
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--fg);
}

.theme-ramen .entry:first-child {
  border-top: 0;
}

/* Contact */
.theme-ramen .projects__contact {
  border-top: 3px solid var(--line);
  font-size: 1.05rem;
  color: var(--sub);
}

.theme-ramen .projects__contact .planet {
  top: -8px;
}

.theme-ramen .projects__contact a {
  color: var(--ramen-red);
  font-weight: 500;
  text-decoration: underline;
}

.theme-ramen .projects__contact a:hover {
  color: var(--fg);
}
