/*
Theme Name: Rafiz Portfolio
Theme URI: https://rafizsejim.com
Author: Rafiz Sejim
Author URI: https://rafizsejim.com
Description: A refined editorial portfolio theme for Rafiz Sejim, WordPress Product & Support Specialist. Quiet typography, asymmetric grids, and motion designed to never disrupt your reading rhythm.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rafiz-portfolio
*/

/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
  --rf-bg:        #F2EEE7;
  --rf-bg-soft:   #EDE8DF;
  --rf-paper:     #F8F5EF;
  --rf-ink:       #14130F;
  --rf-ink-soft:  #2A2924;
  --rf-mute:      #7A766D;
  --rf-line:      #1413100D;
  --rf-line-2:    #14131017;
  --rf-accent:    #B5523B;
  --rf-accent-2:  #C8825A;
  --rf-warn:      #B58A2B;

  --rf-radius:    14px;
  --rf-radius-lg: 28px;

  --rf-font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rf-font-serif:"Instrument Serif", "Times New Roman", Georgia, serif;
  --rf-font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --rf-ease:      cubic-bezier(.2,.7,.2,1);
  --rf-ease-out:  cubic-bezier(.16,1,.3,1);

  --rf-container: 1240px;
  --rf-gutter:    clamp(20px, 4vw, 48px);

  --rf-h1: clamp(2.25rem, 4.6vw, 3.75rem);
  --rf-h2: clamp(1.65rem, 2.6vw, 2.25rem);
  --rf-h3: clamp(1.15rem, 1.4vw, 1.35rem);
  --rf-body: 16px;
  --rf-small: 13px;
  --rf-tiny: 11px;
}

/* ------------------------------------------------------------------
   Reset & base
------------------------------------------------------------------ */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rf-bg);
  color: var(--rf-ink);
  font-family: var(--rf-font-sans);
  font-size: var(--rf-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01","cv11";
  /* `clip` — not `hidden` — so it does not create a scrolling container
     and break position:sticky on descendants like the stack cards. */
  overflow-x: clip;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--rf-line); margin: 0; }

::selection { background: var(--rf-ink); color: var(--rf-paper); }

code {
  font-family: var(--rf-font-mono);
  font-size: .92em;
  background: var(--rf-bg-soft);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--rf-ink-soft);
}

/* Screen-reader-only helper (WP standard) */
.screen-reader-text {
  border: 0;
  clip: rect(1px,1px,1px,1px);
  -webkit-clip-path: inset(50%);
          clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--rf-paper);
  clip: auto !important;
  -webkit-clip-path: none;
          clip-path: none;
  color: var(--rf-ink);
  display: block;
  font-size: 13px;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 12px 18px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
  border-radius: 999px;
}

/* Subtle paper texture — pure CSS, no asset cost */
body::before {
  content:"";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, #FFF6E8 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 90%, #ECE5D8 0%, transparent 60%);
  opacity: .6;
  z-index: 0;
}

/* ------------------------------------------------------------------
   Layout helpers
------------------------------------------------------------------ */
.rf-container {
  max-width: var(--rf-container);
  margin: 0 auto;
  padding-inline: var(--rf-gutter);
  position: relative;
  z-index: 1;
}
.rf-section {
  padding-block: clamp(72px, 9vw, 140px);
  position: relative;
  z-index: 1;
}
.rf-section--tight { padding-block: clamp(56px, 7vw, 96px); }
.rf-rule {
  height: 1px; background: var(--rf-line);
  margin: 0;
}

/* Eyebrow / section label */
.rf-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--rf-tiny);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--rf-mute);
  font-weight: 500;
}
.rf-eyebrow::before {
  content: ""; width: 28px; height: 1px; background: currentColor; opacity: .5;
}
.rf-eyebrow--center::after {
  content: ""; width: 28px; height: 1px; background: currentColor; opacity: .5;
}

/* Section heading */
.rf-section-head {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 72px);
}
.rf-section-head h2 {
  font-size: var(--rf-h2);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 14px 0 0;
}
.rf-section-head h2 em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--rf-accent);
}
.rf-section-head__lede {
  color: var(--rf-ink-soft);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 56ch;
}

/* ------------------------------------------------------------------
   Header / navigation
------------------------------------------------------------------ */
.rf-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  padding: 18px var(--rf-gutter);
  display: flex; align-items: center; justify-content: space-between;
  transition: backdrop-filter .3s var(--rf-ease), background .3s var(--rf-ease), padding .3s var(--rf-ease);
}
.rf-header.is-stuck {
  background: color-mix(in srgb, var(--rf-bg) 75%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  padding-block: 12px;
  border-bottom: 1px solid var(--rf-line);
}
.rf-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.rf-brand__mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--rf-ink); color: var(--rf-paper);
  display: grid; place-items: center;
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 16px;
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
}
.rf-brand__mark::after{
  content:""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, #ffffff20, transparent 60%);
}
.rf-brand small { color: var(--rf-mute); font-weight: 400; }

.rf-nav { display: flex; align-items: center; gap: 4px; }
.rf-nav__list {
  display: flex; align-items: center; gap: 2px;
  list-style: none; margin: 0; padding: 6px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 999px;
}
.rf-nav__list a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px;
  color: var(--rf-ink-soft);
  transition: background .25s var(--rf-ease), color .25s var(--rf-ease);
}
.rf-nav__list a:hover { color: var(--rf-ink); background: var(--rf-bg-soft); }
.rf-nav__list a.is-active { background: var(--rf-ink); color: var(--rf-paper); }

