/*
Theme Name: Rahman Ollie Editorial
Theme URI: https://rahmanpauzi.my/
Description: An editorial Ollie child theme for Rahman's Space. Native WordPress blocks, no companion plugins.
Author: Rahman Pauzi
Template: ollie
Version: 3.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: rahman-ollie
*/

:root {
  --rp-rule: rgba(27, 31, 28, .18);
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; }
a { text-underline-offset: .2em; }

/* Header */
.rp-header { position: relative; z-index: 20; }
.rp-wordmark a { color: inherit; text-decoration: none; }
.rp-wordmark a:hover { text-decoration: none; opacity: .65; }

/* Header brand + social/navigation stack */
.rp-header-inner { gap: 24px; }
.rp-brand { min-width: 0; }
.rp-site-tagline {
  margin-bottom: 0;
  font-family: var(--wp--preset--font-family--serif);
  font-style: italic;
  line-height: 1.35;
}
.rp-header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.rp-header-actions .rp-social-menu { margin-top: 0; }
.rp-header-actions .rp-social-menu ul { gap: 8px; justify-content: flex-end; }
.rp-header-actions .rp-social-menu a { width: 28px; height: 28px; }
.rp-header-actions .rp-social-menu svg { width: 14px; height: 14px; }
.rp-header-actions .rp-social-menu a { border-color: var(--rp-rule); }
.rp-main-nav { margin-top: 0; }

@media (max-width: 700px) {
  .rp-header-actions { flex-direction: row; align-items: center; gap: 14px; }
  .rp-header-actions .rp-social-menu { display: none; }
  .rp-site-tagline { font-size: .72rem !important; max-width: 24ch; }
}

/* Editorial hero */
.rp-hero { overflow: hidden; }
.rp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(250px, .65fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: end;
}
.rp-kicker,
.rp-index,
.rp-meta-label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: .73rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.rp-display {
  max-width: 14ch;
  margin: 0;
  text-wrap: balance;
}
.rp-display em {
  color: var(--wp--preset--color--signal);
  font-style: italic;
  font-weight: 400;
}
.rp-side-note {
  border-top: 1px solid var(--rp-rule);
  padding-top: 18px;
}
.rp-side-note p { margin-block: .45rem; }
.rp-side-rule { border-top: 1px solid var(--rp-rule); margin-top: 28px; padding-top: 18px; }

/* A thin running statement */
.rp-marquee {
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid var(--rp-rule);
}
.rp-marquee p {
  width: max-content;
  margin: 0;
  padding-left: 100%;
  font-family: var(--wp--preset--font-family--serif);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-style: italic;
  letter-spacing: -.02em;
  will-change: transform;
  animation: rp-ticker 42s linear infinite;
}
@keyframes rp-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .rp-marquee p {
    padding-left: 0;
    animation: none;
    white-space: normal;
  }
}

/* Section scaffolding */
.rp-section-head {
  display: grid;
  grid-template-columns: 100px minmax(0,1fr);
  gap: 28px;
  align-items: start;
  border-top: 1px solid var(--rp-rule);
  padding-top: 18px;
}
.rp-section-head h2 { margin-top: 0; }

/* Writing */
.rp-writing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(38px, 6vw, 90px);
  align-items: start;
}
.rp-feature-post .wp-block-post-featured-image { margin-bottom: 24px; }
.rp-feature-post .wp-block-post-featured-image img {
  aspect-ratio: 16/10;
  object-fit: cover;
  filter: saturate(.82) contrast(1.02);
}
.rp-feature-post .wp-block-post-title { text-wrap: balance; }
.rp-feature-post .wp-block-post-excerpt { max-width: 56ch; }
.rp-post-list .wp-block-post {
  border-top: 1px solid var(--rp-rule);
  padding-block: 20px;
}
.rp-post-list .wp-block-post:first-child { border-top: 0; padding-top: 0; }
.rp-post-list .wp-block-post-title { margin-block: 5px 7px; }

/* Work notes */
.rp-work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 0 28px;
}
.rp-work-intro { grid-column: 1 / span 5; }
.rp-work-list { grid-column: 7 / -1; }
.rp-work-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  border-top: 1px solid currentColor;
  padding-block: 22px 30px;
}
.rp-work-item h3 { margin: 0; }
.rp-work-item p { margin-bottom: 0; }

/* Resource / archive split */
.rp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 430px;
}
.rp-split > * { padding: clamp(40px, 6vw, 88px); }
.rp-arrow-link a { color: inherit; text-decoration: none; }
.rp-arrow-link a:hover { opacity: .65; text-decoration: none; }

/* Footer */
.rp-footer-title { max-width: 12ch; text-wrap: balance; }
.rp-footer-nav { margin-top: 22px; }
.rp-footer-nav a { color: inherit; }
.rp-footer-smallprint {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: .72rem;
  line-height: 1.5;
  opacity: .52;
  letter-spacing: .01em;
}

/* Buttons are deliberately rare */
.wp-element-button { transition: transform .15s ease, opacity .15s ease; }
.wp-element-button:hover { transform: translateY(-1px); }

@media (max-width: 850px) {
  .rp-hero-grid,
  .rp-writing-grid,
  .rp-split { grid-template-columns: 1fr; }
  .rp-work-grid { display: block; }
  .rp-work-list { margin-top: 56px; }
  .rp-section-head { grid-template-columns: 54px 1fr; }
  .rp-side-note { max-width: 36rem; }
  .rp-display { max-width: 14ch; }
}

@media (max-width: 560px) {
  .rp-section-head { display: block; }
  .rp-section-head .rp-index { margin-bottom: 12px; }
  .rp-work-item { grid-template-columns: 36px 1fr; }
  .rp-split > * { padding: 44px 24px; }
}

/* Desktop hero rebalance: keep the mobile scale, reduce oversized desktop display */
@media (min-width: 851px) {
  .rp-hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, .75fr);
    gap: clamp(46px, 6vw, 88px);
    align-items: center;
  }
  .rp-display {
    font-size: clamp(4rem, 5.7vw, 6rem) !important;
    max-width: 14ch;
  }
  .rp-side-note > p:not(.rp-meta-label),
  .rp-side-rule > p:not(.rp-meta-label) {
    font-size: 1.05rem;
    line-height: 1.55;
  }
}


/* Footer social links sourced from the classic "social-media" menu */
.rp-social-menu { margin-top: 28px; }
.rp-social-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rp-social-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(241,239,233,.32);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  transition: opacity .15s ease, transform .15s ease, border-color .15s ease;
}
.rp-social-menu a:hover {
  opacity: .72;
  transform: translateY(-1px);
  border-color: currentColor;
}
.rp-social-menu svg { width: 18px; height: 18px; fill: currentColor; }
