/*
Theme Name: Genome Platform Journal
Author: Rowan Vale Studio
Description: A classic WordPress publishing theme with dynamic category navigation, editable agency-style sections, and responsive post cards.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: gp-theme
Domain Path: /languages
*/

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

:root {
  --gp-bg: #fffef5;
  --gp-text: #0f0f0f;
  --gp-dark: #0a0a0a;
  --gp-surface: #f5f7f9;
  --gp-accent: #f15533;
  --gp-accent-soft: #ffa587;
  --gp-white: #ffffff;
  --gp-border: rgba(15, 15, 15, 0.1);
  --gp-muted: rgba(15, 15, 15, 0.62);
  --gp-font-family: "Inter", Arial, sans-serif;
  --gp-mono-font-family: "Fragment Mono", "Courier New", monospace;
  --gp-base-size: 16px;
  --gp-heading-size: 52px;
  --gp-hero-size: 72px;
  --gp-radius: 30px;
  --gp-wrap: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gp-bg);
  color: var(--gp-text);
  font-family: var(--gp-font-family);
  font-size: var(--gp-base-size);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--gp-accent);
}

button,
input,
textarea,
select {
  font: inherit;
}

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

.screen-reader-text:focus,
.gp-screen-reader-text:focus {
  z-index: 100000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  border-radius: 999px;
  background: var(--gp-dark);
  color: var(--gp-bg);
}

.gp-body.gp-nav-open {
  overflow: hidden;
}

.gp-site {
  min-height: 100vh;
  overflow: clip;
}

.gp-wrap {
  width: min(calc(100% - 24px), var(--gp-wrap));
  margin: 0 auto;
}

.gp-header {
  position: sticky;
  top: 12px;
  z-index: 50;
  padding: 12px 0;
}

.gp-header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--gp-border);
  border-radius: 999px;
  background: rgba(255, 254, 245, 0.9);
  box-shadow: 0 18px 48px rgba(15, 15, 15, 0.08);
  backdrop-filter: blur(18px);
}

.gp-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  font-weight: 800;
  line-height: 1;
}

.gp-brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gp-dark);
  color: var(--gp-bg);
  font-family: var(--gp-mono-font-family);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gp-brand-name {
  display: block;
  max-width: 48vw;
  overflow: hidden;
  color: var(--gp-text);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gp-brand a {
  display: inline-flex;
  align-items: center;
}

.gp-brand img {
  width: auto;
  max-width: 150px;
  max-height: 42px;
}

.gp-menu-toggle {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--gp-dark);
  color: var(--gp-bg);
  cursor: pointer;
}

.gp-menu-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.gp-menu-line {
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease, top 180ms ease;
}

.gp-menu-line:nth-child(1) {
  top: 0;
}

.gp-menu-line:nth-child(2) {
  top: 5px;
}

.gp-menu-line:nth-child(3) {
  top: 10px;
}

.gp-nav-open .gp-menu-line:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

.gp-nav-open .gp-menu-line:nth-child(2) {
  opacity: 0;
}

.gp-nav-open .gp-menu-line:nth-child(3) {
  top: 5px;
  transform: rotate(-45deg);
}

.gp-navigation {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  display: none;
  padding: 16px;
  border: 1px solid var(--gp-border);
  border-radius: 28px;
  background: var(--gp-bg);
  box-shadow: 0 24px 64px rgba(15, 15, 15, 0.12);
}

.gp-nav-open .gp-navigation {
  display: block;
}

.gp-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.gp-navigation a {
  display: flex;
  min-height: 44px;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--gp-text);
  font-size: 15px;
  font-weight: 600;
}

.gp-navigation a:hover,
.gp-navigation a:focus-visible,
.gp-navigation .gp-menu-current > a {
  background: rgba(15, 15, 15, 0.06);
  color: var(--gp-text);
}

.gp-hero {
  padding: clamp(24px, 5vw, 64px) 0 clamp(34px, 7vw, 82px);
}

.gp-hero-grid {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.gp-hero-media,
.gp-hero-copy {
  border-radius: var(--gp-radius);
}

.gp-hero-media {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  background: var(--gp-surface);
  isolation: isolate;
}

.gp-hero-media::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, rgba(15, 15, 15, 0) 45%, rgba(15, 15, 15, 0.16));
}