.rf-nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rf-ink); color: var(--rf-paper);
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  transition: transform .25s var(--rf-ease), background .25s var(--rf-ease);
}
.rf-nav__cta:hover { background: var(--rf-accent); transform: translateY(-1px); }
.rf-nav__cta .rf-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #79D27A;
  box-shadow: 0 0 0 0 #79D27A88;
  animation: rfPulse 2s var(--rf-ease) infinite;
}
@keyframes rfPulse {
  0% { box-shadow: 0 0 0 0 #79D27A88; }
  70%{ box-shadow: 0 0 0 8px #79D27A00; }
  100%{ box-shadow: 0 0 0 0 #79D27A00; }
}

.rf-burger {
  display: none;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--rf-line-2); background: var(--rf-paper);
  align-items: center; justify-content: center;
}
.rf-burger span {
  position: relative; width: 16px; height: 1px;
  background: var(--rf-ink);
}
.rf-burger span::before, .rf-burger span::after {
  content:""; position: absolute; left: 0; width: 16px; height: 1px;
  background: var(--rf-ink);
  transition: transform .3s var(--rf-ease);
}
.rf-burger span::before { top: -5px; }
.rf-burger span::after  { top: 5px; }
.rf-burger.is-open span { background: transparent; }
.rf-burger.is-open span::before { transform: translateY(5px) rotate(45deg); }
.rf-burger.is-open span::after  { transform: translateY(-5px) rotate(-45deg); }

/* Mobile drawer */
.rf-drawer {
  position: fixed; inset: 0;
  background: var(--rf-bg);
  z-index: 49;
  padding: 100px var(--rf-gutter) 40px;
  transform: translateY(-100%);
  transition: transform .5s var(--rf-ease-out);
  display: flex; flex-direction: column; gap: 24px;
}
.rf-drawer.is-open { transform: translateY(0); }
.rf-drawer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.rf-drawer a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 0;
  font-size: 24px;
  border-bottom: 1px solid var(--rf-line);
  letter-spacing: -0.01em;
}
.rf-drawer a small { color: var(--rf-mute); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; }

/* Scroll progress */
.rf-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 60;
  pointer-events: none;
}
.rf-progress__bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--rf-accent), var(--rf-accent-2));
  transform-origin: left;
}

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------ */
.rf-hero {
  padding-top: 140px;
  padding-bottom: 0;
  position: relative;
}
.rf-hero__meta {
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  font-size: var(--rf-tiny);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rf-mute);
  border-top: 1px solid var(--rf-line);
  border-bottom: 1px solid var(--rf-line);
  padding-block: 16px;
  margin-bottom: clamp(36px, 6vw, 80px);
  align-items: center;
}
.rf-hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.rf-hero__meta .rf-dot { width: 6px; height: 6px; border-radius: 50%; background: #79D27A; }

.rf-hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}
.rf-hero__lead {
  position: relative;
}
.rf-hero__eyebrow { margin-bottom: 28px; }
.rf-hero h1 {
  font-size: var(--rf-h1);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}
.rf-hero h1 em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--rf-accent);
}
.rf-hero h1 .rf-line { display: block; overflow: hidden; }
.rf-hero h1 .rf-line > span { display: inline-block; transform: translateY(110%); }
.rf-hero__lede {
  font-size: 1.0625rem;
  color: var(--rf-ink-soft);
  max-width: 48ch;
  line-height: 1.7;
  margin: 0 0 36px;
}
.rf-hero__cta {
  display: flex; flex-wrap: wrap; gap: 12px;
}

/* Buttons */
.rf-btn {
  --bg: var(--rf-ink);
  --fg: var(--rf-paper);
  --br: var(--rf-ink);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--br);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .35s var(--rf-ease-out), background .35s var(--rf-ease), color .35s var(--rf-ease), border-color .35s var(--rf-ease);
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.rf-btn:hover { transform: translateY(-2px); }
.rf-btn--ghost {
  --bg: transparent;
  --fg: var(--rf-ink);
  --br: var(--rf-line-2);
}
.rf-btn--ghost:hover { --br: var(--rf-ink); --bg: var(--rf-paper); }
.rf-btn .rf-arrow {
  width: 14px; height: 14px;
  transition: transform .4s var(--rf-ease-out);
}
.rf-btn:hover .rf-arrow { transform: translate(3px,-3px); }

/* Hero figure — transparent PNG sitting directly on the section.
   Right-aligned so it pairs naturally with the headline column.
   3D tilt on cursor + a slow-spinning orbit text for editorial flavor. */
.rf-hero__media {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4/5;
  margin-left: auto;
  margin-right: 0;
  perspective: 1400px;
  perspective-origin: 50% 55%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}
.rf-hero__figure {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1;
}
.rf-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 22px 28px #1413101a);
  transform: rotateY(var(--tilt-x)) rotateX(var(--tilt-y));
  transform-style: preserve-3d;
  transition: filter .5s var(--rf-ease);
  will-change: transform;
}
.rf-hero__media:hover img {
  filter: drop-shadow(0 28px 38px #14131022);
}

/* Slow-spinning orbit text badge */
.rf-orbit {
  position: absolute;
  bottom: -6%;
  left: -16%;
  width: clamp(140px, 16vw, 180px);
  aspect-ratio: 1;
  z-index: 2;
  pointer-events: none;
  color: var(--rf-ink);
}
.rf-orbit svg {
  width: 100%;
  height: 100%;
  animation: rfOrbitSpin 28s linear infinite;
}
.rf-orbit__text {
  font-family: var(--rf-font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  fill: currentColor;
  text-transform: uppercase;
}
.rf-orbit__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--rf-accent);
  transform: rotate(-30deg);
  transition: transform .4s var(--rf-ease-out);
}
.rf-orbit:hover .rf-orbit__center { transform: rotate(0deg) scale(1.1); }
@keyframes rfOrbitSpin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rf-orbit svg { animation: none; }
}

/* Tiny corner ornament — subtle compass mark top-right */
.rf-hero__ornament {
  position: absolute;
  top: 12px;
  right: 4px;
  width: 22px;
  height: 22px;
  color: var(--rf-mute);
  opacity: .55;
  z-index: 2;
  pointer-events: none;
  animation: rfOrnSpin 40s linear infinite;
}
@keyframes rfOrnSpin {
  to { transform: rotate(360deg); }
}

/* Floating sticker badges over hero photo */
.rf-sticker {
  position: absolute;
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 12px 30px -12px #14131022;
}
.rf-sticker--top    { top: 24px; left: -28px; transform: rotate(-4deg); }
.rf-sticker--right  { top: 38%; right: -32px; transform: rotate(3deg); }
.rf-sticker--bottom { bottom: 60px; left: -36px; transform: rotate(2deg); background: var(--rf-ink); color: var(--rf-paper); border-color: var(--rf-ink); }
.rf-sticker em { font-family: var(--rf-font-serif); font-style: italic; }

