/* RocSite, shared styles for sub-pages.
   Palette + typography mirrors the chat home: Playfair Display headlines,
   Inter body, JetBrains Mono accents. Dark + light themes. Navy + orange. */

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

:root {
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --max: 1100px;
  --read: 760px;
  --pad: 1.5rem;
}

[data-theme="dark"] {
  --bg: #0a0a12;
  --bg-deep: #06060d;
  --surface: #12121d;
  --surface-2: #1a1a28;
  --surface-3: #22223a;
  --line: rgba(255,255,255,.06);
  --line-strong: rgba(255,255,255,.14);
  --text: #f0eee5;
  --text-2: #a8a8b3;
  --text-3: #5a5a65;
  --text-4: #3a3a45;
  --orange: #f7931e;
  --orange-soft: rgba(247,147,30,.10);
  --orange-mid: rgba(247,147,30,.20);
  --cyan: #00bcd4;
  --cyan-soft: rgba(0,188,212,.10);
  --cyan-mid: rgba(0,188,212,.22);
  --green: #22c55e;
  --green-soft: rgba(34,197,94,.10);
  --green-mid: rgba(34,197,94,.22);
}

[data-theme="light"] {
  --bg: #EEF3FB;
  --bg-deep: #E1E9F5;
  --surface: #FFFFFF;
  --surface-2: #F4F7FC;
  --surface-3: #E5ECF7;
  --line: rgba(10,33,80,.10);
  --line-strong: rgba(10,33,80,.22);
  --text: #0A2150;
  --text-2: #324A78;
  --text-3: #647494;
  --text-4: #9FA9C0;
  --orange: #FF6B1A;
  --orange-soft: rgba(255,107,26,.10);
  --orange-mid: rgba(255,107,26,.28);
  --cyan: #0A2150;
  --cyan-soft: rgba(10,33,80,.06);
  --cyan-mid: rgba(10,33,80,.18);
  --green: #0D8A4F;
  --green-soft: rgba(13,138,79,.08);
  --green-mid: rgba(13,138,79,.20);
}

html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; overflow-x: hidden; height: 100%; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  overflow-wrap: break-word;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Subtle radial backdrop matching live home */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 700px at 12% -8%, var(--orange-soft), transparent 65%),
    radial-gradient(900px 600px at 92% 95%, var(--cyan-soft), transparent 70%);
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; border-bottom: 1px solid transparent; transition: color .15s ease, border-color .15s ease; }
a:hover { color: var(--orange); border-bottom-color: var(--orange); }
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
strong, b { color: var(--text); font-weight: 700; }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
::selection { background: var(--orange-soft); color: var(--text); }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 800;
  letter-spacing: -.018em;
  line-height: 1.15;
  color: var(--text);
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.95rem, 4vw, 3.4rem); line-height: 1.08; letter-spacing: -.025em; }
h1 em { color: var(--orange); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); margin-bottom: .85rem; }
h2 em { color: var(--orange); }
h3 { font-size: 1.3rem; margin-bottom: .55rem; }
h4 {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .85rem;
}
p { margin-bottom: 1.05em; max-width: var(--read); color: var(--text-2); }
p:last-child { margin-bottom: 0; }
.bio p.bio li { color: var(--text); }
ul, ol { margin: 0 0 1.05em 1.4em; max-width: var(--read); }
li { margin-bottom: .35em; color: var(--text-2); }
li::marker { color: var(--orange); }
.lede {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.55;
  max-width: var(--read);
}
.lede strong { color: var(--text); font-weight: 600; }
.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .9rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--orange); transform: translateY(-2px); display: inline-block;
}

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.read { max-width: var(--read); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
section { padding: 4rem 0; }
section.tight { padding: 2.5rem 0; }
section.subtle { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ─── NAV ─── */
.nav {
  flex-shrink: 0;
  padding: .7rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(10,10,18,.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}
[data-theme="light"] .nav { background: rgba(250,250,247,.85); }
.brand {
  display: flex; align-items: baseline; gap: .5rem;
  color: var(--text);
  border: 0;
  text-decoration: none;
}
.brand:hover { color: var(--text); border: 0; }
.brand-mark {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--text);
}
.brand-mark::after { content: "."; color: var(--orange); }
.brand-tag {
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--text-3);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav-spacer { flex: 1; }
.nav-links {
  display: flex; align-items: center; gap: 1.4rem;
  font-family: var(--sans);
  font-size: .88rem;
}
.nav-links a {
  color: var(--text-2);
  font-weight: 500;
  border: 0;
}
.nav-links a:hover { color: var(--orange); border: 0; }
.theme-pill {
  width: 30px; height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  font-size: .82rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
}
.theme-pill:hover { border-color: var(--orange); color: var(--orange); }
.nav-cta {
  padding: .5rem 1rem;
  background: var(--orange);
  color: #0a0a12;
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 0;
}
.nav-cta:hover { background: #ffa838; border: 0; color: #0a0a12; }
[data-theme="light"] .nav-cta { color: #fff; }
[data-theme="light"] .nav-cta:hover { color: #fff; }
.live-pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pip 1.6s ease-in-out infinite;
}
@keyframes pip { 0%,100% {opacity:1} 50% {opacity:.4} }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: .35rem .55rem;
  font-size: .8rem;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
}
.nav-toggle:hover { color: var(--orange); border-color: var(--orange); }

/* Main + content */
main { flex: 1; }

.hero { padding: 4.5rem 0 3rem; }
.hero h1 { max-width: 880px; margin-bottom: 1.2rem; }
.hero .lede { max-width: 720px; }

/* ─── CARDS / blocks ─── */
.creds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.85rem;
}
.cred {
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  border-top: 3px solid var(--orange);
}
.cred-label {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .55rem;
  font-weight: 600;
}
.cred-headline {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.32;
  margin-bottom: .65rem;
  color: var(--text);
}
.cred a { font-size: .86rem; }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.focus-card {
  padding: 1.85rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: border-color .2s, transform .2s;
}
.focus-card:hover {
  border-color: var(--orange-mid);
  transform: translateY(-1px);
}
.focus-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.012em;
  margin-bottom: .45rem;
}
.focus-stage {
  display: inline-block;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .28rem .6rem;
  background: var(--orange-soft);
  color: var(--orange);
  border: 1px solid var(--orange-mid);
  border-radius: 3px;
  margin-bottom: 1rem;
}
.focus-card p { color: var(--text-2); margin-bottom: 1rem; }
.focus-card a.more { font-size: .92rem; font-weight: 600; }

.contact-mini {
  display: flex; flex-direction: column;
  gap: .7rem;
  padding: 1.85rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  max-width: 720px;
}
.contact-mini .email-line {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--orange);
  font-weight: 600;
}

