/* ===== Colours: change these and the whole site changes ===== */
:root {
  --bg: #0a0e1a;          /* midnight ink */
  --bg2: #111830;         /* raised panels */
  --line: #25304f;        /* thin borders */
  --text: #ece8dd;        /* ivory */
  --muted: #9aa3bd;       /* soft grey-blue */
  --gold: #c9a45c;        /* classic brass */
  --ice: #7fd6ff;         /* futuristic glow */
  --lime: #b6f23c;        /* fresh accent, used sparingly */
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  font-family: var(--sans);
  color: var(--text);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 100%,
    var(--bg);
  background-blend-mode: soft-light, soft-light, normal;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--gold); color: #000; padding: .5rem 1rem; z-index: 99; }

/* ===== Ambient depth: drifting light + cursor spotlight + scroll line ===== */
.aurora, .spot { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.aurora { overflow: hidden; }
.aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; animation: drift 30s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { top: -22vmax; right: -16vmax; background: radial-gradient(closest-side, rgba(127,214,255,.14), transparent); }
.aurora i:nth-child(2) { bottom: -26vmax; left: -20vmax; background: radial-gradient(closest-side, rgba(201,164,92,.13), transparent); animation-duration: 38s; }
.aurora i:nth-child(3) { top: 38%; left: 42%; width: 40vmax; height: 40vmax; background: radial-gradient(closest-side, rgba(182,242,60,.055), transparent); animation-duration: 46s; }
.spot { background: radial-gradient(440px circle at var(--mx, 70%) var(--my, 25%), rgba(127,214,255,.09), rgba(182,242,60,.035) 45%, transparent 72%); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--gold), var(--ice), var(--lime)); }

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem clamp(1rem, 5vw, 4rem);
  background: rgba(10,14,26,.78); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .75rem; }

/* Logo and brand name: your SVGs are used as "stencils" (masks),
   so the colour comes from CSS. Change the background below to recolour them. */