/* Hero strip stats */
.rf-hero__strip {
  margin-top: clamp(36px, 6vw, 80px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rf-line);
  border-bottom: 1px solid var(--rf-line);
}
.rf-hero__strip > div {
  padding: 22px clamp(14px, 2vw, 24px);
  border-right: 1px solid var(--rf-line);
  display: flex;
  flex-direction: column;
}
.rf-hero__strip > div:last-child { border-right: 0; }
.rf-hero__strip dt {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--rf-mute); margin: 0 0 12px;
}
.rf-hero__strip dd {
  margin: auto 0 0;            /* push value to the bottom of the cell */
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum" 1;
  line-height: 1.05;
}
.rf-hero__strip dd em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: .85em;
  color: var(--rf-accent);
}
/* Products cell — stacked list, baseline-aligned with big numbers */
.rf-hero__strip-products {
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(.95rem, 1.05vw, 1.05rem) !important;
  letter-spacing: -0.005em !important;
  line-height: 1.35;
  font-weight: 500;
}
.rf-hero__strip-products span:first-child {
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--rf-accent);
  font-size: 1.15em;
}
.rf-moon { opacity: .85; }

/* Marquee */
.rf-marquee {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rf-line);
  padding-block: 22px;
  background: var(--rf-paper);
}
.rf-marquee__track {
  display: flex; gap: 60px;
  width: max-content;
  animation: rfMarquee 40s linear infinite;
}
.rf-marquee:hover .rf-marquee__track { animation-play-state: paused; }
.rf-marquee__item {
  display: inline-flex; align-items: center; gap: 22px;
  font-size: 14px;
  color: var(--rf-ink-soft);
  letter-spacing: -0.005em;
}
.rf-marquee__item::after {
  content:""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--rf-accent);
  display: inline-block;
}
@keyframes rfMarquee {
  to { transform: translateX(-50%); }
}

/* ------------------------------------------------------------------
   Intro / Now block
------------------------------------------------------------------ */
.rf-intro {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.rf-intro__panel {
  position: sticky; top: 110px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius-lg);
  padding: 28px 28px 22px;
  box-shadow: 0 24px 48px -32px #14131022;
  display: flex; flex-direction: column; gap: 14px;
}
.rf-intro__panel-title {
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -0.005em;
  color: var(--rf-ink);
  margin: 0 0 4px;
}
.rf-now {
  list-style: none; padding: 0; margin: 4px 0 0;
  display: grid; gap: 0;
}
.rf-now li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--rf-line);
  align-items: baseline;
}
.rf-now li:first-child { border-top: 0; }
.rf-now__key {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rf-mute);
  font-weight: 500;
}
.rf-now__val {
  font-size: 14.5px;
  color: var(--rf-ink);
  line-height: 1.5;
}
.rf-now__val em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  color: var(--rf-accent);
}
.rf-now__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #79D27A;
  box-shadow: 0 0 0 0 #79D27A88;
  animation: rfPulse 2s var(--rf-ease) infinite;
  display: inline-block;
}
.rf-intro__sig {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--rf-line);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rf-mute);
}
.rf-intro__copy p {
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--rf-ink);
  margin: 0 0 24px;
  font-weight: 400;
}
.rf-intro__copy p em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  color: var(--rf-accent);
}
.rf-intro__copy p:first-child::first-letter {
  font-family: var(--rf-font-serif);
  font-size: 3.2em;
  font-style: italic;
  float: left;
  line-height: .9;
  margin: .04em .12em 0 -.02em;
  color: var(--rf-accent);
}

/* ------------------------------------------------------------------
   Expertise grid
------------------------------------------------------------------ */
.rf-expertise {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--rf-line-2);
  border: 1px solid var(--rf-line-2);
  border-radius: var(--rf-radius-lg);
  overflow: hidden;
}
.rf-card {
  background: var(--rf-paper);
  padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  transition: background .4s var(--rf-ease);
}
.rf-card:hover { background: var(--rf-bg-soft); }
.rf-card__num {
  font-family: var(--rf-font-mono);
  font-size: 11px;
  color: var(--rf-mute);
  letter-spacing: .15em;
}
.rf-card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.rf-card p {
  margin: 0;
  color: var(--rf-ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
}
.rf-card ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto;
}
.rf-card ul li {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--rf-mute);
  padding: 5px 10px;
  border: 1px solid var(--rf-line-2);
  border-radius: 999px;
  background: var(--rf-paper);
}
.rf-card--half  { grid-column: span 6; }
.rf-card--third { grid-column: span 4; }
.rf-card--full  { grid-column: span 12; }
.rf-card--full h3 { font-size: 1.25rem; }
.rf-card--full p  { max-width: 70ch; }

/* Featured arc card with glyph */
.rf-card__glyph {
  position: absolute; top: 24px; right: 24px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--rf-bg-soft);
  display: grid; place-items: center;
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--rf-accent);
  transition: transform .5s var(--rf-ease-out);
}
.rf-card:hover .rf-card__glyph { transform: rotate(20deg) scale(1.1); }

