/* ═══════════════════════════════════════════════════════════
   GRAHAM STEPHENS — Energy & Environmental Services Executive
   Shared stylesheet · Light (default) + Dark themes
   ═══════════════════════════════════════════════════════════ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

/* ── THEME TOKENS ── */
:root{
  /* Light theme (default) — anchored to brand navy / gold / teal */
  --bg:#f6f3ec;
  --s1:#fdfbf5;
  --s2:#efe9dc;
  --text:#1c2a38;
  --body:rgba(28,42,56,.76);
  --soft:rgba(28,42,56,.62);
  --muted:#6f6552;
  --gold:#946318;
  --gl:#b07f2c;
  --gold-faint:rgba(148,99,24,.22);
  --rule:rgba(148,99,24,.24);
  --navbg:rgba(250,247,240,.92);
  --card-hover:#f7f2e7;
  --teal:#1e6b85;
  --shadow:0 10px 30px rgba(28,42,56,.07);
  --serif:"Cormorant Garamond",Georgia,serif;
  --sans:"DM Sans",sans-serif;
}
html[data-theme="dark"]{
  --bg:#0f0f0d;
  --s1:#181816;
  --s2:#222220;
  --text:#f0ead8;
  --body:rgba(240,234,216,.72);
  --soft:rgba(240,234,216,.6);
  --muted:#8a7f6a;
  --gold:#c8924a;
  --gl:#e8b472;
  --gold-faint:rgba(200,146,74,.2);
  --rule:rgba(200,146,74,.18);
  --navbg:rgba(15,15,13,.92);
  --card-hover:#222220;
  --teal:#50b8d4;
  --shadow:0 10px 30px rgba(0,0,0,.4);
}

html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:var(--sans);font-weight:300;font-size:16px;line-height:1.7;overflow-x:hidden;transition:background-color .3s ease,color .3s ease}
a{color:inherit}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* ── NAV ── */
nav{position:fixed;top:0;left:0;right:0;z-index:200;display:flex;justify-content:space-between;align-items:center;padding:.85rem 3rem;background:var(--navbg);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:.5px solid var(--rule)}
.brand{display:flex;align-items:center;gap:.8rem;text-decoration:none}
.brand .mark{height:42px;width:auto;display:block}
.brand-name{font-family:var(--serif);font-size:1.02rem;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--text);line-height:1.2;white-space:nowrap}
.brand-name em{font-style:normal;color:var(--gold)}
.brand-sub{display:block;font-family:var(--sans);font-size:.52rem;letter-spacing:.28em;text-transform:uppercase;color:var(--muted);margin-top:.15rem}
.navr{display:flex;align-items:center;gap:1.5rem}
nav ul{list-style:none;display:flex;gap:1.65rem;align-items:center}
.nlink{color:var(--muted);text-decoration:none;font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;transition:color .25s;padding:.3rem 0;position:relative}
.nlink::after{content:"";position:absolute;left:0;right:100%;bottom:-2px;height:1px;background:var(--gold);transition:right .25s ease}
.nlink:hover,.nlink.on{color:var(--gold)}
.nlink.on::after{right:0}

/* theme toggle */
.thm{background:none;border:.5px solid var(--rule);border-radius:999px;width:38px;height:38px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--gold);transition:border-color .25s,transform .25s}
.thm:hover{border-color:var(--gold);transform:rotate(15deg)}
.thm svg{width:17px;height:17px}
.ic-moon{display:none}
html[data-theme="dark"] .ic-sun{display:none}
html[data-theme="dark"] .ic-moon{display:block}

/* hamburger */
.ham{display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer;padding:6px}
.ham span{display:block;width:26px;height:2px;background:var(--gold);transition:all .3s;border-radius:2px}
.ham.o span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.ham.o span:nth-child(2){opacity:0}
.ham.o span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

@media(max-width:960px){
  nav{padding:.75rem 1rem;gap:.75rem}
  .brand{gap:.55rem;min-width:0;flex:1}
  .brand .mark{height:34px}
  .brand-name{font-size:.82rem;letter-spacing:.1em;overflow:hidden;text-overflow:ellipsis}
  .navr{gap:.75rem;flex-shrink:0}
  .thm{width:34px;height:34px}
  .ham{display:flex}
  nav ul{display:none;position:absolute;top:100%;left:0;right:0;z-index:300;background:var(--navbg);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);flex-direction:column;align-items:stretch;padding:1rem 0 1.25rem;border-bottom:.5px solid var(--rule);gap:0;box-shadow:var(--shadow)}
  nav ul.o{display:flex}
  nav ul li{padding:0}
  nav ul .nlink{display:block;padding:.8rem 1.75rem;font-size:.78rem}
  .nlink::after{display:none}
  .nlink.on{border-left:2px solid var(--gold);background:var(--s2)}
}
@media(max-width:560px){.brand-sub{display:none}}
@media(max-width:400px){.brand-name{display:none}}