.logo-mark {
  display: block; width: 36px; aspect-ratio: 1; background: var(--gold);
  -webkit-mask: url(logo.svg) center / contain no-repeat;
          mask: url(logo.svg) center / contain no-repeat;
}
.wordmark {
  display: block; height: 20px; aspect-ratio: 1100 / 190; background: var(--text);
  -webkit-mask: url(brand-name.svg) left center / contain no-repeat;
          mask: url(brand-name.svg) left center / contain no-repeat;
}
.links { display: flex; gap: 1.8rem; font-size: .95rem; color: var(--muted); }
.links a { padding: .3rem 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.links a:hover, .links a.active { color: var(--text); border-color: var(--gold); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); padding: .4rem .9rem; border-radius: 999px; font: inherit; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  min-height: calc(100vh - 66px);
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 2rem;
  padding: 4rem clamp(1rem, 5vw, 4rem);
  max-width: 1300px; margin: 0 auto;
}
.status { display: inline-flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .95rem; border: 1px solid var(--line); padding: .35rem .9rem; border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 2.4s ease-in-out infinite; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(3.4rem, 9vw, 7rem); line-height: .98; margin: 1.4rem 0 1rem; letter-spacing: -.01em; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; }
.js .ch { display: inline-block; transform: translateY(115%); animation: up .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 65ms + .25s); }
.roles { font-size: 1.35rem; color: var(--gold); min-height: 2rem; }
.caret { display: inline-block; width: 2px; height: 1.2em; background: var(--ice); margin-left: 4px; vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
.lead { max-width: 34rem; margin: 1.4rem 0 2rem; color: var(--muted); font-size: 1.1rem; }
.cta { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn { display: inline-block; padding: .8rem 1.6rem; border: 1px solid var(--gold); border-radius: 999px; font: inherit; font-weight: 500; color: var(--text); background: transparent; cursor: pointer; transition: background .25s, box-shadow .25s, color .25s, transform .2s ease-out; }
.btn:hover { box-shadow: 0 0 24px rgba(201,164,92,.35); }
.btn.primary { background: var(--gold); color: #14100a; }
.btn.primary:hover { box-shadow: 0 0 30px rgba(201,164,92,.5), 0 0 60px rgba(182,242,60,.18); }

/* Emblem: framed like a blueprint, with moving rings */
.emblem { position: relative; width: min(100%, 440px); aspect-ratio: 1; justify-self: center; }
.brk {
  position: absolute; inset: -6%; pointer-events: none;
  --c: var(--gold);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 24px 1px no-repeat, linear-gradient(var(--c), var(--c)) 0 0 / 1px 24px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 24px 1px no-repeat, linear-gradient(var(--c), var(--c)) 100% 0 / 1px 24px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 24px 1px no-repeat, linear-gradient(var(--c), var(--c)) 0 100% / 1px 24px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 24px 1px no-repeat, linear-gradient(var(--c), var(--c)) 100% 100% / 1px 24px no-repeat;
}
.cap { position: absolute; left: 0; right: 0; bottom: -13%; text-align: center; color: var(--muted); font-size: .85rem; letter-spacing: .04em; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.r1 { color: var(--ice); opacity: .7; animation: spin 60s linear infinite; }
.r2 { color: var(--gold); animation: spin 90s linear infinite reverse; }
.r3 { color: var(--ice); opacity: .6; animation: spin 40s linear infinite; }
.orb { fill: var(--lime); filter: drop-shadow(0 0 6px var(--lime)); }
.core { position: absolute; inset: 27%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--bg2); border: 1px solid var(--gold); box-shadow: 0 0 60px rgba(127,214,255,.25), inset 0 0 30px rgba(0,0,0,.5); animation: breathe 5s ease-in-out infinite; }
.core .logo-mark { width: 58%; background: linear-gradient(135deg, var(--ice), var(--gold)); }

/* ===== Sections ===== */
.section { max-width: 1100px; margin: 0 auto; padding: 5.5rem clamp(1rem, 5vw, 4rem); }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 2.2rem; display: flex; align-items: center; gap: 1.2rem; }
h2::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--gold); transform: rotate(45deg); flex: none; }
h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); transform-origin: left; }
.js h2::after { transform: scaleX(0); transition: transform 1.4s cubic-bezier(.2,.7,.2,1) .25s; }
.js h2.in::after { transform: scaleX(1); }
.sub { color: var(--muted); margin: -1rem 0 2rem; max-width: 40rem; }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 110ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.done { transition: border-color .25s, box-shadow .25s, transform .15s ease-out; transition-delay: 0s; }

.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; }
.prose p { margin-bottom: 1rem; max-width: 40rem; font-size: 1.05rem; }
.pull { display: flex; align-items: center; gap: 1.6rem; margin-top: 2rem; }
.pull blockquote { font-family: var(--serif); font-style: italic; font-size: 1.55rem; line-height: 1.3; color: var(--gold); max-width: 24rem; }
.seal { position: relative; width: 130px; aspect-ratio: 1; flex: none; display: grid; place-items: center; }
.seal svg { position: absolute; inset: 0; animation: spin 40s linear infinite; }
.seal text { font: 500 11.5px var(--sans); fill: var(--muted); }
.seal .logo-mark { width: 38%; }
.facts { border-left: 1px solid var(--line); padding-left: 2rem; display: grid; gap: 1.1rem; align-content: start; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { font-family: var(--serif); font-size: 1.35rem; }

/* Timeline */
.timeline { list-style: none; padding: 0; border-left: 1px solid var(--gold); margin-left: .5rem; }
.timeline li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 0 0 2.2rem 1.6rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .55rem; width: 9px; height: 9px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 10px var(--ice); transition: background .3s, box-shadow .3s; }
.timeline li:hover::before { background: var(--lime); box-shadow: 0 0 14px var(--lime); }
.timeline time { font-family: var(--serif); font-size: 1.6rem; color: var(--gold); }
.timeline h3 { font-family: var(--serif); font-size: 1.5rem; }
.by { color: var(--ice); font-size: .9rem; margin-bottom: .3rem; }