/* ------------------------------------------------------------------
   Stack cards. Each card lives inside its own wrapper; ScrollTrigger
   pins each wrapper individually with pinSpacing:false, while the
   inner card scales + tilts back in 3D as the next one lifts in.
------------------------------------------------------------------ */
.rf-stack {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: clamp(48px, 7vh, 96px);
}
.rf-stack__wrap {
  width: 100%;
  perspective: 1200px;
  margin-bottom: 24px;
}
.rf-stack__wrap:last-child { margin-bottom: 0; }
.rf-stack__card {
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius-lg);
  padding: clamp(36px, 4vw, 56px) clamp(32px, 4vw, 60px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: clamp(440px, 60vh, 600px);
  box-shadow: 0 28px 56px -32px #14131026;
  transform-origin: top center;
  transform-style: preserve-3d;
  will-change: transform;
}
.rf-stack__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rf-stack__num {
  font-family: var(--rf-font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--rf-mute);
  text-transform: uppercase;
}
.rf-stack__glyph {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--rf-bg-soft);
  display: grid; place-items: center;
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--rf-accent);
  transition: transform .5s var(--rf-ease-out);
}
.rf-stack__card:hover .rf-stack__glyph { transform: rotate(20deg) scale(1.08); }
.rf-stack__card h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 6px 0 0;
}
.rf-stack__card p {
  font-size: clamp(1rem, 1.15vw, 1.0625rem);
  line-height: 1.7;
  color: var(--rf-ink-soft);
  margin: 0;
  max-width: 60ch;
}
.rf-stack__tags {
  list-style: none; padding: 0; margin: auto 0 0;
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 8px;
}
.rf-stack__tags li {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--rf-mute);
  padding: 5px 10px;
  border: 1px solid var(--rf-line-2);
  border-radius: 999px;
  background: var(--rf-paper);
}
.rf-stack__card--last { background: var(--rf-ink); color: var(--rf-paper); border-color: var(--rf-ink); }
.rf-stack__card--last .rf-stack__num { color: #C7BFA9; }
.rf-stack__card--last h3 { color: var(--rf-paper); }
.rf-stack__card--last p  { color: #C7BFA9; }
.rf-stack__card--last .rf-stack__glyph { background: #ffffff14; color: var(--rf-accent-2); }
.rf-stack__card--last .rf-stack__tags li { color: #C7BFA9; border-color: #ffffff20; background: transparent; }

@media (max-width: 760px) {
  .rf-stack__wrap { perspective: none; }
  .rf-stack__card {
    min-height: 0;
    transform: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rf-stack__card { transform: none !important; }
}

/* ------------------------------------------------------------------
   Hero atmosphere — a soft warm glow + a single quiet arc.
   No logos, no chips. Just light and a gesture.
------------------------------------------------------------------ */
.rf-hero__glow {
  position: absolute;
  inset: 4% -6% 18% -6%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 65% at 52% 38%, #FFE0B560 0%, #FFE0B520 35%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 80%, #F2DEC130 0%, transparent 70%);
  filter: blur(2px);
  border-radius: 50%;
}
/* Constellation above the head — small nod to the night-owl tagline */
.rf-constellation {
  position: absolute;
  top: 1%;
  left: 4%;
  right: 4%;
  width: 92%;
  height: 18%;
  z-index: 2;
  pointer-events: none;
  color: var(--rf-accent);
}
.rf-cl-line {
  opacity: .55;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: rfClDraw 1.2s var(--rf-ease-out) forwards;
}
.rf-cl-line:nth-of-type(1) { animation-delay: .35s; }
.rf-cl-line:nth-of-type(2) { animation-delay: .55s; }
.rf-cl-line:nth-of-type(3) { animation-delay: .75s; }
.rf-cl-line:nth-of-type(4) { animation-delay: .95s; }
.rf-cl-star {
  opacity: 0;
  animation:
    rfClFadeIn .5s var(--rf-ease-out) forwards,
    rfClTwinkle 4.4s ease-in-out infinite;
}
.rf-cl-star--s { opacity: 0; }
.rf-cl-star:nth-of-type(5)  { animation-delay: .25s, 1.2s; }
.rf-cl-star:nth-of-type(6)  { animation-delay: .45s, 0.0s; }
.rf-cl-star:nth-of-type(7)  { animation-delay: .65s, 2.0s; }
.rf-cl-star:nth-of-type(8)  { animation-delay: .85s, 0.6s; }
.rf-cl-star:nth-of-type(9)  { animation-delay: 1.05s, 1.6s; }
@keyframes rfClDraw   { to { stroke-dashoffset: 0; } }
@keyframes rfClFadeIn { to { opacity: .9; } }
@keyframes rfClTwinkle {
  0%, 100% { opacity: .9; }
  50%      { opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
  .rf-cl-line, .rf-cl-star { animation: none; opacity: .7; stroke-dashoffset: 0; }
}

/* Editorial museum-label below the constellation */
.rf-hero__caption {
  position: absolute;
  top: 19%;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  animation: rfCaptionIn .8s var(--rf-ease-out) 1.4s forwards;
}
.rf-hero__caption-rule {
  width: 18px; height: 1px;
  background: var(--rf-mute);
  opacity: .6;
}
.rf-hero__caption em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--rf-accent);
  letter-spacing: -0.005em;
}
.rf-hero__caption small {
  font-family: var(--rf-font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rf-mute);
}
@keyframes rfCaptionIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .rf-hero__caption { opacity: 1; animation: none; }
}
@media (max-width: 600px) {
  .rf-hero__caption { display: none; }
  .rf-constellation { height: 14%; }
}

/* ------------------------------------------------------------------
   Featured project
------------------------------------------------------------------ */
.rf-feature {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.rf-feature__visual {
  position: relative;
  /* No fixed aspect-ratio — let the image dictate height so it fills
     the wrapper edge-to-edge with no gaps. */
  border-radius: var(--rf-radius-lg);
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  overflow: hidden;
  isolation: isolate;
  margin: 0;
}

/* Real product screenshot frame — natural-height, fills container width */
.rf-shot {
  position: relative;
  z-index: 1;
  background: var(--rf-paper);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: inherit;
}
.rf-shot__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rf-line);
  background: var(--rf-paper);
}
.rf-shot__bar i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rf-line-2);
}
.rf-shot__bar i:first-child { background: var(--rf-accent); }
.rf-shot__bar span {
  margin-left: auto;
  font-family: var(--rf-font-mono);
  font-size: 10px;
  color: var(--rf-mute);
}
.rf-shot img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--rf-bg-soft);
}
.rf-mock {
  position: absolute;
  inset: 24px;
  border-radius: 16px;
  background: var(--rf-bg);
  border: 1px solid var(--rf-line);
  box-shadow: 0 30px 60px -30px #14131033;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.rf-mock__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rf-line);
  background: var(--rf-paper);
}
.rf-mock__bar i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rf-line-2);
}
.rf-mock__bar i:first-child { background: var(--rf-accent); }
.rf-mock__bar span {
  margin-left: auto;
  font-family: var(--rf-font-mono);
  font-size: 10px;
  color: var(--rf-mute);
}

