/* ── VARIABLES ── */
:root {
  --soil:      #1a1612;
  --bark:      #2e2720;
  --moss:      #3d4a2e;
  --fern:      #5a6e42;
  --sage:      #8a9e72;
  --lichen:    #b8c4a0;
  --parchment: #f0ead8;
  --cream:     #faf6ee;
  --solar:     #d4a843;
  --amber:     #e8c068;
  --rust:      #c4623a;
  --sky:       #7aa8b8;

  --text-primary:   var(--soil);
  --text-secondary: #4a4035;
  --text-muted:     #7a7060;
  --bg:             var(--cream);
  --surface:        #f5efe3;
  --border:         rgba(61, 74, 46, 0.15);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 17px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  max-width: 100vw;
  cursor: none;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}

/* ── VIEW TRANSITIONS ── */
@view-transition { navigation: auto; }

@keyframes vt-fade-out  { to   { opacity: 0; } }
@keyframes vt-slide-in  { from { opacity: 0; transform: translateY(10px); } }

::view-transition-old(root) { animation: 200ms ease vt-fade-out; }
::view-transition-new(root) { animation: 380ms cubic-bezier(0.4,0,0.2,1) vt-slide-in; }

::view-transition-group(project-leo),
::view-transition-group(project-abacus),
::view-transition-group(project-pc),
::view-transition-group(project-boid),
::view-transition-group(project-rentsaver),
::view-transition-group(project-earthling),
::view-transition-group(project-tools),
::view-transition-group(project-petal),
::view-transition-group(project-inscope),
::view-transition-group(project-youflow),
::view-transition-group(project-cyberdeck),
::view-transition-group(project-mytaskflow) {
  animation-duration: 500ms;
  animation-timing-function: cubic-bezier(0.4,0,0.2,1);
}

/* Nav stays on top during all view transitions */
nav { view-transition-name: navigation; }
::view-transition-group(navigation) { z-index: 200; }
::view-transition-old(navigation),
::view-transition-new(navigation) { animation: none; }

/* ── CURSOR ── */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--solar);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
  mix-blend-mode: multiply;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid var(--fern);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
  opacity: 0.6;
}
body:hover .cursor { opacity: 1; }

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem clamp(4rem, 10vw, 12rem);
  background: rgba(250, 246, 238, 0.5);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-mark {
  font-family: 'Instrument Serif', serif;
  font-size: 1.1rem;
  color: var(--soil);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-mark span { color: var(--solar); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fern); }

/* ── HERO ── */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
}

#flowerField {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#flowerField canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── HELIOTROPISM TOOLTIP ── */
.helio-btn-wrap {
  position: relative;
}

.helio-tip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  z-index: 10;
  width: 230px;
  background: rgba(250, 246, 238, 0.97);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 0.85rem 2rem 0.85rem 0.85rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  box-shadow: 0 4px 24px rgba(26,22,18,0.12);
}
.helio-tip.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: all;
}
.helio-tip.hidden { display: none !important; }
.helio-icon { font-size: 1rem; color: var(--solar); flex-shrink: 0; margin-top: 0.1rem; }
.helio-tip strong {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soil);
  display: block;
  margin-bottom: 0.3rem;
}
.helio-tip p { font-size: 0.66rem; line-height: 1.6; color: var(--text-muted); margin: 0; }
.helio-close {
  position: absolute; top: 0.4rem; right: 0.5rem;
  background: none; border: none; font-size: 0.85rem;
  color: var(--text-muted); cursor: pointer; line-height: 1; padding: 0;
}