/* ── PAGE SHELL ── */
main{padding-top:72px;min-height:100vh;animation:fu .35s ease}
@keyframes fu{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.w{max-width:1200px;margin:0 auto;padding:5rem 3.5rem}
@media(max-width:768px){.w{padding:3.5rem 1.35rem}}
.stag{font-size:.63rem;letter-spacing:.32em;text-transform:uppercase;color:var(--gold);margin-bottom:.7rem;display:flex;align-items:center;gap:.7rem}
.stag::after{content:"";flex:1;height:.5px;background:var(--rule);max-width:60px}
.sh{font-family:var(--serif);font-size:clamp(1.9rem,3.8vw,3rem);font-weight:400;line-height:1.15;margin-bottom:2.5rem}
.dk{background:var(--s2)}
html[data-theme="dark"] .dk{background:var(--s1)}
.rb{border-bottom:.5px solid var(--rule);margin-bottom:3rem;padding-bottom:3rem}
.rb:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}

/* ── HERO ── */
.hero{min-height:calc(96vh - 72px);display:flex;align-items:center;padding:3.5rem 3.5rem 5rem;position:relative;overflow:hidden}
@media(max-width:768px){.hero{padding:2.5rem 1.35rem 4rem}}
.hero::before{content:"";position:absolute;top:-10%;right:-5%;width:55vw;height:55vw;background:radial-gradient(ellipse at center,var(--gold-faint) 0%,transparent 65%);opacity:.5;pointer-events:none}
.hi{max-width:1200px;margin:0 auto;width:100%;position:relative;z-index:1}
.hero-mark{height:96px;width:auto;display:block;margin-bottom:2rem}
@media(max-width:768px){.hero-mark{height:76px}}
.ey{font-size:.65rem;letter-spacing:.32em;text-transform:uppercase;color:var(--gold);margin-bottom:1.6rem;display:flex;align-items:center;gap:1rem}
.ey::before{content:"";display:block;width:48px;height:.5px;background:var(--gold)}
.hn{font-family:var(--serif);font-size:clamp(3.4rem,8.5vw,8.2rem);font-weight:400;line-height:.92;letter-spacing:-.02em;margin-bottom:1.5rem}
.hn span{display:block;color:var(--gold);font-style:italic;font-weight:300}
.htags{display:flex;gap:.65rem;flex-wrap:wrap;margin-bottom:2.5rem}
.tag{font-size:.68rem;letter-spacing:.17em;text-transform:uppercase;color:var(--muted);border:.5px solid var(--rule);padding:.35rem .85rem;background:var(--s1)}
.hp{max-width:640px;font-size:1.05rem;color:var(--body);line-height:1.85;margin-bottom:2.5rem}
.sts{display:flex;gap:3.25rem;flex-wrap:wrap;padding-top:2rem;border-top:.5px solid var(--rule)}
.sn{font-family:var(--serif);font-size:2.5rem;font-weight:500;color:var(--gold);line-height:1;margin-bottom:.25rem}
html[data-theme="dark"] .sn{font-weight:400;color:var(--gl);animation:glow-pulse 3s ease-in-out infinite}
.sl{font-size:.66rem;letter-spacing:.18em;text-transform:uppercase;color:var(--muted)}
.cta{display:inline-flex;align-items:center;gap:.6rem;margin-top:2.5rem;padding:.85rem 1.75rem;border:.5px solid var(--gold);color:var(--gold);font-size:.73rem;letter-spacing:.18em;text-transform:uppercase;transition:background .25s,color .25s;cursor:pointer;background:none;font-family:var(--sans);text-decoration:none}
.cta:hover{background:var(--gold);color:var(--bg)}

/* ── COMPETENCY GRID ── */
.cgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1.5px;background:var(--rule);border:.5px solid var(--rule)}
.cc{background:var(--s1);padding:1.75rem;transition:background .2s}
.cc:hover{background:var(--card-hover)}
.cn{font-family:var(--serif);font-size:1.8rem;font-weight:400;color:var(--gold-faint);margin-bottom:.6rem;line-height:1}
.ct{font-size:.85rem;font-weight:400;color:var(--text);line-height:1.5}