/* Search header */
.rf-mock__head {
  padding: 14px 16px 12px;
  background: var(--rf-paper);
  border-bottom: 1px solid var(--rf-line);
}
.rf-mock__head h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--rf-ink);
}
.rf-mock__searchrow {
  display: grid;
  grid-template-columns: 1.6fr .9fr .9fr auto;
  gap: 6px;
}
.rf-mock__input,
.rf-mock__select {
  height: 28px;
  display: flex; align-items: center;
  padding: 0 10px;
  border: 1px solid var(--rf-line-2);
  border-radius: 6px;
  background: var(--rf-bg);
  font-size: 10px;
  color: var(--rf-mute);
}
.rf-mock__select {
  position: relative;
  padding-right: 18px;
}
.rf-mock__select::after {
  content: "▾";
  position: absolute;
  right: 8px;
  font-size: 8px;
  color: var(--rf-mute);
}
.rf-mock__btn {
  height: 28px; display: grid; place-items: center;
  padding: 0 14px;
  background: linear-gradient(135deg, #7B6CF6, #5C4ED9);
  color: white;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

/* Sub-bar */
.rf-mock__sub {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 16px;
  background: var(--rf-bg-soft);
  border-bottom: 1px solid var(--rf-line);
  font-size: 9.5px;
  letter-spacing: .04em;
  color: var(--rf-mute);
}
.rf-mock__sub strong { color: var(--rf-ink); font-weight: 500; }

/* Cards grid */
.rf-mock__grid {
  flex: 1;
  padding: 12px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  align-content: start;
  overflow: hidden;
}
.rf-mock__card {
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 8px;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform .5s var(--rf-ease-out);
  min-height: 110px;
}
.rf-mock__card-img {
  position: relative;
  height: 50px;
  background: linear-gradient(135deg, #C8E2A4, #6CA85D);
}
.rf-mock__card-img--t1 { background: linear-gradient(135deg, #B6D89B 0%, #5C8A47 100%); }
.rf-mock__card-img--t2 { background: linear-gradient(135deg, #C9D5E8 0%, #4A6B9A 100%); }
.rf-mock__card-img--t3 { background: linear-gradient(135deg, #FFE2B3 0%, #B58A2B 100%); }
.rf-mock__card-img--t4 { background: linear-gradient(135deg, #D6C2A0 0%, #6B5638 100%); }
.rf-mock__card-img--t5 { background: linear-gradient(135deg, #C9E0CD 0%, #4D7A5A 100%); }
.rf-mock__card-img--t6 { background: linear-gradient(135deg, #B7C3CC 0%, #4A5C68 100%); }

/* Status pill on the image */
.rf-mock__pill {
  position: absolute;
  top: 5px; right: 5px;
  background: var(--rf-ink);
  color: var(--rf-paper);
  font-size: 7.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 500;
}
.rf-mock__pill--newest  { background: #14130FCC; color: #fff; }
.rf-mock__pill--pending { background: #D6BB6BCC; color: #1A1A0F; }

.rf-mock__card-meta {
  padding: 6px 8px 2px;
  display: flex; flex-direction: column; gap: 2px;
}
.rf-mock__card-name {
  font-size: 10px;
  color: var(--rf-ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rf-mock__card-price {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--rf-ink);
  letter-spacing: -0.005em;
}

/* Three small stat pellets */
.rf-mock__card-stats {
  margin-top: auto;
  padding: 4px 8px 7px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  font-family: var(--rf-font-mono);
  font-size: 7.5px;
  color: var(--rf-mute);
}
.rf-mock__card-stats span {
  display: flex; flex-direction: column; gap: 1px;
}
.rf-mock__card-stats b {
  color: var(--rf-ink);
  font-weight: 500;
  font-size: 9px;
  font-family: var(--rf-font-sans);
  letter-spacing: 0;
}
.rf-mock__card-stats i {
  color: #6CA85D;
  font-style: normal;
  font-size: 7px;
}

.rf-feature__content h3 {
  font-size: var(--rf-h2);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 12px 0 16px;
}
.rf-feature__content h3 em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  color: var(--rf-accent);
}
.rf-feature__content p { color: var(--rf-ink-soft); font-size: 16px; line-height: 1.7; margin: 0 0 24px; }
.rf-feature__bullets { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.rf-feature__bullets li {
  display: grid; grid-template-columns: 28px 1fr; gap: 6px;
  align-items: baseline;
  font-size: 14.5px;
  color: var(--rf-ink-soft);
  border-top: 1px solid var(--rf-line);
  padding-top: 12px;
}
.rf-feature__bullets li:first-child { border-top: 0; padding-top: 0; }
.rf-feature__bullets li::before {
  content: counter(rfb, decimal-leading-zero);
  counter-increment: rfb;
  font-family: var(--rf-font-mono);
  font-size: 10px;
  color: var(--rf-accent);
  letter-spacing: .1em;
}
.rf-feature__bullets { counter-reset: rfb; }

/* ------------------------------------------------------------------
   Selected work — list with hover image reveal
------------------------------------------------------------------ */
.rf-work {
  border-top: 1px solid var(--rf-line);
}
.rf-work__row {
  display: grid;
  grid-template-columns: 60px 2fr 1.3fr 1fr 28px;
  gap: clamp(14px, 2.5vw, 32px);
  align-items: center;
  padding: 28px 6px;
  border-bottom: 1px solid var(--rf-line);
  position: relative;
  transition: padding .35s var(--rf-ease), color .35s var(--rf-ease);
}
.rf-work__row:hover { padding-inline: 18px; }
.rf-work__row:hover .rf-work__title { color: var(--rf-accent); }
.rf-work__row:hover .rf-work__arrow svg { transform: translate(4px,-4px); }
.rf-work__num {
  font-family: var(--rf-font-mono);
  font-size: 11px;
  color: var(--rf-mute);
  letter-spacing: .15em;
}
.rf-work__title {
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  transition: color .35s var(--rf-ease);
}
.rf-work__title em { font-family: var(--rf-font-serif); font-style: italic; color: var(--rf-accent); }
.rf-work__role {
  color: var(--rf-mute);
  font-size: 13.5px;
}
.rf-work__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rf-work__tags span {
  font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--rf-mute);
  padding: 4px 10px;
  border: 1px solid var(--rf-line-2);
  border-radius: 999px;
}
.rf-work__arrow svg {
  width: 16px; height: 16px;
  transition: transform .35s var(--rf-ease-out);
}

/* Hover-following preview */
.rf-preview {
  position: fixed;
  pointer-events: none;
  width: 280px; height: 200px;
  border-radius: 14px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  box-shadow: 0 30px 60px -20px #14131033;
  overflow: hidden;
  z-index: 40;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.94);
  transition: opacity .35s var(--rf-ease), transform .35s var(--rf-ease-out);
}
.rf-preview.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.rf-preview__inner { width: 100%; height: 100%; position: relative; }
.rf-preview__panel {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 22px;
  background: linear-gradient(135deg, var(--rf-paper), var(--rf-bg-soft));
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--rf-accent);
  text-align: center;
  opacity: 0;
  transition: opacity .25s var(--rf-ease);
}
.rf-preview__panel.is-active { opacity: 1; }

/* ------------------------------------------------------------------
   Experience timeline
------------------------------------------------------------------ */
.rf-timeline {
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: clamp(28px, 4vw, 64px);
}
.rf-timeline__sticky { position: sticky; top: 110px; align-self: start; }
.rf-timeline__list { display: grid; gap: 0; }
.rf-timeline__item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rf-line);
}
.rf-timeline__item:first-child { border-top: 0; padding-top: 0; }
.rf-timeline__year {
  font-family: var(--rf-font-mono);
  font-size: 11px;
  color: var(--rf-mute);
  letter-spacing: .14em;
  padding-top: 6px;
}
.rf-timeline__role {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.rf-timeline__co {
  font-family: var(--rf-font-serif);
  font-style: italic;
  color: var(--rf-accent);
  font-size: 1rem;
  margin: 0 0 14px;
}
.rf-timeline__points {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 8px;
}
.rf-timeline__points li {
  position: relative; padding-left: 22px;
  color: var(--rf-ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
}
.rf-timeline__points li::before {
  content:""; position: absolute; left: 0; top: .7em;
  width: 12px; height: 1px;
  background: var(--rf-accent);
}

/* ------------------------------------------------------------------
   Marquee secondary (tools / form builders)
------------------------------------------------------------------ */
.rf-band {
  background: var(--rf-ink);
  color: var(--rf-paper);
  padding-block: clamp(48px, 7vw, 96px);
  position: relative;
  overflow: hidden;
}
.rf-band .rf-eyebrow { color: #C7BFA9; }
.rf-band h2 { color: var(--rf-paper); }
.rf-band h2 em { color: var(--rf-accent-2); }
.rf-band__quote {
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.35;
  max-width: 24ch;
  color: var(--rf-paper);
  margin: 0 0 16px;
  letter-spacing: -0.005em;
}
.rf-band__quote::before { content:"“"; color: var(--rf-accent-2); margin-right: 4px; }
.rf-band__quote::after  { content:"”"; color: var(--rf-accent-2); margin-left: 4px; }
.rf-band__cite { color: #C7BFA9; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }

.rf-band__cols {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.rf-band__metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.rf-band__metric {
  border-top: 1px solid #FFFFFF1A;
  padding-top: 18px;
}
.rf-band__metric dt {
  color: #C7BFA9;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.rf-band__metric dd {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--rf-paper);
}
.rf-band__metric dd em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  color: var(--rf-accent-2);
}

/* ------------------------------------------------------------------
   Writing / Blog
------------------------------------------------------------------ */
.rf-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}
.rf-post-card {
  display: flex; flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius);
  transition: transform .4s var(--rf-ease-out), box-shadow .4s var(--rf-ease);
  position: relative;
}
.rf-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -28px #14131022;
}
.rf-post-card__thumb {
  aspect-ratio: 16/10;
  border-radius: 10px;
  background: var(--rf-bg-soft);
  overflow: hidden;
  position: relative;
}
.rf-post-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--rf-ease-out);
}
.rf-post-card:hover .rf-post-card__thumb img { transform: scale(1.04); }
.rf-post-card__thumb--placeholder {
  background:
    radial-gradient(circle at 30% 30%, #FFE2B380, transparent 50%),
    radial-gradient(circle at 70% 70%, #FFD7C980, transparent 50%),
    var(--rf-bg-soft);
  display: grid; place-items: center;
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--rf-accent);
}
.rf-post-card__meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--rf-mute);
}
.rf-post-card__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.rf-post-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.rf-post-card p {
  margin: 0;
  color: var(--rf-ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
}
.rf-post-card__more {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--rf-ink);
  border-top: 1px solid var(--rf-line);
  padding-top: 16px;
}
.rf-post-card__more svg { width: 12px; height: 12px; transition: transform .3s var(--rf-ease-out); }
.rf-post-card:hover .rf-post-card__more svg { transform: translate(3px,-3px); }

/* ------------------------------------------------------------------
   Contact
------------------------------------------------------------------ */
.rf-contact {
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius-lg);
  padding: clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  position: relative;
  overflow: hidden;
}
.rf-contact::before {
  content:"";
  position: absolute; right: -10%; top: -30%;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFE2B340, transparent 60%);
  pointer-events: none;
}
.rf-contact h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 14px 0 28px;
}
.rf-contact h2 em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  color: var(--rf-accent);
}
.rf-contact a.rf-mail {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--rf-ink);
  border-bottom: 1px solid var(--rf-line-2);
  padding-bottom: 6px;
  transition: color .3s var(--rf-ease), border-color .3s var(--rf-ease);
}
.rf-contact a.rf-mail:hover { color: var(--rf-accent); border-color: var(--rf-accent); }
.rf-contact__details {
  display: grid; gap: 14px;
  font-size: 14px;
}
.rf-contact__details dt {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--rf-mute); margin-bottom: 4px;
}
.rf-contact__details dd { margin: 0; color: var(--rf-ink); }
.rf-contact__details a:hover { color: var(--rf-accent); }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.rf-footer {
  padding: 32px var(--rf-gutter) 28px;
  border-top: 1px solid var(--rf-line);
  margin-top: clamp(60px, 8vw, 120px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  color: var(--rf-mute);
  font-size: 12px;
  letter-spacing: .04em;
  position: relative;
  z-index: 1;
}
.rf-footer__socials { display: flex; gap: 6px; justify-self: end; }
.rf-footer__socials a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--rf-line-2);
  display: grid; place-items: center;
  transition: background .25s var(--rf-ease), color .25s var(--rf-ease);
  color: var(--rf-ink-soft);
}
.rf-footer__socials a:hover { background: var(--rf-ink); color: var(--rf-paper); }
.rf-footer__socials svg { width: 14px; height: 14px; }
.rf-footer__time {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--rf-font-mono);
  font-size: 11px;
}
.rf-footer__time .rf-dot { width: 6px; height: 6px; border-radius: 50%; background: #79D27A; }

/* ------------------------------------------------------------------
   Single post / Page
------------------------------------------------------------------ */
.rf-article {
  max-width: 760px;
  margin: 140px auto 80px;
  padding-inline: var(--rf-gutter);
  position: relative;
  z-index: 1;
}
.rf-article__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--rf-mute);
  margin-bottom: 24px;
}
.rf-article__back:hover { color: var(--rf-accent); }
.rf-article__meta {
  display: flex; gap: 12px; font-size: 12px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--rf-mute); margin-bottom: 18px;
}
.rf-article__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; align-self: center; }
.rf-article h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 24px;
}
.rf-article__lede {
  font-size: 1.125rem;
  color: var(--rf-ink-soft);
  line-height: 1.7;
  margin-bottom: 32px;
  border-left: 2px solid var(--rf-accent);
  padding-left: 18px;
}
.rf-article__hero {
  margin: 32px -20px;
  border-radius: var(--rf-radius);
  overflow: hidden;
  border: 1px solid var(--rf-line);
}
.rf-article__hero img { width: 100%; height: auto; display: block; }
.rf-prose { font-size: 17px; line-height: 1.75; color: var(--rf-ink); }
.rf-prose > * + * { margin-top: 1.1em; }
.rf-prose p { margin: 0 0 1.1em; }
.rf-prose h2 { font-size: 1.55rem; font-weight: 500; letter-spacing: -0.015em; margin-top: 2em; }
.rf-prose h3 { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.005em; margin-top: 1.6em; }
.rf-prose a { color: var(--rf-accent); border-bottom: 1px solid var(--rf-line-2); }
.rf-prose a:hover { border-color: var(--rf-accent); }
.rf-prose blockquote {
  border-left: 2px solid var(--rf-accent);
  padding: 8px 22px;
  margin: 1.6em 0;
  color: var(--rf-ink-soft);
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 1.18em;
}
.rf-prose pre {
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--rf-font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.rf-prose code { font-family: var(--rf-font-mono); font-size: .92em; background: var(--rf-paper); padding: 1px 6px; border-radius: 4px; }
.rf-prose pre code { background: transparent; padding: 0; }
.rf-prose img { border-radius: 10px; margin: 1.4em 0; }
.rf-prose ul, .rf-prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.rf-prose li { margin: .25em 0; }
.rf-prose hr { border-top: 1px solid var(--rf-line); margin: 2em 0; }

/* Archive listing */
.rf-archive {
  max-width: 1100px;
  margin: 140px auto 60px;
  padding-inline: var(--rf-gutter);
  position: relative;
  z-index: 1;
}
.rf-archive__head { margin-bottom: 48px; }
.rf-archive__head h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 14px 0 12px;
}
.rf-archive__head h1 em { font-family: var(--rf-font-serif); font-style: italic; color: var(--rf-accent); }
.rf-archive__head p { color: var(--rf-ink-soft); max-width: 60ch; }

