/* =================================================================
   James Goddard / Sulyspa — Portfolio
   Built on THE LEDGER THEME (see /ledger-theme), reskinned with a
   near-black surface ramp and the site's amber/cyan "penguin" accent
   pair in place of the extracted burgundy/gold. Structure, spacing,
   and component patterns (.ledger, .data-table, .note) carry over
   unchanged from the theme.
   ================================================================= */

:root{
  /* ---- Surfaces — as authored in the Ledger theme ---- */
  --bg-base:#0f1012;
  --bg-surface:#17181b;
  --bg-plate:#1c1e22;
  --border:#2a2c30;
  --border-strong:#2c2e33;
  --bg-nav-translucent:rgba(15,16,18,0.86);
  --bg-code:#131417;

  /* ---- Accent — burgundy (action/alert) + gold (premium/highlight) ---- */
  --accent-primary:#7a2331;
  --accent-primary-deep:#5c1a24;
  --accent-primary-bright:#9c3244;
  --accent-primary-soft:rgba(122,35,49,0.14);
  --accent-secondary:#b98d4f;
  --accent-secondary-dim:#8a6b3e;
  --accent-secondary-bright:#d8ac71;
  --accent-secondary-soft:rgba(185,141,79,0.14);

  /* ---- Text — warm off-white on the warm dark-grey base ---- */
  --text-primary:#ece4d3;
  --text-secondary:#c9c1b0;
  --text-muted:#a29c8f;
  --text-faint:#6b665c;

  /* ---- Semantic (status) ---- */
  --status-success:#3f8f65;
  --status-warning:#b7791f;
  --status-danger:#c0392b;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  background:var(--bg-base);
  color:var(--text-primary);
  font-family:'Inter',system-ui,sans-serif;
  margin:0;
  -webkit-font-smoothing:antialiased;
}
::selection{ background:var(--accent-primary); color:var(--text-primary); }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
code, pre{ font-family:'JetBrains Mono','Consolas',monospace; }
.mono{ font-family:'JetBrains Mono','Consolas',monospace; }
.accent{ color:var(--accent-primary); }

h1,h2,h3,.display{
  font-family:'Cormorant',Georgia,serif;
  font-weight:600;
  letter-spacing:0.002em;
  text-wrap:balance;
  margin:0;
}

.container{ max-width:1180px; margin:0 auto; padding-left:32px; padding-right:32px; }

/* ---- Eyebrow ---- */
.eyebrow{
  font-size:11px; font-weight:700; letter-spacing:0.22em; text-transform:uppercase;
  color:var(--accent-secondary); margin:0 0 14px; display:flex; align-items:center; gap:10px;
}
.eyebrow::before{ content:""; width:22px; height:1px; background:var(--accent-secondary-dim); display:inline-block; flex-shrink:0; }

/* ---- Nav ---- */
.nav{
  position:sticky; top:0; z-index:100;
  background:var(--bg-nav-translucent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 32px; max-width:1180px; margin:0 auto;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{ width:26px; height:26px; flex-shrink:0; }
.brand-word{ font-family:'Cormorant',Georgia,serif; font-weight:700; font-size:21px; letter-spacing:0.02em; color:var(--text-primary); }
.nav-links{ display:flex; align-items:center; gap:34px; list-style:none; margin:0; padding:0; }
.nav-links a{ font-size:13.5px; font-weight:500; color:var(--text-muted); transition:color .15s ease; }
.nav-links a:hover{ color:var(--text-primary); }
.nav-right{ display:flex; align-items:center; gap:18px; }

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:36px; height:36px; background:none; border:1px solid var(--border); border-radius:8px; cursor:pointer;
}
.nav-toggle span{ display:block; height:2px; width:18px; margin:0 auto; background:var(--text-primary); }

@media (max-width:860px){
  .nav-links{
    position:fixed; top:69px; left:0; right:0;
    background:var(--bg-base); border-bottom:1px solid var(--border);
    flex-direction:column; align-items:flex-start;
    padding:20px 32px 26px; gap:18px;
    transform:translateY(-130%); transition:transform .2s ease;
    display:flex;
  }
  .nav-links.is-open{ transform:translateY(0); }
  .nav-toggle{ display:flex; }
}

/* ---- Buttons ---- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:'Inter',sans-serif; font-weight:600; font-size:13.5px;
  padding:11px 22px; border-radius:6px; cursor:pointer;
  border:1px solid transparent;
  transition:transform .15s ease, border-color .15s ease, background .15s ease;
  white-space:nowrap;
}
.btn-primary{ background:var(--accent-primary); color:var(--text-primary); border-color:var(--accent-primary-bright); }
.btn-primary:hover{ background:var(--accent-primary-bright); transform:translateY(-1px); }
.btn-ghost{ background:transparent; color:var(--text-primary); border-color:var(--border); }
.btn-ghost:hover{ border-color:var(--accent-secondary-dim); color:var(--accent-secondary); }

/* ---- Tags ---- */
.tag{
  display:inline-block; padding:5px 12px; border-radius:999px;
  font-size:11px; font-weight:600; letter-spacing:0.02em;
  font-family:'JetBrains Mono','Consolas',monospace;
  background:var(--bg-plate); color:var(--text-muted); border:1px solid var(--border);
}
.tag-mini{ font-size:10px; padding:4px 10px; }

/* ---- Section scaffolding ---- */
section{ padding:96px 0; border-bottom:1px solid var(--border); }
section:last-of-type{ border-bottom:none; }
.section-alt{ background:var(--bg-surface); }
.section-head{ max-width:680px; margin-bottom:56px; }
.section-head h2{ font-size:clamp(28px,3.2vw,38px); color:var(--text-primary); margin-bottom:16px; }
.section-head p{ font-size:15.5px; line-height:1.7; color:var(--text-muted); margin:0; }

.two-col{ display:grid; grid-template-columns:1.3fr 1fr; gap:48px; align-items:start; }
@media (max-width:800px){ .two-col{ grid-template-columns:1fr; } }

/* ---- Hero ---- */
.page-hero{ position:relative; padding:120px 0 90px; overflow:hidden; }
.page-hero::before{
  content:""; position:absolute; inset:0;
  background:radial-gradient(680px 420px at 82% -8%, var(--accent-secondary-soft), transparent 60%);
  pointer-events:none;
}
.hero-inner{ position:relative; z-index:2; max-width:760px; }
.hero-title{ font-size:clamp(2.4rem,6vw,3.6rem); line-height:1.1; margin:0 0 10px; }
.hero-handle{ display:block; font-size:1.05rem; font-weight:500; color:var(--accent-primary); margin-top:10px; font-family:'JetBrains Mono','Consolas',monospace; }
.hero-role{ font-size:1.1rem; color:var(--text-secondary); min-height:1.6em; margin:10px 0 22px; }
.cursor{ display:inline-block; width:8px; background:var(--accent-secondary); animation:blink 1s step-end infinite; }
@keyframes blink{ 50%{ opacity:0; } }
.hero-lede{ font-size:1.02rem; color:var(--text-muted); max-width:600px; margin-bottom:32px; line-height:1.7; }
.hero-ctas{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:30px; }
.hero-badges{ display:flex; gap:10px; flex-wrap:wrap; }

/* ---- About ---- */
.about-copy p{ color:var(--text-muted); margin-bottom:18px; font-size:15px; line-height:1.75; }
.about-copy strong{ color:var(--text-primary); }

.facts-table{ border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--bg-surface); }
.facts-table table{ width:100%; border-collapse:collapse; }
.facts-table td{ padding:16px 18px; font-size:13.5px; border-bottom:1px solid var(--border); vertical-align:top; }
.facts-table tr:last-child td{ border-bottom:none; }
.facts-table td.label{ color:var(--accent-secondary-dim); font-weight:700; letter-spacing:0.04em; text-transform:uppercase; font-size:11px; width:38%; white-space:nowrap; }
.facts-table td.value{ color:var(--text-primary); font-weight:500; }

