/* ===== ROOT & RESET ===== */
:root {
  --bg: #07080a;
  --surface: #0d0f12;
  --line: #1d2025;
  --text: #f0f0ec;
  --muted: #6a6d72;
  --gold: #f0b84b;
  --gold2: #ffd477;
  --gold-glow: rgba(240,184,75,.15);
  --green: #4ade80;
  --max: 1160px;
  --ease: cubic-bezier(.16,1,.3,1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
.container { width: min(calc(100% - 48px), var(--max)); margin: auto; }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold2), var(--gold));
  background-size: 200% 100%;
  animation: shimmerBar 2s linear infinite;
  z-index: 9999;
  box-shadow: 0 0 10px var(--gold), 0 0 20px rgba(240,184,75,.4);
  transition: width .08s linear;
}
@keyframes shimmerBar { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* ===== CUSTOM CURSOR ===== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 5px; height: 5px;
  background: var(--gold2);
  box-shadow: 0 0 8px var(--gold2);
  transition: transform .1s;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(240,184,75,.45);
  transition: width .35s var(--ease), height .35s var(--ease), border-color .3s, background .3s;
}
body.c-hover .cursor-ring {
  width: 52px; height: 52px;
  border-color: var(--gold2);
  background: rgba(240,184,75,.05);
}
body.c-hover .cursor-dot { transform: translate(-50%,-50%) scale(1.6); }