/* ── TIMELINE ── */
.tl{position:relative;padding-left:2.25rem}
.tl::before{content:"";position:absolute;left:0;top:.6rem;bottom:0;width:.5px;background:linear-gradient(to bottom,var(--gold),var(--rule) 80%,transparent)}
.te{position:relative;margin-bottom:3.5rem;padding-bottom:3.5rem;border-bottom:.5px solid var(--rule)}
.te:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.te::before{content:"";position:absolute;left:-2.25rem;top:.55rem;width:9px;height:9px;border-radius:50%;border:1.5px solid var(--gold);background:var(--bg)}
.tm{font-size:.68rem;letter-spacing:.18em;text-transform:uppercase;color:var(--gold);margin-bottom:.4rem}
.tco{font-family:var(--serif);font-size:1.55rem;font-weight:500;margin-bottom:.12rem;line-height:1.2}
.tro{font-size:.76rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:.55rem}
.tit{font-style:italic;color:var(--soft);font-family:var(--serif);font-size:.98rem;margin-bottom:1rem}
.tls{list-style:none;display:flex;flex-direction:column;gap:.5rem}
.tls li{font-size:.9rem;color:var(--body);padding-left:1.15rem;position:relative;line-height:1.6}
.tls li::before{content:"—";position:absolute;left:0;color:var(--gold)}
.hi2{color:var(--gold);font-weight:500}
html[data-theme="dark"] .hi2{color:var(--gl);font-weight:400}

/* ── PROJECT CARDS ── */
.cgd{display:grid;grid-template-columns:repeat(auto-fit,minmax(275px,1fr));gap:1.5rem;margin-bottom:3rem}
.cd{border:.5px solid var(--rule);background:var(--s1);padding:1.85rem 1.75rem;transition:border-color .25s,box-shadow .25s;position:relative;overflow:hidden}
.cd:hover{border-color:var(--gold);box-shadow:var(--shadow)}
.cd::before{content:"";position:absolute;top:0;left:0;width:3px;height:100%;background:var(--gold);opacity:0;transition:opacity .3s}
.cd:hover::before{opacity:1}
.cl{font-size:.62rem;letter-spacing:.24em;text-transform:uppercase;color:var(--gold);margin-bottom:.38rem}
.ct2{font-family:var(--serif);font-size:1.22rem;font-weight:500;margin-bottom:.6rem;line-height:1.3}
.cv{font-family:var(--serif);font-size:1.85rem;font-weight:500;color:var(--gold);line-height:1;margin-bottom:.18rem}
html[data-theme="dark"] .cv{color:var(--gl);font-weight:300}
.cvl{font-size:.63rem;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);margin-bottom:.9rem}
.cd p{font-size:.86rem;color:var(--soft);line-height:1.7}
.ttags{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:1rem}
.tt{font-size:.62rem;letter-spacing:.1em;text-transform:uppercase;padding:.28rem .65rem;border:.5px solid var(--rule);color:var(--gold)}

/* ── PROCESS GRID ── */
.pgd{display:grid;grid-template-columns:repeat(auto-fit,minmax(198px,1fr));gap:1px;background:var(--rule);border:.5px solid var(--rule);margin-bottom:3.5rem}
.pc{background:var(--s1);padding:1.45rem 1.6rem;transition:background .2s}
.pc:hover{background:var(--card-hover)}
.pl{font-size:.6rem;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);margin-bottom:.45rem}
.pt{font-family:var(--serif);font-size:.98rem;font-weight:500;color:var(--text);margin-bottom:.32rem;line-height:1.3}
.ps{font-size:.76rem;color:var(--muted);line-height:1.55}

/* ── CHALLENGE GRID ── */
.chgd{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:2rem}
.ch{padding-top:1rem;border-top:.5px solid var(--rule)}
.chl{font-size:.6rem;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);margin-bottom:.45rem}
.cht{font-family:var(--serif);font-size:1rem;font-weight:500;margin-bottom:.4rem;line-height:1.3}
.chp{font-size:.81rem;color:var(--muted);line-height:1.65}