.rf-archive__list { display: grid; gap: 0; border-top: 1px solid var(--rf-line); }
.rf-archive__item {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  gap: clamp(18px, 3vw, 40px);
  padding: 28px 0;
  border-bottom: 1px solid var(--rf-line);
  align-items: center;
  transition: padding .35s var(--rf-ease);
}
.rf-archive__item:hover { padding-inline: 18px; }
.rf-archive__item:hover .rf-archive__title { color: var(--rf-accent); }
.rf-archive__date {
  font-family: var(--rf-font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--rf-mute);
}
.rf-archive__title {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: color .3s var(--rf-ease);
}
.rf-archive__title small { display: block; font-size: 13px; color: var(--rf-mute); margin-top: 4px; letter-spacing: 0; }
.rf-archive__cat {
  justify-self: end;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--rf-mute);
}

/* ------------------------------------------------------------------
   All Writings page (home.php)
------------------------------------------------------------------ */
.rf-writings {
  padding: 140px 0 60px;
  position: relative;
  z-index: 1;
}
.rf-writings__head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  padding-bottom: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--rf-line);
  margin-bottom: clamp(40px, 6vw, 72px);
}
.rf-writings__head h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 16px 0 0;
}
.rf-writings__head h1 em {
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--rf-accent);
}
.rf-writings__lede {
  color: var(--rf-ink-soft);
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 50ch;
  margin: 0 0 18px;
}
.rf-writings__stats {
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  font-family: var(--rf-font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rf-mute);
}
.rf-writings__stats span { display: inline-flex; align-items: baseline; gap: 8px; }
.rf-writings__stats b {
  font-family: var(--rf-font-sans);
  font-weight: 500;
  font-size: 16px;
  color: var(--rf-ink);
  letter-spacing: -0.01em;
}