/* ---- Data table (case study before/after, credentials) ---- */
.data-table{ border:1px solid var(--border); border-radius:8px; overflow:hidden; margin-bottom:28px; }
.data-table table{ width:100%; border-collapse:collapse; }
.data-table th{
  text-align:left; font-size:10.5px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase;
  color:var(--accent-secondary-dim); padding:14px 18px; background:var(--bg-plate); border-bottom:1px solid var(--border);
}
.data-table td{ padding:16px 18px; font-size:13.5px; color:var(--text-secondary); border-bottom:1px solid var(--border); vertical-align:top; }
.data-table tr:last-child td{ border-bottom:none; }
.data-table td strong{ color:var(--text-primary); }
@media (max-width:700px){ .data-table{ overflow-x:auto; } .data-table table{ min-width:640px; } }

.case-stack{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }

/* ---- Note callout ---- */
.note{
  display:flex; gap:12px; background:var(--bg-plate); border:1px solid var(--border);
  border-left:3px solid var(--accent-secondary-dim); border-radius:4px; padding:14px 16px; margin:20px 0 0;
}
.note .label{ font-size:10px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--accent-secondary); flex-shrink:0; white-space:nowrap; }
.note p{ font-size:12.5px; line-height:1.6; color:var(--text-muted); margin:0; }
.note.warning{ border-left-color:var(--status-warning); }
.note.warning .label{ color:var(--status-warning); }

/* ---- Ledger grid (projects, contact) ---- */
.ledger{ display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--border); border:1px solid var(--border); }
.entry{ background:var(--bg-base); padding:30px 28px; display:flex; flex-direction:column; gap:10px; transition:background .15s ease; }
.entry:hover{ background:var(--bg-surface); }
.entry h3{ font-size:20px; color:var(--text-primary); line-height:1.2; }
.entry > p{ font-size:13.5px; line-height:1.65; color:var(--text-muted); margin:0; flex-grow:1; }
@media (max-width:900px){ .ledger{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px){ .ledger{ grid-template-columns:1fr; } }

.entry-tags{ display:flex; flex-wrap:wrap; gap:6px; }
.entry-link{ font-size:13px; font-weight:600; color:var(--accent-secondary); }
.entry-link:hover{ color:var(--accent-primary); }
.entry-links{ display:flex; flex-direction:column; gap:6px; }

.contact-ledger{ grid-template-columns:repeat(2,1fr); }
.contact-ledger .entry{ cursor:pointer; }
.contact-ledger .entry:hover .tag{ color:var(--accent-secondary-bright); }
.contact-value{ font-size:16px; font-weight:600; color:var(--text-primary); word-break:break-word; }

/* ---- Credentials ---- */
.cred-note{ margin-top:0; }

/* ---- Reveal-on-scroll ---- */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform:none; }

/* ---- Footer ---- */
footer{ border-top:1px solid var(--border); padding:36px 32px 44px; }
.footer-inner{ max-width:1180px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; }
.footer-inner .brand-word{ font-size:17px; }
footer .fine{ font-size:12px; color:var(--text-faint); line-height:1.6; margin:0; }

/* ---- Subtle grain overlay ---- */
.noise-overlay{
  position:fixed; inset:0; pointer-events:none; z-index:999; opacity:0.03;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width:520px){
  .page-hero{ padding:90px 0 60px; }
  section{ padding:64px 0; }
}