/* ── EARLIER ROLES ── */
.egrd{display:grid;grid-template-columns:repeat(auto-fit,minmax(275px,1fr));gap:1.65rem}
.ec{border:.5px solid var(--rule);background:var(--s1);padding:1.65rem;transition:border-color .25s}
.ec:hover{border-color:var(--gold)}
.ep{font-size:.63rem;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);margin-bottom:.38rem}
.eco{font-family:var(--serif);font-size:1.18rem;font-weight:500;margin-bottom:.12rem}
.ero{font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:.7rem}
.ec p{font-size:.87rem;color:var(--soft);line-height:1.7}

/* ── EDUCATION / SKILLS ── */
.escu{display:grid;grid-template-columns:1fr 1fr;gap:4rem}
@media(max-width:768px){.escu{grid-template-columns:1fr;gap:2.5rem}}
.ee{margin-bottom:2rem;padding-bottom:2rem;border-bottom:.5px solid var(--rule)}
.ee:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.ed{font-family:var(--serif);font-size:1.22rem;font-weight:500;margin-bottom:.18rem}
.es{font-size:.74rem;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);margin-bottom:.12rem}
.ey2{font-size:.8rem;color:var(--muted)}
.sktags{display:flex;flex-wrap:wrap;gap:.55rem}
.sk{font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;padding:.4rem .8rem;border:.5px solid var(--rule);color:var(--soft);transition:border-color .2s,color .2s;background:var(--s1)}
.sk:hover{border-color:var(--gold);color:var(--gold)}
.crtgrd{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.35rem;margin-top:2rem}
.crt{padding:1.6rem 1.7rem;border:.5px solid var(--rule);background:var(--s1)}
.crticon{width:33px;height:33px;border:.5px solid var(--gold);border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:.8rem;color:var(--gold);font-size:.78rem;font-family:var(--serif)}
.crtt{font-size:.84rem;font-weight:400;margin-bottom:.22rem}
.crtd{font-size:.75rem;color:var(--muted);line-height:1.55}
.about-mark{height:84px;width:auto;display:block;margin-bottom:2rem}

/* ── CONTACT ── */
.chead{font-family:var(--serif);font-size:clamp(2.5rem,5vw,4.5rem);font-weight:400;line-height:1.15;margin-bottom:1rem;text-align:center}
.chead em{color:var(--gold);font-style:italic}
.csub{font-size:.86rem;color:var(--muted);margin-bottom:3rem;text-align:center;letter-spacing:.05em}
.clinks{display:flex;justify-content:center;gap:1.65rem;flex-wrap:wrap}
.clink{display:flex;align-items:center;gap:.7rem;text-decoration:none;color:var(--text);font-size:.84rem;border:.5px solid var(--rule);background:var(--s1);padding:.82rem 1.55rem;transition:border-color .25s,color .25s,box-shadow .25s;letter-spacing:.04em}
.clink:hover{border-color:var(--gold);color:var(--gold);box-shadow:var(--shadow)}
.clink svg{color:var(--gold)}
.cv-dl{background:var(--s2)!important;border-color:var(--gold)!important;flex-direction:column;align-items:center;gap:.5rem;padding:1.4rem 2rem;min-width:220px;text-align:center}
.cv-dl-top{display:flex;align-items:center;gap:.65rem;color:var(--gold);font-size:.8rem;letter-spacing:.18em;text-transform:uppercase;font-weight:500}
.cv-dl-sub{font-size:.68rem;color:var(--muted);letter-spacing:.1em;text-transform:uppercase}
.contact-mark{height:110px;width:auto;display:inline-block}