/* ── HERO BUTTONS (right column) ── */
.helio-info-btn, .flower-tool-btn, .randomize-btn {
  z-index: 11;
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.35s cubic-bezier(0.34,1.56,0.64,1), color 0.2s, box-shadow 0.25s;
  line-height: 1;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.helio-info-btn  { color: var(--solar); font-size: 2rem; }
.flower-tool-btn { color: var(--fern);  font-size: 1.8rem; }
.randomize-btn   { color: var(--text-muted); font-size: 2rem;
  animation: randomize-shine 3s ease-in-out infinite; }

@keyframes randomize-shine {
  0%, 70%, 100% { box-shadow: 0 2px 16px rgba(0,0,0,0.08); }
  80% { box-shadow: 0 0 0 4px rgba(212,168,67,0.25), 0 2px 16px rgba(212,168,67,0.3); border-color: var(--solar); }
}

.helio-info-btn:hover   { background: var(--solar); color: var(--cream); border-color: var(--solar); transform: scale(1.12) rotate(30deg); }
.flower-tool-btn:hover, .flower-tool-btn.active { background: var(--fern); color: var(--cream); border-color: var(--fern); transform: scale(1.12) rotate(72deg); }
.randomize-btn:hover    { background: var(--soil); color: var(--cream); border-color: var(--soil); transform: scale(1.12) rotate(120deg); animation: none; }

@media (max-width: 768px) {
  .helio-tip {
    position: fixed;
    right: 1.25rem;
    bottom: 5.5rem;
    top: auto;
    left: auto;
    transform: translateY(8px);
    max-width: calc(100vw - 2.5rem);
    width: 280px;
    z-index: 200;
  }
  .helio-tip.visible {
    transform: translateY(0);
  }
  .helio-info-btn, .flower-tool-btn, .randomize-btn { width: 64px; height: 64px; }
}

/* ── MOBILE SUN CURSOR ── */
#mobileSun {
  position: fixed;
  width: 28px; height: 28px;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  display: none;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  filter: drop-shadow(0 0 6px rgba(212,168,67,0.6));
  transition: opacity 0.3s;
}
#mobileSun.active { display: block; }

/* ── FLOWER PANEL ── */
.flower-panel {
  position: absolute;
  top: 0; right: 0;
  width: 260px;
  height: 100%;
  background: rgba(245, 239, 227, 0.97);
  backdrop-filter: blur(16px);
  border-left: 1px solid var(--border);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.flower-panel.open { transform: translateX(0); }
.flower-panel-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.fp-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: rgba(245, 239, 227, 0.98);
  z-index: 1;
}
.fp-title {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fern);
  flex: 1;
  text-align: center;
}
.fp-close {
  background: none; border: none;
  font-size: 1.1rem; color: var(--solar);
  cursor: pointer; line-height: 1; padding: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.fp-close:hover { color: var(--rust); transform: rotate(90deg); }

.fp-preview-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.fp-randomize-small {
  position: absolute;
  bottom: 0.75rem; left: 0.5rem;
  background: rgba(245,239,227,0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 1rem;
  color: var(--fern);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 2;
}
.fp-randomize-small:hover { background: var(--fern); color: var(--cream); transform: rotate(120deg) scale(1.1); }

#flowerPreview {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  max-width: 160px;
  max-height: 160px;
  margin: 0 auto;
  border-bottom: none;
  background: var(--bg);
  pointer-events: none;
}

.fp-mode {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 0;
}
.fp-mode-btn {
  flex: 1;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.fp-mode-btn:last-child { border-right: none; }
.fp-mode-btn.active { color: var(--fern); background: rgba(90,110,66,0.07); }
.fp-mode-btn:hover:not(.active) { color: var(--soil); }

.fp-sliders {
  padding: 0.5rem 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow-y: auto;
  flex: 1;
}
.fp-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fp-row label {
  display: flex;
  justify-content: space-between;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.fp-row label span { color: var(--soil); font-weight: 500; }
.fp-row input[type=range] {
  width: 100%;
  appearance: none;
  height: 2px;
  background: rgba(61,74,46,0.2);
  outline: none;
  cursor: pointer;
  border-radius: 0;
}
.fp-row input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 10px; height: 10px;
  background: var(--solar);
  border-radius: 50%;
  cursor: pointer;
}
.fp-row.fp-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.fp-group-label {
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--solar);
  padding: 0.4rem 0 0.1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.15rem;
}
.fp-group-label:first-child { border-top: none; padding-top: 0; }

@media (max-width: 768px) {
  .flower-panel { width: min(260px, 85vw); }
}

/* ── HERO LAYOUT ── */
.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  width: 100%;
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* ── HERO CONTENT ── */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding-top: 5rem;
  flex: 1;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fern);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-name {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(5rem, 10vw, 9rem);
  line-height: 0.95;
  color: var(--soil);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.4s forwards;
}
.hero-name em {
  font-style: italic;
  color: var(--fern);
}

.hero-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--soil);
  line-height: 1.3;
  max-width: 520px;
  margin-bottom: 0.85rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.55s forwards;
}

.hero-role {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.7s forwards;
}

.hero-mantra {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--solar);
  opacity: 0;
  animation: fadeUp 0.9s ease 0.8s forwards;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 1s forwards;
}