/* Projects */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.6rem; perspective: 1200px; }
.card { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .25s, box-shadow .25s, transform .15s ease-out; }
.card:hover { border-color: var(--gold); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 50%), rgba(182,242,60,.10), rgba(127,214,255,.06) 40%, transparent 70%); }
.card:hover::after { opacity: 1; }
.badge { position: absolute; top: .8rem; left: .8rem; z-index: 2; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); border: 1px solid var(--lime); background: rgba(10,14,26,.75); padding: .12rem .6rem; border-radius: 4px; }
.card .shot { aspect-ratio: 16/10; background: #0d1326; display: grid; place-items: center; color: var(--muted); border-bottom: 1px solid var(--line); overflow: hidden; font-family: var(--serif); font-style: italic; font-size: 1.5rem; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .shot img { transform: scale(1.05); }
.card .body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card h3 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.card p { color: var(--muted); font-size: .97rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags span { font-size: .78rem; color: var(--ice); border: 1px solid var(--line); padding: .1rem .6rem; border-radius: 999px; }
.card .actions { display: flex; gap: 1.2rem; margin-top: .4rem; }
.card .actions a { color: var(--gold); border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.card .actions a::after { content: " ↗"; }
.card .actions a:hover { border-color: var(--gold); color: var(--text); }

/* Skills */
.marquee { overflow: hidden; margin-bottom: 3rem; border-block: 1px solid var(--line); padding: 1.1rem 0; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; gap: 2.6rem; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track span { font-family: var(--serif); font-size: 1.9rem; font-style: italic; color: var(--text); white-space: nowrap; display: flex; align-items: center; gap: 2.6rem; }
.track span::after { content: ""; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2.5rem; }
.skill-group h3 { font-family: var(--serif); font-size: 1.5rem; color: var(--gold); margin-bottom: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips b { font-weight: 500; border: 1px solid var(--line); padding: .35rem .9rem; border-radius: 999px; transition: border-color .2s, color .2s; }
.chips b:hover { border-color: var(--lime); color: var(--lime); }

/* Contact */
.contact { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; }
form { display: grid; gap: 1.1rem; }
label { display: grid; gap: .4rem; color: var(--muted); font-size: .9rem; }
input, textarea { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px rgba(127,214,255,.15); }
form .btn { justify-self: start; }
.socials { display: grid; gap: .9rem; align-content: start; }
.socials p { color: var(--muted); }
.socials a { display: flex; justify-content: space-between; padding: .9rem 1.2rem; border: 1px solid var(--line); border-radius: 8px; transition: border-color .2s, padding-left .2s, background .2s; }
.socials a::after { content: "↗"; color: var(--gold); }
.socials a:hover { border-color: var(--gold); padding-left: 1.6rem; background: rgba(201,164,92,.05); }

.foot { text-align: center; padding: 2.5rem 1rem 3rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .9rem; }

/* ===== Animations ===== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes up { to { transform: none; } }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@keyframes breathe { 50% { box-shadow: 0 0 90px rgba(127,214,255,.38), 0 0 30px rgba(182,242,60,.12), inset 0 0 30px rgba(0,0,0,.5); } }
@keyframes marquee { to { transform: translateX(-50%); } }
.hero-text, .emblem { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.emblem { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ===== Mobile ===== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 3rem; }
  .emblem { width: min(74%, 320px); order: -1; margin-bottom: 2rem; }
  .about, .contact { grid-template-columns: 1fr; gap: 2rem; }
  .facts { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 1.5rem; }
  .menu-btn { display: block; }
  .links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem clamp(1rem, 5vw, 4rem) 1rem; }
  .links.open { display: flex; }
  .links a { padding: .8rem 0; }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; }
  .pull { flex-direction: column; align-items: flex-start; }
}

/* Respect people who prefer no motion: everything stays visible and still */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .ch, .js .reveal { transform: none; opacity: 1; }
  .js h2::after { transform: none; }
  .track { flex-wrap: wrap; width: auto; }
}


/* Footer links (Terms and Privacy) */
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.6rem; margin-bottom: .8rem; }
.foot nav a { color: var(--text); border-bottom: 1px solid transparent; transition: border-color .2s; }
.foot nav a:hover { border-color: var(--gold); }