/* ── SVG PANELS (always dark — technical console framing) ── */
.svgbox{margin-bottom:3.5rem;border:.5px solid var(--rule);overflow:hidden;background:#0c0c0a;border-radius:2px}
.svghdr{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.72rem 1.2rem;border-bottom:.5px solid rgba(200,146,74,.25);background:#0c0c0a}
.svglbl{font-size:.61rem;letter-spacing:.22em;text-transform:uppercase;color:#c8924a}
.svgsub{font-size:.57rem;letter-spacing:.13em;text-transform:uppercase;color:rgba(200,146,74,.55)}
@media(max-width:768px){.svghdr{flex-direction:column;align-items:flex-start;gap:.2rem}}

/* ── TWO-COL ── */
.twocol{display:grid;grid-template-columns:1fr 1fr;gap:4rem;margin-bottom:3.5rem;align-items:start}
@media(max-width:768px){.twocol{grid-template-columns:1fr;gap:2rem}}
.bigq{font-family:var(--serif);font-size:clamp(1.3rem,2.2vw,1.8rem);font-weight:400;line-height:1.5}
.bigq em{color:var(--gold);font-style:italic}
.bodyp{font-size:.92rem;color:var(--body);line-height:1.85}
.bodyp p+p{margin-top:1rem}

/* ── FOOTER ── */
footer{padding:1.75rem 3.5rem;border-top:.5px solid var(--rule);display:flex;justify-content:space-between;align-items:center;gap:1rem;font-size:.7rem;color:var(--muted);letter-spacing:.1em}
footer .mark{height:56px;display:block;opacity:.9}
@media(max-width:768px){footer{padding:1.5rem;flex-direction:column;gap:.65rem;text-align:center}}

/* ── MOTION ── */
@keyframes glow-pulse{0%,100%{text-shadow:0 0 8px rgba(200,146,74,.12)}50%{text-shadow:0 0 28px rgba(200,146,74,.55),0 0 50px rgba(200,146,74,.18)}}
@keyframes float-orb{0%{transform:translate(0,0) scale(1)}33%{transform:translate(40px,-25px) scale(1.05)}66%{transform:translate(-15px,15px) scale(.97)}100%{transform:translate(0,0) scale(1)}}
@keyframes ticker-scroll{0%{transform:translateX(0)}100%{transform:translateX(-50%)}}
@keyframes beat{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
.hero-orb{position:absolute;border-radius:50%;pointer-events:none;filter:blur(70px)}
.hero-orb-1{width:480px;height:480px;top:5%;right:0%;background:radial-gradient(circle,rgba(176,127,44,.1) 0%,transparent 70%);animation:float-orb 14s ease-in-out infinite}
.hero-orb-2{width:280px;height:280px;bottom:10%;left:3%;background:radial-gradient(circle,rgba(30,107,133,.09) 0%,transparent 70%);animation:float-orb 18s ease-in-out infinite reverse}
html[data-theme="dark"] .hero-orb-1{background:radial-gradient(circle,rgba(200,146,74,.07) 0%,transparent 70%)}
html[data-theme="dark"] .hero-orb-2{background:radial-gradient(circle,rgba(80,184,212,.05) 0%,transparent 70%)}

/* stat bar */
.ssbar{display:grid;grid-template-columns:repeat(4,1fr);border:.5px solid var(--rule);margin-bottom:3.5rem;background:var(--rule)}
@media(max-width:768px){.ssbar{grid-template-columns:repeat(2,1fr)}}
.ssb{background:var(--s1);padding:1.4rem 1.25rem;position:relative;overflow:hidden;transition:background .2s}
.ssb:hover{background:var(--card-hover)}
.ssb::after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:linear-gradient(90deg,var(--gold),var(--gl),var(--gold))}
.ssb-n{font-family:var(--serif);font-size:2.1rem;font-weight:500;color:var(--gold);line-height:1;margin-bottom:.25rem}
html[data-theme="dark"] .ssb-n{color:var(--gl);font-weight:300;animation:glow-pulse 3s ease-in-out infinite}
.ssb-l{font-size:.62rem;letter-spacing:.15em;text-transform:uppercase;color:var(--muted);line-height:1.5}

/* deal ticker (always dark console) */
.ticker-wrap{background:#08080a;border:.5px solid var(--rule);padding:.55rem 0;overflow:hidden;margin-bottom:3rem;position:relative;border-radius:2px}
.ticker-wrap::before,.ticker-wrap::after{content:"";position:absolute;top:0;bottom:0;width:80px;z-index:2}
.ticker-wrap::before{left:0;background:linear-gradient(90deg,#08080a,transparent)}
.ticker-wrap::after{right:0;background:linear-gradient(-90deg,#08080a,transparent)}
.ticker-inner{display:flex;width:max-content;animation:ticker-scroll 40s linear infinite}
.ti{display:inline-flex;align-items:center;gap:.6rem;padding:0 2.5rem;font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;white-space:nowrap}
.ti-dot{width:4px;height:4px;border-radius:50%;background:#c8924a;flex-shrink:0}
.ti-hi{color:#e8b472;font-weight:400}
.ti-dim{color:#8a7f6a}
.ti-green{color:rgba(80,200,100,.85);font-weight:400}

/* CRM bars */
.crm-bar-bg{height:8px;background:var(--s2);border-radius:4px;margin:.4rem 0 .15rem}
.crm-bar-fill{height:8px;border-radius:4px;background:linear-gradient(90deg,var(--gold),var(--gl))}
.beat{animation:beat 2.5s ease-in-out infinite}

/* 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}
}