/* Filter pills */
.rf-writings__filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 36px;
}
.rf-writings__filter a {
  padding: 8px 14px;
  border: 1px solid var(--rf-line-2);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--rf-ink-soft);
  background: var(--rf-paper);
  transition: background .25s var(--rf-ease), color .25s var(--rf-ease), border-color .25s var(--rf-ease);
}
.rf-writings__filter a:hover { color: var(--rf-ink); border-color: var(--rf-ink); }
.rf-writings__filter a.is-active {
  background: var(--rf-ink); color: var(--rf-paper); border-color: var(--rf-ink);
}

/* Featured top post */
.rf-featured-post {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
  margin-bottom: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--rf-line);
}
.rf-featured-post__media {
  aspect-ratio: 5/4;
  border-radius: var(--rf-radius-lg);
  background: var(--rf-bg-soft);
  overflow: hidden;
  position: relative;
}
.rf-featured-post__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--rf-ease-out);
}
.rf-featured-post:hover .rf-featured-post__media img { transform: scale(1.03); }
.rf-featured-post__media--placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 22% 22%, #FFE2B380, transparent 50%),
    radial-gradient(circle at 78% 78%, #FFD7C980, transparent 50%),
    var(--rf-bg-soft);
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 80px;
  color: var(--rf-accent);
}
.rf-featured-post__body {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.rf-featured-post__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--rf-accent);
  font-weight: 500;
  width: max-content;
}
.rf-featured-post__tag::before {
  content:""; width: 18px; height: 1px; background: currentColor;
}
.rf-featured-post__body h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin: 0;
}
.rf-featured-post__body h2 a:hover { color: var(--rf-accent); }
.rf-featured-post__body p {
  color: var(--rf-ink-soft);
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  max-width: 52ch;
}
.rf-featured-post__meta {
  display: flex; gap: 12px;
  align-items: center;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--rf-mute);
}
.rf-featured-post__meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.rf-featured-post__more {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  margin-top: 4px;
}
.rf-featured-post__more svg { width: 12px; height: 12px; transition: transform .3s var(--rf-ease-out); }
.rf-featured-post:hover .rf-featured-post__more svg { transform: translate(3px,-3px); }