.gp-hero-img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: grayscale(1);
}

.gp-hero-placeholder {
  width: 100%;
  min-height: inherit;
  background:
    radial-gradient(circle at 30% 20%, rgba(241, 85, 51, 0.25), transparent 32%),
    linear-gradient(135deg, var(--gp-surface), rgba(241, 85, 51, 0.18));
}

.gp-hero-copy {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(24px, 6vw, 64px);
  background: var(--gp-dark);
  color: var(--gp-bg);
}

.gp-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 254, 245, 0.86);
  font-family: var(--gp-mono-font-family);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.gp-eyebrow::before {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gp-accent);
  content: "";
}

.gp-hero-title {
  max-width: 720px;
  margin: 0;
  color: var(--gp-bg);
  font-size: clamp(42px, 12vw, var(--gp-hero-size));
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.94;
}

.gp-hero-text {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 254, 245, 0.76);
  font-size: clamp(17px, 2.1vw, 22px);
}

.gp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.gp-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--gp-accent);
  color: var(--gp-bg);
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.gp-button:hover,
.gp-button:focus-visible {
  background: var(--gp-accent-soft);
  color: var(--gp-dark);
}

.gp-pill {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 254, 245, 0.8);
  font-weight: 700;
}

.gp-info-grid {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(44px, 7vw, 86px);
}

.gp-info-card {
  min-height: 220px;
  border-radius: var(--gp-radius);
  padding: clamp(22px, 4vw, 36px);
  background: var(--gp-surface);
}

.gp-section-label {
  display: block;
  margin-bottom: 18px;
  color: var(--gp-accent);
  font-family: var(--gp-mono-font-family);
  font-size: 12px;
  text-transform: uppercase;
}

.gp-info-card p {
  max-width: 720px;
  margin: 0;
  color: var(--gp-text);
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.gp-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(34px, 6vw, 66px);
}

.gp-category-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid var(--gp-border);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--gp-text);
  font-weight: 700;
}

.gp-category-link:hover,
.gp-category-link:focus-visible {
  border-color: var(--gp-accent);
  background: var(--gp-accent);
  color: var(--gp-bg);
}

.gp-section-head {
  display: grid;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.gp-section-title,
.gp-archive-title {
  max-width: 860px;
  margin: 0;
  color: var(--gp-text);
  font-size: clamp(34px, 7vw, var(--gp-heading-size));
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
}

.gp-section-copy,
.gp-archive-copy {
  max-width: 580px;
  margin: 0;
  color: var(--gp-muted);
  font-size: 17px;
}

.gp-post-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-bottom: clamp(48px, 8vw, 92px);
}

.gp-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  border-radius: var(--gp-radius);
  padding: 10px;
  background: var(--gp-surface);
}

.gp-card-media {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 1.18 / 1;
  background: rgba(15, 15, 15, 0.06);
}

.gp-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transform: scale(1.001);
  transition: transform 260ms ease, filter 260ms ease;
}

.gp-card:hover .gp-card-img {
  filter: grayscale(0);
  transform: scale(1.035);
}

.gp-card-placeholder {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(241, 85, 51, 0.2), transparent 58%),
    var(--gp-bg);
}

.gp-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px 8px 10px;
}

.gp-card-date,
.gp-single-meta,
.gp-footer-label {
  color: var(--gp-muted);
  font-family: var(--gp-mono-font-family);
  font-size: 12px;
  text-transform: uppercase;
}

.gp-card-title {
  margin: 0;
  color: var(--gp-text);
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.02;
}

.gp-card-excerpt {
  margin: 0;
  color: var(--gp-muted);
}

.gp-card-link {
  margin-top: auto;
  color: var(--gp-text);
  font-weight: 800;
}

.gp-card-link::after {
  margin-left: 8px;
  content: "->";
}

.gp-empty {
  border-radius: var(--gp-radius);
  padding: 28px;
  background: var(--gp-surface);
  color: var(--gp-muted);
}

.gp-archive {
  padding: clamp(36px, 6vw, 76px) 0 0;
}

.gp-archive-head {
  margin-bottom: 28px;
}