/* ===== SCROLL REVEAL ===== */
.reveal-item {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal-item.in { opacity: 1; transform: none; }

.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.scroll-reveal.in { opacity: 1; transform: none; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7,8,10,.8);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.nav { height: 76px; display: flex; align-items: center; gap: 30px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  width: 34px; height: 34px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold);
  font-size: .7rem; font-weight: 900; letter-spacing: -.05em;
  box-shadow: 0 0 14px rgba(240,184,75,.18);
  transition: box-shadow .3s;
}
.brand:hover .brand-mark { box-shadow: 0 0 22px rgba(240,184,75,.35); }
.brand-name { font-size: .73rem; font-weight: 850; letter-spacing: .08em; }
.nav-links { display: flex; gap: 30px; color: #aeb0b2; font-size: .83rem; }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-cta {
  border: 1px solid #805f25;
  padding: 10px 17px;
  border-radius: 999px;
  font-size: .8rem; font-weight: 800;
  color: var(--gold2);
  transition: background .25s, box-shadow .25s;
}
.nav-cta:hover { background: rgba(240,184,75,.08); box-shadow: 0 0 22px rgba(240,184,75,.18); color: var(--gold2); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 70px;
  padding-top: 75px;
  padding-bottom: 90px;
  overflow: hidden;
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.hero-orb {
  position: absolute;
  width: 800px; height: 800px;
  top: 50%; left: -15%;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(240,184,75,.055) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
  animation: orbPulse 5s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { transform: translateY(-50%) scale(1); opacity: 1; }
  50% { transform: translateY(-50%) scale(1.08); opacity: .7; }
}
.hero-copy, .hero-visual { position: relative; z-index: 1; }
.eyebrow {
  font-size: .66rem; letter-spacing: .19em; font-weight: 850;
  color: var(--gold); margin-bottom: 18px;
}

/* hero title line-by-line reveal */
.hero-title {
  font-size: clamp(3.2rem, 6.2vw, 6.25rem);
  line-height: .93;
  letter-spacing: -.075em;
  display: flex; flex-direction: column; gap: .04em;
}
.title-line { display: block; overflow: hidden; }
.hero h1 em, .section h2 em, .contact-card h2 em {
  font-style: normal; color: var(--gold);
}
.hero-lead {
  max-width: 650px; color: #aeb0b2;
  font-size: 1.08rem; margin: 29px 0 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.button {
  display: inline-flex; gap: 14px; align-items: center;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: .82rem; font-weight: 850;
  transition: transform .2s var(--ease), box-shadow .25s, background .2s;
  cursor: none;
  will-change: transform;
}
.button-primary {
  background: var(--gold); color: #0a0a0a;
}
.button-primary:hover {
  background: var(--gold2); color: #0a0a0a;
  box-shadow: 0 0 28px rgba(240,184,75,.45), 0 10px 30px rgba(0,0,0,.3);
}
.button-ghost {
  border: 1px solid #3a3d40; color: var(--text);
}
.button-ghost:hover { border-color: var(--gold); color: var(--gold2); }

.social-row {
  display: flex; gap: 20px; margin-top: 27px;
  flex-wrap: wrap; font-size: .78rem; color: #898c8f;
}
.social-row a { transition: color .2s; }
.social-row a:hover { color: var(--gold2); }

/* ===== HERO VISUAL ===== */
.hero-visual { position: relative; }
.code-window {
  border: 1px solid #2a2e34;
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(145deg, #111417, #0b0d0f);
  box-shadow: 0 40px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03);
  transition: box-shadow .3s;
}
.code-window:hover {
  box-shadow: 0 50px 100px rgba(0,0,0,.6), 0 0 0 1px rgba(240,184,75,.1), 0 0 40px rgba(240,184,75,.05);
}
.window-top {
  height: 44px; border-bottom: 1px solid #24282b;
  display: flex; align-items: center;
  padding: 0 15px; gap: 7px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.filename { font: 700 .7rem ui-monospace, SFMono-Regular, Menlo, monospace; color: #676b70; margin-left: 9px; }
.code-window pre {
  margin: 0; padding: 28px 32px;
  font: 500 .86rem/2.1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #c4c8cb;
  min-height: 200px;
}
.kw { color: #c084fc; }
.fn { color: #60a5fa; }
.str { color: #fb923c; }
.val { color: #4ade80; }

.floating-note {
  position: absolute; bottom: -27px; right: -18px;
  background: #101315; border: 1px solid #40351f;
  border-radius: 10px; padding: 13px 17px;
  font: 600 .72rem ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #bbb;
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
}
.note-dot { color: var(--green); margin-right: 7px; }
.cursor-blink { color: var(--gold); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.badge-float {
  position: absolute;
  background: rgba(13,15,18,.92);
  border: 1px solid #262b31;
  border-radius: 8px; padding: 7px 13px;
  font-size: .68rem; font-weight: 700;
  color: #b0b4b8;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  animation: floatBadge 3.5s ease-in-out infinite;
}
.badge-1 { top: -18px; left: -24px; animation-delay: 0s; }
.badge-2 { top: 28%; right: -28px; animation-delay: 1.8s; }
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ===== SIGNAL STRIP (MARQUEE) ===== */
.signal-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #0b0d10;
  overflow: hidden; position: relative;
}
.strip-scroll-wrap { overflow: hidden; white-space: nowrap; }
.strip-track {
  display: inline-flex; gap: 0;
  animation: marquee 28s linear infinite;
}
.strip-track span {
  padding: 16px 32px;
  color: #52565b;
  font: 700 .62rem ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  border-right: 1px solid var(--line);
  transition: color .3s;
}
.strip-track span:hover { color: var(--gold); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== SECTIONS ===== */
.section { padding: 125px 0; }
.section-dark { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section h2, .contact-card h2 {
  font-size: clamp(2.2rem, 4.2vw, 4rem);
  line-height: 1; letter-spacing: -.06em;
}
.text-link { font-size: .78rem; color: var(--gold2); font-weight: 800; white-space: nowrap; }
.text-link:hover { color: var(--gold2); text-shadow: 0 0 16px rgba(255,212,119,.5); }
.section-note { max-width: 720px; color: #777b7e; font-size: .9rem; margin: 20px 0 42px; }

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.project {
  min-height: 345px; padding: 25px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #0c0e10;
  display: flex; gap: 22px;
  position: relative; overflow: hidden;
  transition: border-color .3s, box-shadow .3s, transform .08s linear;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-spotlight {
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--sx,50%) var(--sy,50%), rgba(240,184,75,.07), transparent 55%);
  opacity: 0; pointer-events: none;
  transition: opacity .4s;
}
.project:hover .project-spotlight { opacity: 1; }
.project:hover {
  border-color: #5b4b2b;
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(240,184,75,.08);
}
.project-featured { background: linear-gradient(145deg, #121416, #0c0e10); }
.project-number { font: 700 .7rem ui-monospace; color: #555; min-width: 22px; }
.project-content { display: flex; flex-direction: column; width: 100%; }
.tag { color: var(--gold); font-size: .63rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.project h3 { font-size: 1.45rem; letter-spacing: -.04em; margin: 38px 0 9px; }
.project p { color: #8f9295; font-size: .84rem; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: auto; padding-top: 24px; }
.chips span {
  font: 600 .62rem ui-monospace; color: #6f7478;
  border: 1px solid #2a2e32; border-radius: 999px;
  padding: 4px 9px;
  transition: border-color .2s, color .2s;
}
.project:hover .chips span { border-color: #3d3320; color: #a09060; }
.project a { font-size: .76rem; color: var(--gold2); font-weight: 800; margin-top: 17px; }
.project a:hover { text-shadow: 0 0 14px rgba(255,212,119,.5); }

.github-note {
  display: flex; align-items: center; gap: 18px;
  margin-top: 18px;
  border: 1px dashed #2d3136;
  border-radius: 13px; padding: 18px 20px;
  color: #8b8f92;
  transition: border-color .3s, background .3s;
}
.github-note:hover { border-color: #5b4b2b; background: rgba(240,184,75,.02); }
.github-symbol {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #33383d; display: grid; place-items: center;
  color: #ccc; flex-shrink: 0;
}
.github-note strong { color: #d6d7d7; font-size: .82rem; }
.github-note p { font-size: .74rem; margin: 3px 0 0; }
.github-note a { margin-left: auto; color: var(--gold2); font-size: .74rem; font-weight: 800; white-space: nowrap; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.about-copy { max-width: 690px; color: #a6a9ab; font-size: 1rem; }
.about-copy p { margin: 0 0 22px; }
.journey-line {
  display: flex; align-items: center; gap: 14px;
  border-top: 1px solid #292d30; border-bottom: 1px solid #292d30;
  padding: 18px 0; margin-top: 34px;
  font: 800 .66rem ui-monospace; letter-spacing: .1em;
}
.jstep {
  color: #e1e2df; padding: 5px 10px; border-radius: 5px;
  transition: color .25s, background .25s;
}
.jstep:hover { color: var(--gold); background: rgba(240,184,75,.08); }
.jarr { color: var(--gold); font-size: .9rem; }

/* ===== WORK TOGETHER ===== */
.work-intro { margin-bottom: 40px; }
.work-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.work-grid article {
  padding: 30px 28px 34px 0;
  border-right: 1px solid var(--line);
  transition: background .3s;
}
.work-grid article:not(:first-child) { padding-left: 28px; }
.work-grid article:last-child { border-right: 0; }
.work-grid article:hover { background: rgba(240,184,75,.018); }
.work-grid span { color: #555; font: 700 .7rem ui-monospace; }
.work-grid h3 { font-size: 1.2rem; letter-spacing: -.03em; margin: 28px 0 8px; }
.work-grid p { color: #85898c; font-size: .84rem; }
.soft-cta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 21px 0; color: #686d70; font-size: .8rem;
}
.soft-cta a { color: var(--gold2); font-weight: 800; }
.soft-cta a:hover { text-shadow: 0 0 14px rgba(255,212,119,.4); }

/* ===== CONTACT ===== */
.contact-section {
  padding-top: 70px; padding-bottom: 90px;
  background: linear-gradient(180deg, #08090a, #0d0f11);
}
.contact-card {
  display: grid; grid-template-columns: 1.15fr .85fr;
  min-height: 535px;
  border: 1px solid #4a3a1d;
  border-radius: 22px; overflow: hidden;
  background: radial-gradient(circle at 18% 22%, rgba(240,184,75,.09), transparent 32%), #0c0f11;
  position: relative;
}
.contact-card::before {
  content: "";
  position: absolute; inset: 0; border-radius: 22px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(240,184,75,.18), transparent 45%, rgba(240,184,75,.06) 100%);
  opacity: 0;
  transition: opacity .5s;
}
.contact-card:hover::before { opacity: 1; }
.contact-copy { padding: 58px; }
.contact-card p { max-width: 610px; color: #969a9d; font-size: .92rem; margin: 24px 0 28px; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-method {
  display: flex; flex-direction: column;
  border: 1px solid #292e32; border-radius: 11px;
  padding: 13px 16px; min-width: 215px;
  background: #0e1113;
  transition: border-color .3s, box-shadow .3s;
  color: inherit;
}
.contact-method:hover {
  border-color: #5b4b2b;
  box-shadow: 0 0 22px rgba(240,184,75,.1);
  color: inherit;
}
.contact-method small { font-size: .63rem; color: #777c80; text-transform: uppercase; letter-spacing: .12em; }
.contact-method strong { font-size: .76rem; margin-top: 4px; }
.contact-button { margin-top: 24px; }
.contact-photo-wrap { position: relative; min-height: 535px; overflow: hidden; }
.contact-photo { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; filter: saturate(.9); }
.contact-photo-wrap::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg,#0c0f11 0%,transparent 38%), linear-gradient(0deg,rgba(0,0,0,.65),transparent 45%);
}
.photo-caption {
  position: absolute; z-index: 2;
  bottom: 28px; right: 28px; text-align: right;
  font-size: .72rem; font-weight: 850; letter-spacing: .04em;
}
.photo-caption span { color: #b8bbbd; font-weight: 500; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 35px;
  display: grid; grid-template-columns: 1.5fr 1fr .7fr;
  align-items: center; gap: 20px; color: #686d70;
}
.footer-brand { display: flex; gap: 11px; align-items: center; }
.footer-brand strong { display: block; color: #d0d1d0; font-size: .67rem; letter-spacing: .08em; }
.footer-brand small { display: block; font-size: .65rem; margin-top: 2px; }
.footer-links { display: flex; justify-content: center; gap: 18px; font-size: .7rem; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--gold2); }
.copyright { text-align: right; font-size: .65rem; }

/* ===== 3D TILT CARD ===== */
.tilt-card { transform-style: preserve-3d; }

/* ===== MAGNETIC ===== */
.magnetic { transition: transform .35s var(--ease), box-shadow .25s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 85px; }
  .hero-visual { max-width: 700px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project { min-height: 260px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-grid article, .work-grid article:not(:first-child) {
    border-right: 0; padding: 26px 0; border-bottom: 1px solid var(--line);
  }
  .work-grid article:last-child { border-bottom: 0; }
  .about-grid, .contact-card { grid-template-columns: 1fr; }
  .contact-photo-wrap { min-height: 500px; }
  .footer { grid-template-columns: 1fr 1fr; }
  .copyright { text-align: left; }
}
@media (max-width: 700px) {
  .container { width: min(calc(100% - 30px), var(--max)); }
  .nav { height: 68px; }
  .brand-name, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 15px; right: 15px;
    padding: 15px; background: #111416; border: 1px solid var(--line);
    border-radius: 12px; flex-direction: column; gap: 14px; z-index: 50;
  }
  .nav-links.open { display: flex; }
  .hero-title { font-size: clamp(3rem, 15vw, 5rem); }
  .hero-lead { font-size: 1rem; }
  .badge-1, .badge-2 { display: none; }
  .section { padding: 90px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .github-note { align-items: start; flex-wrap: wrap; }
  .github-note a { margin-left: 52px; }
  .contact-copy { padding: 36px 27px; }
  .contact-card h2 { font-size: 2.4rem; }
  .contact-photo-wrap { min-height: 430px; }
  .footer { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .copyright { text-align: left; }
  /* restore cursor on touch */
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
  .nav-toggle, a, button { cursor: pointer; }
}