/* ─── Contact form ─── */
.contact-form {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  padding: 1.85rem;
  margin-top: 1.2rem;
}
.contact-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.contact-form .form-row { display: flex; flex-direction: column; gap: .35rem; }
.contact-form .form-row.full { grid-column: 1 / -1; }
.contact-form label {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.contact-form input.contact-form select.contact-form textarea {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: .6rem .75rem;
  width: 100%;
  transition: border-color .15s;
}
.contact-form input:focus.contact-form select:focus.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form .form-submit {
  margin-top: 1.4rem;
  width: 100%;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .85rem 1.4rem;
  border-radius: 3px;
  background: var(--orange);
  color: #0a0a12;
  border: 0;
  cursor: pointer;
  transition: background .15s;
}
.contact-form .form-submit:hover { background: #ffa838; }
.contact-form .form-submit:disabled { opacity: .5; cursor: not-allowed; }
.contact-form .form-note {
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--text-3);
}
.contact-form .form-note strong { color: var(--text-2); }
.contact-form .form-success.contact-form .form-error {
  display: none;
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: 4px;
  font-size: .92rem;
}
.contact-form .form-success.show.contact-form .form-error.show { display: block; }
.contact-form .form-success {
  background: var(--green-soft);
  border: 1px solid var(--green-mid);
  color: var(--green);
}
.contact-form .form-error {
  background: var(--red-soft);
  border: 1px solid var(--red);
  color: var(--red);
}
@media (max-width: 540px) {
  .contact-form { padding: 1.4rem; }
  .contact-form .form-grid { grid-template-columns: 1fr; gap: .8rem; }
}

/* Bio narrative */
.bio { max-width: var(--read); }
.bio h2 { margin-top: 2.4rem; margin-bottom: .6rem; }
.bio h2:first-of-type { margin-top: 0; }
.bio p { color: var(--text); }
.bio blockquote {
  border-left: 3px solid var(--orange);
  padding: .55rem 0 .55rem 1.2rem;
  margin: 1.6rem 0;
  color: var(--text-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  max-width: var(--read);
  background: var(--orange-soft);
  border-radius: 0 4px 4px 0;
}

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.85rem 0;
}
.stat {
  padding: 1.15rem 1.3rem;
  background: var(--surface);
  border-left: 2px solid var(--orange);
  border-radius: 0 4px 4px 0;
}
.stat-num {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -.01em;
}
.stat-label {
  font-size: .85rem;
  color: var(--text-2);
  margin-top: .3rem;
}

/* Artifact grid */
.artifacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.artifact {
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}
.artifact-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: .35rem;
  font-weight: 600;
}
.artifact a {
  font-size: .9rem;
  word-break: break-word;
  color: var(--orange);
  font-weight: 600;
}