.gp-single-shell {
  padding: clamp(34px, 6vw, 78px) 0 clamp(52px, 8vw, 96px);
}

.gp-single-card {
  max-width: 920px;
  margin: 0 auto;
  border-radius: var(--gp-radius);
  padding: clamp(24px, 6vw, 66px);
  background: var(--gp-surface);
}

.gp-single-title {
  margin: 14px 0 24px;
  color: var(--gp-text);
  font-size: clamp(38px, 8vw, 76px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.96;
}

.gp-entry-content {
  color: rgba(15, 15, 15, 0.78);
  font-size: clamp(17px, 2vw, 19px);
}

.gp-entry-content > *:first-child {
  margin-top: 0;
}

.gp-entry-content > *:last-child {
  margin-bottom: 0;
}

.gp-entry-content a {
  color: var(--gp-accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.gp-entry-content h2,
.gp-entry-content h3,
.gp-entry-content h4 {
  color: var(--gp-text);
  line-height: 1.05;
}

.gp-entry-content h2 {
  margin-top: 1.4em;
  font-size: clamp(30px, 5vw, 48px);
}

.gp-entry-content h3 {
  margin-top: 1.2em;
  font-size: clamp(24px, 4vw, 36px);
}

.gp-entry-content blockquote {
  margin: 32px 0;
  border-left: 5px solid var(--gp-accent);
  padding: 8px 0 8px 22px;
  color: var(--gp-text);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.08;
}

.gp-entry-content img {
  border-radius: 24px;
}

.gp-entry-content pre,
.gp-entry-content code {
  border-radius: 10px;
  background: rgba(15, 15, 15, 0.08);
  font-family: var(--gp-mono-font-family);
}

.gp-entry-content code {
  padding: 0.15em 0.35em;
}

.gp-entry-content pre {
  overflow: auto;
  padding: 18px;
}

.gp-post-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.gp-post-taxonomy a {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 15, 15, 0.06);
  color: var(--gp-text);
  font-size: 13px;
  font-weight: 700;
}

.gp-post-nav {
  display: grid;
  gap: 10px;
  max-width: 920px;
  margin: 18px auto 0;
}

.gp-post-nav a {
  display: block;
  border-radius: 24px;
  padding: 18px;
  background: var(--gp-dark);
  color: var(--gp-bg);
  font-weight: 800;
}

.gp-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: -52px 0 clamp(48px, 8vw, 92px);
}

.gp-pagination a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--gp-dark);
  color: var(--gp-bg);
  font-weight: 800;
}

.gp-footer {
  padding: 26px 0 34px;
  background: var(--gp-dark);
  color: var(--gp-bg);
}

.gp-footer-grid {
  display: grid;
  gap: 24px;
}

.gp-footer-title {
  margin: 8px 0 0;
  color: var(--gp-bg);
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
}

.gp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.gp-footer-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 254, 245, 0.82);
  font-weight: 700;
}

.gp-footer-links a:hover,
.gp-footer-links a:focus-visible {
  background: var(--gp-accent);
  color: var(--gp-bg);
}

.gp-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 32px;
  color: rgba(255, 254, 245, 0.58);
  font-size: 14px;
}

.gp-footer-bottom a {
  color: rgba(255, 254, 245, 0.82);
}

@media (min-width: 640px) {
  .gp-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gp-post-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 810px) {
  .gp-wrap {
    width: min(calc(100% - 80px), var(--gp-wrap));
  }

  .gp-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gp-section-head {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.44fr);
  }

  .gp-footer-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(260px, 0.58fr);
  }
}

@media (min-width: 960px) {
  .gp-header {
    top: 16px;
    padding: 16px 0;
  }

  .gp-header-shell {
    min-height: 72px;
    padding: 10px 12px 10px 22px;
  }

  .gp-menu-toggle {
    display: none;
  }

  .gp-navigation {
    position: static;
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .gp-menu {
    flex-direction: row;
    align-items: center;
    gap: 2px;
  }

  .gp-navigation a {
    min-height: 44px;
    padding: 10px 13px;
  }

  .gp-hero-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    min-height: 640px;
  }

  .gp-hero-media,
  .gp-hero-copy {
    min-height: 640px;
  }

  .gp-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .gp-post-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .gp-card-title {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