.tag {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.5);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.9s ease 1.4s forwards;
}
.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--sage);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { width: 40px; opacity: 0.5; }
  50% { width: 60px; opacity: 1; }
}

/* ── SECTIONS SHARED ── */
section { position: relative; z-index: 1; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}
.section-num {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--solar);
  font-weight: 500;
}
.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--soil);
  line-height: 1.1;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 0.5rem;
}

/* ── CONTAINER ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── WORK / PORTFOLIO ── */
#work {
  padding: 7rem 2.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  overflow: visible;
}

.project-card {
  background: var(--cream);
  padding: 0;
  position: relative;
  overflow: hidden;
  cursor: none;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 2px 4px 14px rgba(26,22,18,0.07), 0 1px 3px rgba(26,22,18,0.04);
  transform: rotate(var(--card-rot, 0deg));
  transition: background 0.3s ease;
  will-change: transform;
}

/* Per-card resting rotation */
.project-card:nth-child(1) { --card-rot: -0.35deg; }
.project-card:nth-child(2) { --card-rot:  0.45deg; }
.project-card:nth-child(3) { --card-rot: -0.25deg; }
.project-card:nth-child(4) { --card-rot:  0.35deg; }
.project-card:nth-child(5) { --card-rot: -0.45deg; }
.project-card:nth-child(6) { --card-rot:  0.3deg; }
.project-card:nth-child(7) { --card-rot: -0.3deg; }

.project-card:hover { background: var(--bg); }
.project-card:hover .project-arrow { transform: translate(3px, -3px); opacity: 1; }
.project-card:hover .project-thumb { transform: scale(1.03); }

/* Project thumbnail — gradient bg with optional real image on top */
.project-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  margin-bottom: 0;
  transition: transform 0.5s ease;
  border: none;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.project-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Work detail pages keep cover — image fills sticky column */