/* Note callout */
.note {
  padding: 1.1rem 1.3rem;
  background: var(--orange-soft);
  border: 1px solid var(--orange-mid);
  border-radius: 4px;
  font-size: .94rem;
  color: var(--text);
  margin: 1.6rem 0;
  max-width: var(--read);
}
.note strong { color: var(--orange); font-weight: 700; }

/* Link list */
.link-list { list-style: none; margin-left: 0; padding: 0; max-width: var(--read); }
.link-list li {
  margin-bottom: .85rem; padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}
.link-list li:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.link-list .item-title { font-weight: 700; color: var(--text); display: block; margin-bottom: .2rem; font-family: var(--serif); font-size: 1.05rem; }
.link-list .item-meta { font-size: .87rem; color: var(--text-3); display: block; margin-bottom: .35rem; }
.link-list .item-link { font-size: .92rem; color: var(--orange); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .94rem;
  font-weight: 600;
  padding: .7rem 1.2rem;
  border-radius: 3px;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #0a0a12 !important;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: #ffa838; border-color: #ffa838; color: #0a0a12 !important; border-bottom-color: #ffa838; }
[data-theme="light"] .btn { color: #fff !important; }
[data-theme="light"] .btn:hover { color: #fff !important; }

/* ─── FOOTER ─── */
footer.site-foot {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}
footer.site-foot .foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
footer.site-foot h4 {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .85rem;
}
footer.site-foot ul { list-style: none; margin: 0; padding: 0; max-width: none; }
footer.site-foot li { margin-bottom: .45rem; font-size: .9rem; color: var(--text-2); }
footer.site-foot a { color: var(--text-2); border: 0; }
footer.site-foot a:hover { color: var(--orange); border: 0; }
footer.site-foot .foot-brand-block .brand-name {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 800;
  color: var(--text); margin-bottom: .45rem;
}
footer.site-foot .foot-brand-block .brand-name::after { content: "."; color: var(--orange); }
footer.site-foot .foot-brand-block p {
  font-size: .9rem; color: var(--text-2); max-width: 280px; margin-bottom: .7rem;
}
footer.site-foot .foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .82rem;
  color: var(--text-3);
}
footer.site-foot .foot-bottom a { color: var(--text-3); }
footer.site-foot .foot-correction {
  margin-top: .85rem;
  font-size: .82rem;
  color: var(--text-3);
  font-style: italic;
  max-width: none;
}
footer.site-foot .foot-correction a { color: var(--orange); }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  padding: .5rem .85rem; background: var(--orange); color: #0a0a12;
  z-index: 100; border: 0; font-weight: 700;
}
.skip-link:focus { left: .5rem; top: .5rem; }

/* Subtle scroll-fade */
.fade-in { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.is-visible { opacity: 1; transform: none; }

/* Mobile */
@media (max-width: 820px) {
  :root { --pad: 1.15rem; }
  body { font-size: 16px; }
  section { padding: 2.75rem 0; }
  .hero { padding: 3rem 0 2.5rem; }
  .creds.focus-grid.stat-row { grid-template-columns: 1fr; gap: .85rem; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-block; }
  .nav-links.is-open {
    display: flex; flex-direction: column;
    gap: .85rem;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--pad) 1.2rem;
  }
  footer.site-foot .foot-grid { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
  footer.site-foot .foot-brand-block { grid-column: 1 / -1; }
  footer.site-foot .foot-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
  :root { --pad: 1rem; }
  .nav { padding: .55rem .8rem; gap: .6rem; }
  .brand-mark { font-size: 1.18rem; }
  .brand-tag { display: none; }
  .nav-cta { padding: .42rem .75rem; font-size: .7rem; }
  .theme-pill { width: 34px; height: 34px; }
  h1 { font-size: 1.7rem; line-height: 1.15; letter-spacing: -.018em; }
  h2 { font-size: 1.4rem; }
  .lede { font-size: 1rem; }
  .hero { padding: 2.25rem 0 2rem; }
  .focus-card { padding: 1.4rem; }
  .cred { padding: 1.15rem; }
  .contact-mini { padding: 1.4rem; }
  footer.site-foot .foot-grid { grid-template-columns: 1fr; }
}

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

/* Print */
@media print {
  .nav, footer.site-foot { display: none; }
  body::before { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; border-bottom: 0; }
  a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}

/* Logo lockup in nav (v5-format rollout, 2026-05-31) */
.brand img { height: 34px; width: auto; display: block; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
@media (max-width: 540px) { .brand img { height: 28px; } }