/* Writings grid */
.rf-writings__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.5vw, 36px);
}
.rf-writings__card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 22px;
  background: var(--rf-paper);
  border: 1px solid var(--rf-line);
  border-radius: var(--rf-radius);
  transition: transform .35s var(--rf-ease-out), box-shadow .35s var(--rf-ease);
}
.rf-writings__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -28px #14131022;
}
.rf-writings__card-thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--rf-bg-soft);
  overflow: hidden;
  position: relative;
}
.rf-writings__card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rf-writings__card-thumb--placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 30%, #FFE2B380, transparent 50%),
    radial-gradient(circle at 70% 70%, #FFD7C980, transparent 50%),
    var(--rf-bg-soft);
  font-family: var(--rf-font-serif);
  font-style: italic;
  font-size: 32px;
  color: var(--rf-accent);
}
.rf-writings__card-body { display: flex; flex-direction: column; gap: 8px; }
.rf-writings__card-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--rf-mute);
}
.rf-writings__card-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.rf-writings__card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  transition: color .25s var(--rf-ease);
}
.rf-writings__card:hover h3 { color: var(--rf-accent); }
.rf-writings__card p {
  margin: 0;
  font-size: 14px;
  color: var(--rf-ink-soft);
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .rf-writings__head { grid-template-columns: 1fr; }
  .rf-featured-post { grid-template-columns: 1fr; }
  .rf-writings__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rf-writings__card { grid-template-columns: 90px 1fr; gap: 14px; padding: 16px; }
}

/* Pagination */
.rf-pagination {
  display: flex; gap: 8px;
  justify-content: center;
  margin: 40px 0 0;
}
.rf-pagination .page-numbers {
  padding: 10px 14px;
  border: 1px solid var(--rf-line-2);
  border-radius: 999px;
  font-size: 13px;
  color: var(--rf-ink-soft);
  background: var(--rf-paper);
}
.rf-pagination .page-numbers.current { background: var(--rf-ink); color: var(--rf-paper); border-color: var(--rf-ink); }
.rf-pagination .page-numbers:hover { color: var(--rf-ink); border-color: var(--rf-ink); }

/* ------------------------------------------------------------------
   Reveal / motion utilities (only enter, never layout-shift)
------------------------------------------------------------------ */
.rf-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--rf-ease-out), transform .9s var(--rf-ease-out);
  will-change: opacity, transform;
}
.rf-reveal.is-in { opacity: 1; transform: translateY(0); }
.rf-reveal--fade { transform: none; }
.rf-reveal--right { transform: translateX(24px); }
.rf-reveal--right.is-in { transform: translateX(0); }

/* Cursor */
.rf-cursor {
  position: fixed; top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--rf-ink);
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
  transition: width .25s var(--rf-ease), height .25s var(--rf-ease), background .25s var(--rf-ease);
  mix-blend-mode: difference;
  display: none;
}
.rf-cursor.is-on-link { width: 36px; height: 36px; background: var(--rf-paper); }
@media (hover: hover) and (pointer: fine) {
  .rf-cursor { display: block; }
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 1024px) {
  .rf-hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .rf-hero__media { margin-left: auto; margin-right: auto; max-width: 360px; }
  .rf-orbit { left: -8%; bottom: -4%; width: 130px; }
  .rf-intro { grid-template-columns: 1fr; gap: 24px; }
  .rf-intro__panel { position: static; }
  .rf-feature { grid-template-columns: 1fr; gap: 32px; }
  .rf-band__cols { grid-template-columns: 1fr; }
  .rf-timeline { grid-template-columns: 1fr; }
  .rf-timeline__sticky { position: static; }
  .rf-card--half { grid-column: span 12; }
  .rf-card--third { grid-column: span 6; }
  .rf-section-head { grid-template-columns: 1fr; gap: 16px; }
  .rf-posts { grid-template-columns: 1fr 1fr; }
  .rf-contact { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --rf-h1: clamp(2rem, 8vw, 2.8rem); }
  .rf-nav__list { display: none; }
  .rf-burger { display: inline-flex; }
  .rf-hero { padding-top: 110px; }
  .rf-hero__media { max-width: 300px; }
  .rf-orbit { width: 110px; left: -4%; bottom: -2%; }
  .rf-orbit__text { font-size: 9px; }
  .rf-hero__strip { grid-template-columns: 1fr 1fr; }
  .rf-hero__strip > div:nth-child(2) { border-right: 0; }
  .rf-hero__strip > div:nth-child(1),
  .rf-hero__strip > div:nth-child(2) { border-bottom: 1px solid var(--rf-line); }
  .rf-card--half, .rf-card--third, .rf-card--full { grid-column: span 12; }
  .rf-work__row {
    grid-template-columns: 30px 1fr 24px;
    grid-template-rows: auto auto;
    gap: 4px 14px;
  }
  .rf-work__num { grid-row: 1; grid-column: 1; }
  .rf-work__title { grid-row: 1; grid-column: 2; font-size: 1.15rem; }
  .rf-work__role  { grid-row: 2; grid-column: 1 / -1; padding-left: 44px; }
  .rf-work__tags  { display: none; }
  .rf-work__arrow { grid-row: 1; grid-column: 3; }
  .rf-posts { grid-template-columns: 1fr; }
  .rf-archive__item { grid-template-columns: 1fr 70px; }
  .rf-archive__date { grid-column: 1; grid-row: 1; }
  .rf-archive__title { grid-column: 1 / -1; grid-row: 2; }
  .rf-archive__cat { grid-row: 1; grid-column: 2; }
  .rf-sticker--top    { left: auto; right: 12px; top: 12px; }
  .rf-sticker--right  { right: 12px; top: auto; bottom: 80px; }
  .rf-sticker--bottom { left: 12px; bottom: 12px; }
  .rf-footer { grid-template-columns: 1fr; text-align: center; }
  .rf-footer__socials { justify-self: center; }
  .rf-mock__body { grid-template-columns: 1fr 1fr; }
  .rf-timeline__item { grid-template-columns: 1fr; gap: 6px; }
  .rf-section-head { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .rf-reveal { opacity: 1; transform: none; }
  .rf-marquee__track { animation: none; }
}

/* WP comments etc. baseline */
.comment-list { list-style: none; padding: 0; }
.comment-respond textarea, .comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rf-line-2);
  border-radius: 10px;
  background: var(--rf-paper);
  font: inherit; color: inherit;
}
.comment-respond .submit {
  margin-top: 12px;
  padding: 12px 22px;
  background: var(--rf-ink);
  color: var(--rf-paper);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