.work-image-col .project-thumb img { object-fit: cover; }
/* Single card override: image fills thumb without letterboxing */
.thumb--cover img { object-fit: cover; }
/* Iframe variant: fill the thumb container */
.thumb-iframe { padding: 0; }
.thumb-iframe iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Gradient fallback colours */
.thumb-1 { background: linear-gradient(135deg, #2e3a20 0%, #4a6035 40%, #8a9e72 100%); }
.thumb-2 { background: linear-gradient(160deg, #1a2535 0%, #2a4a6a 50%, #7aa8b8 100%); }
.thumb-3 { background: linear-gradient(120deg, #3d2010 0%, #c4623a 60%, #d4a843 100%); }
.thumb-4 { background: linear-gradient(145deg, #1a1612 0%, #3d4a2e 50%, #5a6e42 100%); }
.thumb-5 { background: linear-gradient(130deg, #2a1a35 0%, #5a3a7a 50%, #b8a0cc 100%); }
.thumb-6 { background: linear-gradient(150deg, #1a2a2e 0%, #3a6e7a 50%, #8abbc8 100%); }
.thumb-7 { background: linear-gradient(145deg, #1a1612 0%, #3d4a2e 50%, #8a9e72 100%); }

.thumb-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: radial-gradient(circle at 20% 50%, white 1px, transparent 1px),
                    radial-gradient(circle at 80% 20%, white 1px, transparent 1px),
                    radial-gradient(circle at 60% 80%, white 1px, transparent 1px);
  background-size: 40px 40px;
}

.project-cat {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fern);
  margin-bottom: 0.5rem;
}
.project-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  color: var(--soil);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.project-desc {
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.6rem;
  margin-bottom: 0.55rem;
}
.project-tag {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  background: rgba(61, 74, 46, 0.08);
  color: var(--fern);
  border-radius: 2px;
}
.project-arrow {
  font-size: 1.1rem;
  color: var(--solar);
  opacity: 0.4;
  transition: transform 0.3s ease, opacity 0.3s ease;
  text-decoration: none;
  display: block;
  line-height: 1;
}

/* Overlay link covering indie build cards (enables real nested domain links) */
.project-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  cursor: none;
}

/* Domain link on indie build cards */
.project-domain {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-top: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--solar);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,168,67,0.35);
  opacity: 0.8;
  transition: color 0.2s, border-color 0.2s, opacity 0.2s;
  cursor: none;
}
.project-domain:hover {
  color: var(--fern);
  border-color: var(--fern);
  opacity: 1;
}
@media (max-width: 768px) {
  .project-card-overlay { cursor: auto; }
  .project-domain { cursor: auto; }
}

/* New thumb gradients */
.thumb-8  { background: linear-gradient(135deg, #2a1020 0%, #7a2a50 50%, #c47080 100%); }
.thumb-9  { background: linear-gradient(145deg, #151a2a 0%, #2a3a6a 55%, #5a7aae 100%); }
.thumb-10 { background: linear-gradient(140deg, #0e2018 0%, #2a5040 55%, #5a9080 100%); }
.thumb-11 { background: linear-gradient(140deg, #0d120a 0%, #1e2e10 45%, #3a5e28 100%); }

/* ── DEVICE MOCKUP ── */
.dm-phone {
  position: absolute;
  right: 2%;
  top: 14%;
  width: 23%;
  z-index: 3;
  pointer-events: none;
}

.dm-phone-frame {
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 9/19;
  box-shadow: 0 8px 24px rgba(120, 90, 45, 0.22), 0 2px 8px rgba(120, 90, 45, 0.12);
  background: #fdf0ee;
  padding: 3px;
}

.dm-phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── WORK TIERS ── */
.work-tier {
  margin-bottom: 5rem;
}
.work-tier:last-child { margin-bottom: 0; }

.work-tier-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tier-pill {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  letter-spacing: 0.01em;
  padding: 0.55rem 2rem;
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--soil);
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 999px;
}

.tier-pill--seed {
  border-color: rgba(90,110,66,0.4);
  color: var(--fern);
  background: rgba(90,110,66,0.06);
}

.tier-roles {
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--solar);
  white-space: nowrap;
  flex-shrink: 0;
}

.tier-roles--muted {
  color: var(--text-muted);
}

.tier-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.tier-description {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  margin-top: -0.75rem;
}

/* ── CARD CONTENT WRAPPER ── */
.project-card-content {
  padding: 0.85rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-card-content .project-meta { margin-top: auto; }

/* ── STATUS PILLS ── */
.project-status {
  display: inline-block;
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 10;
  margin: 0;
  /* glassmorphic */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.project-status--live {}
.project-status--released {}
.project-status--dark {
  background: rgba(30, 20, 15, 0.55);
  border-color: rgba(30, 20, 15, 0.35);
  color: #f0ead8;
}

/* ── 4-COLUMN POLAROID GRID (Client Work) ── */
.projects-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Client work cards: vertical polaroid (same as indie builds) */
.project-card--wide {
  display: flex;
  flex-direction: column;
  height: auto;
  padding: 0;
  overflow: hidden;
}

.project-card--wide .project-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  margin-bottom: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-right: none;
  border-radius: 0;
}

.project-card-body {
  padding: 0.85rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.project-card--wide .project-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-card--wide .project-desc {
  font-size: 0.68rem;
  margin-bottom: 0;
}

.project-card--wide:hover .project-thumb { transform: scale(1.04); }

/* Indie Builds: 3-column grid */
.projects-grid--compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding: 0;
}

.projects-grid--compact .project-title {
  font-size: 1.1rem;
}

.projects-grid--compact .project-desc {
  font-size: 0.68rem;
  margin-bottom: 0;
}

/* Seeds — minimal pods, no images */
.seeds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.seed-pod {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--fern);
  background: rgba(90,110,66,0.03);
  transition: background 0.25s, border-color 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.seed-pod:hover {
  background: rgba(90,110,66,0.07);
}

.seed-pod-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.seed-name {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--soil);
  font-weight: 500;
}

.seed-status {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  background: rgba(212,168,67,0.12);
  color: var(--solar);
  border: 1px solid rgba(212,168,67,0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.seed-role {
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fern);
  margin-bottom: 0.6rem;
}

.seed-desc {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Tiny Tools inner grid (2 cols × 3 rows) — fills the card thumb */
.tools-grid-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 1.5px;
  padding: 0;
}
.tools-grid-preview div {
  background: rgba(255,255,255,0.05);
  border: none;
  padding: 0 1rem;
  font-size: 0.6rem;
  color: var(--lichen);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s;
}
.tools-grid-preview div:hover {
  background: rgba(255,255,255,0.1);
}
.tools-grid-preview div.highlight {
  color: var(--solar);
}

/* ── SKILLS ── */
#skills {
  padding: 7rem 2.5rem;
  border-top: 1px solid var(--border);
}

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.skill-cluster { margin-bottom: 2.5rem; }
.skill-cluster-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--solar);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.skill-cluster-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.skill-pill {
  font-size: 0.7rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-secondary);
  background: var(--surface);
  transition: all 0.2s ease;
}
.skill-pill:hover {
  border-color: var(--fern);
  color: var(--fern);
  background: rgba(61, 74, 46, 0.06);
}
.skill-pill.highlight {
  border-color: var(--solar);
  color: var(--soil);
  background: rgba(212, 168, 67, 0.1);
}
.skill-pill[data-skill-node] { cursor: default; }

/* ── Diagram node pulse */
@keyframes skillNodePulse {
  0%   { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(5); opacity: 0; }
}
.node-pulse {
  fill: none;
  stroke: var(--solar);
  stroke-width: 1.5;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
  animation: skillNodePulse 0.7s ease-out forwards;
}

.skills-visual { position: relative; }
.skills-diagram {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* ── ABOUT ── */
#about {
  padding: 7rem 2.5rem;
  background: var(--bark);
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--lichen);
}
#about .section-title { color: var(--parchment); }
#about .section-line { background: rgba(255,255,255,0.1); }

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--lichen);
  margin-bottom: 1.25rem;
}
.about-text strong { color: var(--amber); font-weight: 500; }
.about-text em {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  color: var(--sage);
}

.sidebar-item { margin-bottom: 2rem; }
.sidebar-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.5rem;
}
.sidebar-value {
  font-size: 0.75rem;
  color: var(--lichen);
  line-height: 1.6;
}

/* ── CONTACT ── */
#contact {
  padding: 7rem 2.5rem;
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-headline {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  color: var(--soil);
}
.contact-headline em {
  font-style: italic;
  color: var(--fern);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.25s ease;
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}
.contact-link:hover {
  border-color: var(--fern);
  background: rgba(61, 74, 46, 0.05);
  color: var(--fern);
  transform: translateX(4px);
}
.contact-link-icon {
  font-size: 1rem;
  width: 1.5rem;
  text-align: center;
  opacity: 0.7;
}

/* ── FOOTER ── */
footer {
  padding: 1.5rem clamp(4rem, 10vw, 12rem);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

footer a {
  color: inherit;
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.2); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── WORK PAGES ── */
.work-page { padding-top: 4rem; flex: 1; display: flex; flex-direction: column; }

.work-split {
  display: grid;
  grid-template-columns: 42% 1fr;
  flex: 1;
  align-items: start;
}

/* Sticky image column — offset by nav height so image isn't hidden behind the fixed nav */
.work-image-col {
  position: sticky;
  top: 4rem;
  height: calc(100vh - 4rem);
  overflow: hidden;
}
.work-image-col .project-thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  transition: none;
}
.work-image-col .project-thumb img {
  object-fit: cover;
  object-position: center center;
}

/* Desktop + mobile screenshot composition */
.work-screens {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.work-screens .screen-desktop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.work-screens .screen-mobile {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 27%;
  border-radius: 1rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  display: block;
}

/* Scrollable content column */
.work-content-col {
  padding: 3.5rem 3.5rem 6rem;
}

.work-header { margin-bottom: 2rem; }
.work-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  line-height: 1.05;
  color: var(--soil);
  margin-top: 0.5rem;
}

.work-meta {
  display: flex;
  gap: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.meta-item { display: flex; flex-direction: column; gap: 0.3rem; }
.meta-item span {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.meta-item strong {
  font-size: 0.78rem;
  color: var(--soil);
  font-weight: 500;
}

.work-body { margin-bottom: 2.5rem; }
.work-body p {
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.work-body p strong { color: var(--soil); font-weight: 500; }
.work-body p em {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  color: var(--fern);
}

.work-tech { margin-bottom: 3rem; }
.work-tech-label {
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--solar);
  margin-bottom: 0.75rem;
}

.work-links { max-width: 360px; }

/* Nav breadcrumb on work pages */
.nav-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.breadcrumb-back {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb-back:hover { color: var(--fern); }
.breadcrumb-sep {
  color: var(--lichen);
  font-size: 0.75rem;
  opacity: 0.5;
}
.breadcrumb-current {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soil);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.25rem; }
  #hero { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero-layout { flex-direction: column; align-items: flex-start; gap: 2rem; }
  .hero-sidebar { flex-direction: row; align-self: flex-end; gap: 1rem; }
  #work { padding-left: 1.25rem; padding-right: 1.25rem; }
  #skills { padding-left: 1.25rem; padding-right: 1.25rem; }
  #about { padding-left: 1.25rem; padding-right: 1.25rem; }
  #contact { padding-left: 1.25rem; padding-right: 1.25rem; }
  .skills-layout { grid-template-columns: 1fr; gap: 2rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  /* Client Work: 2-column polaroid grid */
  .projects-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .projects-grid { grid-template-columns: 1fr; padding: 0; }
  /* Indie Builds: 2-column grid */
  .projects-grid--compact {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  /* Content wrapper: no extra padding on mobile (individual elements handle it) */
  .project-card-content {
    padding: 0;
  }
  /* Status pill: smaller on mobile */
  .project-status {
    font-size: 0.44rem;
    top: 0.5rem;
    right: 0.5rem;
  }
  .seeds-grid { grid-template-columns: 1fr; }

  /* All cards: vertical polaroid style */
  .project-card {
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: 2px 4px 10px rgba(26,22,18,0.09);
    overflow: hidden;
  }
  /* Subtle rotation — much softer than desktop */
  .project-card:nth-child(1) { --card-rot: -0.35deg; }
  .project-card:nth-child(2) { --card-rot:  0.45deg; }
  .project-card:nth-child(3) { --card-rot: -0.25deg; }
  .project-card:nth-child(4) { --card-rot:  0.4deg;  }
  .project-card:nth-child(5) { --card-rot: -0.4deg;  }
  .project-card:nth-child(6) { --card-rot:  0.3deg;  }
  .project-card:nth-child(7) { --card-rot: -0.3deg;  }

  /* Thumb: flush to top, full width, no margin */
  .project-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    flex-shrink: 0;
  }
  .project-cat {
    padding: 0.5rem 0.7rem 0;
    margin-bottom: 0.15rem;
    font-size: 0.48rem;
  }
  .project-title {
    padding: 0 0.7rem;
    font-size: 0.85rem;
    margin-bottom: 0;
  }
  .project-desc { display: none; }
  .project-meta {
    padding: 0.35rem 0.7rem 0.6rem;
    justify-content: flex-end;
    align-items: center;
    display: flex;
    margin-top: auto;
  }
  .project-tags { display: none; }
  .project-arrow { font-size: 0.85rem; opacity: 0.5; }

  /* Wide cards: vertical polaroid */
  .project-card--wide {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 0;
  }
  .project-card--wide .project-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    border: none;
    border-bottom: 1px solid var(--border);
    border-right: none;
    border-radius: 0;
  }
  .project-card-body {
    padding: 0.5rem 0.7rem 0.65rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
  }
  .project-card-body > div:first-child {
    display: flex;
    flex-direction: column;
  }
  .project-card--wide .project-cat { font-size: 0.48rem; margin-bottom: 0.15rem; }
  .project-card--wide .project-title { font-size: 0.85rem; margin-bottom: 0; }
  .project-card--wide .project-desc { display: none; }
  .project-card--wide .project-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
    padding: 0;
  }
  .project-card--wide .project-tags { display: none; }
  .projects-grid--compact .project-card { padding: 0; }

  .work-tier { margin-bottom: 3.5rem; }
  .tier-pill { font-size: clamp(1.2rem, 5vw, 1.6rem); }
  .work-tier-header { flex-wrap: wrap; gap: 0.75rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.62rem; }
  .helio-tip { right: 1.25rem; bottom: 4rem; max-width: calc(100vw - 2.5rem); }
  .skills-diagram { max-width: 100%; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
  .contact-inner { grid-template-columns: 1fr; gap: 2rem; }
  .work-meta { gap: 1.5rem; }
  .work-split { grid-template-columns: 1fr; }
  .work-image-col {
    position: relative;
    height: 52vw;
    min-height: 220px;
    max-height: 360px;
    top: 0;
  }
  .work-content-col { padding: 2.5rem 1.25rem 4rem; }
  .breadcrumb-current { display: none; }
}

/* ── CLIENTS STRIP ── */
.clients-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  padding: 2.5rem 0;
}

.clients-strip .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.clients-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.clients-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem 4rem;
}

.client-logo {
  height: 32px;
  width: auto;
  filter: brightness(0) opacity(0.55);
  transition: filter 0.25s, opacity 0.25s;
}

.client-logo--wide {
  height: 36px;
}

.client-logo:hover {
  filter: brightness(0) opacity(0.85);
}

@media (max-width: 768px) {
  .clients-logos { gap: 2.5rem 3rem; }
  .client-logo   { height: 26px; }
  .client-logo--wide { height: 30px; }
}
