:root {
  --bg: #07070a;
  --ink: #f5f3ef;
  --muted: rgba(245,243,239,.65);
  --line: rgba(255,255,255,.13);
  --glass: rgba(14,14,18,.62);
  --gold: #ecca94;
  --gold-soft: rgba(236,202,148,.14);
  --light: #edf4f2;
  --light-ink: #17272b;
  --light-muted: rgba(23,39,43,.64);
  --teal: #1f6f78;
  --purple: #5b4b9e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Space Grotesk', sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; overflow-x: hidden; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.video-background { position: fixed; inset: 0; z-index: -10; overflow: hidden; background: #050507; }
.video-background video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.78) contrast(1.05) brightness(.75); transform: translateZ(0); backface-visibility: hidden; }
.performance-lite .video-background video { filter: brightness(.78); }
.video-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,3,6,.58), rgba(3,3,6,.34) 35%, rgba(3,3,6,.74)); }
.grain { position: absolute; inset: 0; opacity: .08; background-image: radial-gradient(rgba(255,255,255,.6) .7px, transparent .7px); background-size: 5px 5px; mix-blend-mode: soft-light; pointer-events: none; }

.site-shell { position: relative; z-index: 1; min-height: 100vh; }
.navbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3.5rem); background: rgba(7,7,10,.42); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; min-width: max-content; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(236,202,148,.65); border-radius: 12px; color: var(--gold); font-weight: 700; }
.brand-name { font-weight: 700; letter-spacing: -.02em; }
.top-nav { display: flex; align-items: center; gap: 1.2rem; }
.top-nav a { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; color: rgba(255,255,255,.72); text-decoration: none; letter-spacing: .08em; text-transform: uppercase; transition: color .2s ease; }
.top-nav a:hover { color: var(--gold); }
.social-icons { display: flex; gap: .8rem; }
.social-icons a { color: rgba(255,255,255,.72); width: 28px; height: 28px; display: grid; place-items: center; text-decoration: none; transition: transform .2s ease, color .2s ease; }
.social-icons a:hover { color: var(--gold); transform: translateY(-2px); }

.hero { min-height: 92vh; padding: clamp(5rem, 12vw, 9rem) clamp(1.2rem, 8vw, 7rem) 5rem; display: flex; flex-direction: column; justify-content: center; max-width: 1500px; margin: 0 auto; }
.hero-content { max-width: 920px; }
.eyebrow, .section-kicker, .mini-label, .work-topline { font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: .14em; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; color: rgba(255,255,255,.62); font-size: .7rem; margin-bottom: 1.4rem; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #79d3ae; box-shadow: 0 0 0 5px rgba(121,211,174,.11), 0 0 14px rgba(121,211,174,.7); }
.hero h1 { font-size: clamp(3.2rem, 10vw, 7.7rem); line-height: .95; letter-spacing: -.06em; max-width: 880px; background: linear-gradient(135deg, #fff, #d9b98f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-motto { margin-top: 1rem; color: var(--gold); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: clamp(.8rem, 1.8vw, 1rem); }
.hero-intro { max-width: 660px; color: rgba(255,255,255,.75); font-size: 1.06rem; margin-top: 1.35rem; }
.hero-actions { display: flex; gap: .8rem; margin-top: 2rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .65rem; padding: .88rem 1.15rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); text-decoration: none; font-weight: 600; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #121215; }
.btn-primary:hover { background: var(--gold); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--ink); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgba(236,202,148,.45); }
.hero-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; margin-top: 6rem; gap: 1rem; }
.hero-meta div { border-top: 1px solid rgba(255,255,255,.2); padding-top: .7rem; }
.hero-meta span { display: block; font: .65rem 'IBM Plex Mono', monospace; color: rgba(255,255,255,.42); margin-bottom: .3rem; }
.hero-meta strong { font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.86); }

.section { scroll-margin-top: 84px; padding: clamp(4rem, 8vw, 7.5rem) clamp(1.2rem, 6vw, 6rem); }
.section-dark { color: var(--ink); background: rgba(8,8,12,.78); border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(15px); }
.section-light { color: var(--light-ink); background: linear-gradient(160deg, rgba(238,246,244,.97), rgba(223,237,235,.96)); }
.section-heading { max-width: 1180px; margin: 0 auto 2.8rem; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 3rem; align-items: end; }
.section-kicker { display: inline-block; font-size: .7rem; color: var(--gold); margin-bottom: .8rem; }
.section-light .section-kicker { color: var(--teal); }
.section-heading h2 { font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1; letter-spacing: -.045em; }
.section-heading > p { color: var(--muted); max-width: 620px; justify-self: end; }
.section-light .section-heading > p { color: var(--light-muted); }

.about-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.about-card { padding: 1.5rem; min-height: 220px; border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 24px; }
.about-highlight { background: linear-gradient(140deg, rgba(236,202,148,.13), rgba(255,255,255,.03)); border-color: rgba(236,202,148,.22); }
.mini-label { color: rgba(255,255,255,.38); font-size: .65rem; margin-bottom: 2rem; }
.about-card h3 { font-size: 1.45rem; line-height: 1.1; margin-bottom: .8rem; }
.about-card p { color: var(--muted); }
.section-light .about-card { border-color: rgba(23,39,43,.12); background: rgba(255,255,255,.44); }
.section-light .mini-label { color: rgba(23,39,43,.42); }
.section-light .about-card p { color: var(--light-muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag-list span { font: .68rem 'IBM Plex Mono', monospace; padding: .42rem .58rem; border: 1px solid currentColor; opacity: .72; border-radius: 999px; }

.carousel-shell { position: relative; max-width: 1180px; margin: 0 auto; }
.carousel-controls { display: flex; justify-content: flex-end; gap: .55rem; margin-bottom: .9rem; }
.carousel-btn { width: 42px; height: 42px; border: 1px solid rgba(23,39,43,.16); border-radius: 50%; background: rgba(255,255,255,.42); color: var(--light-ink); cursor: pointer; display: grid; place-items: center; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
.carousel-btn:hover { transform: translateY(-2px); background: var(--light-ink); color: #fff; border-color: var(--light-ink); }
.card-carousel { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgba(23,39,43,.3) transparent; padding: .1rem .1rem .9rem; cursor: grab; }
.card-carousel:active { cursor: grabbing; }
.card-carousel::-webkit-scrollbar { height: 8px; }
.card-carousel::-webkit-scrollbar-track { background: transparent; }
.card-carousel::-webkit-scrollbar-thumb { background: rgba(23,39,43,.22); border-radius: 999px; }
.work-carousel { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgba(23,39,43,.3) transparent; padding: .1rem .1rem .9rem; cursor: grab; }
.work-carousel:active { cursor: grabbing; }
.work-carousel::-webkit-scrollbar { height: 8px; }
.work-carousel::-webkit-scrollbar-track { background: transparent; }
.work-carousel::-webkit-scrollbar-thumb { background: rgba(23,39,43,.22); border-radius: 999px; }
.work-card { flex: 0 0 calc((100% - 2rem) / 3); min-width: 290px; scroll-snap-align: start; border: 1px solid rgba(23,39,43,.12); border-radius: 26px; overflow: hidden; background: rgba(255,255,255,.55); box-shadow: 0 15px 40px rgba(30,50,55,.06); transition: transform .25s ease, box-shadow .25s ease; text-decoration: none; color: inherit; display: block; }
.work-card:hover { transform: translateY(-6px); box-shadow: 0 25px 55px rgba(30,50,55,.12); }
.work-image { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, #13262a, #2b5358); text-decoration: none; }
.work-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.work-card:hover .work-image img { transform: scale(1.04); }
.work-image.placeholder, .activity-image.placeholder { display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, rgba(51,199,181,.35), transparent 45%), linear-gradient(135deg, #193338, #10191b); }
.placeholder-mark { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 700; letter-spacing: -.08em; color: rgba(255,255,255,.85); }
.image-arrow { position: absolute; right: .8rem; top: .8rem; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.38); color: white; backdrop-filter: blur(8px); }
.work-body { padding: 1.35rem; }
.work-topline { display: flex; justify-content: space-between; gap: .8rem; font-size: .62rem; color: rgba(23,39,43,.48); margin-bottom: .8rem; }
.work-body h3, .activity-body h3 { font-size: 1.35rem; letter-spacing: -.025em; margin-bottom: .55rem; }
.work-body p, .activity-body p { color: var(--light-muted); font-size: .9rem; margin-bottom: 1rem; }
.work-body .tag-list span { color: var(--teal); }

.skill-card { flex: 0 0 calc((100% - 3rem) / 4); min-width: 250px; scroll-snap-align: start; border: 1px solid rgba(255,255,255,.11); border-radius: 26px; overflow: hidden; background: linear-gradient(150deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); color: var(--ink); text-decoration: none; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.skill-card:hover { transform: translateY(-6px); border-color: rgba(236,202,148,.34); box-shadow: 0 22px 52px rgba(0,0,0,.22); }
.skill-image, .activity-image { aspect-ratio: 16/10; overflow: hidden; position: relative; background: linear-gradient(135deg, #1b3034, #111719); }
.skill-image img, .activity-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.skill-card:hover .skill-image img, .activity-card:hover .activity-image img { transform: scale(1.04); }
.skill-image.placeholder, .activity-image.placeholder { display: grid; place-items: center; background: radial-gradient(circle at 25% 20%, rgba(51,199,181,.34), transparent 43%), linear-gradient(135deg, #193338, #10191b); }
.skill-body { padding: 1.25rem; }
.skill-body h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.skill-body p { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.skill-progress { height: 6px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; margin-top: .9rem; }
.skill-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1f6f78, #33c7b5); }

.activity-card { flex: 0 0 calc((100% - 3rem) / 4); min-width: 250px; scroll-snap-align: start; overflow: hidden; border: 1px solid rgba(23,39,43,.12); border-radius: 26px; background: rgba(255,255,255,.5); color: inherit; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; display: block; }
.activity-card:hover { transform: translateY(-6px); box-shadow: 0 22px 52px rgba(30,50,55,.10); }
.activity-body { padding: 1.35rem; }

.contact-section { scroll-margin-top: 84px; padding: clamp(4rem, 8vw, 7rem) clamp(1.2rem, 6vw, 6rem); background: rgba(7,7,10,.82); }
.contact-card { max-width: 920px; margin: 0 auto; text-align: center; padding: clamp(2rem, 6vw, 4rem); border: 1px solid rgba(236,202,148,.2); border-radius: 34px; background: radial-gradient(circle at 50% 0%, rgba(236,202,148,.12), transparent 48%), rgba(255,255,255,.025); }
.contact-card h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: .98; letter-spacing: -.05em; margin-bottom: 1rem; }
.contact-card p { max-width: 620px; margin: 0 auto; color: var(--muted); }
.contact-actions { margin-top: 1.7rem; display: flex; justify-content: center; flex-wrap: wrap; gap: .65rem; }
.contact-btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: rgba(255,255,255,.04); font-weight: 600; }
.contact-btn:hover { color: #16161a; background: var(--gold); border-color: var(--gold); }

footer { display: flex; justify-content: center; padding: 1.4rem clamp(1.2rem, 6vw, 6rem); background: rgba(7,7,10,.92); color: rgba(255,255,255,.42); font: .65rem 'IBM Plex Mono', monospace; letter-spacing: .04em; text-align: center; }

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  background: radial-gradient(circle, rgba(236,202,148,.16) 0%, rgba(236,202,148,.07) 28%, rgba(236,202,148,.025) 48%, transparent 72%);
  opacity: 0;
  transition: opacity .18s ease;
  will-change: transform, opacity;
  transform: translate3d(-9999px, -9999px, 0);
}
.cursor-core {
  position: fixed;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 101;
  background: rgba(255,246,225,.96);
  box-shadow: 0 0 8px rgba(236,202,148,.95), 0 0 22px rgba(236,202,148,.72), 0 0 44px rgba(236,202,148,.32);
  opacity: 0;
  transition: opacity .18s ease, transform .08s linear;
  will-change: transform, opacity;
  transform: translate3d(-9999px, -9999px, 0);
}
.cursor-glow.visible, .cursor-core.visible { opacity: 1; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .top-nav { display: none; }
  .hero-meta { margin-top: 4rem; }
  .section-heading { grid-template-columns: 1fr; gap: 1rem; }
  .section-heading > p { justify-self: start; }
  .work-card { flex-basis: calc((100% - 1rem) / 2); }
  .skill-card, .activity-card { flex-basis: calc((100% - 1rem) / 2); }
}

@media (max-width: 680px) {
  .navbar { padding: .9rem 1rem; }
  .social-icons { gap: .35rem; }
  .hero { min-height: 86vh; padding-top: 6rem; }
  .hero h1 { font-size: clamp(3rem, 16vw, 5.4rem); }
  .hero-meta { grid-template-columns: 1fr; gap: .7rem; margin-top: 3.2rem; }
  .section { padding-left: 1rem; padding-right: 1rem; }
  .about-grid { grid-template-columns: 1fr; }
  .work-card, .skill-card, .activity-card { flex-basis: 88%; min-width: 88%; }
  .about-card { min-height: auto; }
  .work-image, .activity-image { aspect-ratio: 16/9; }
  footer { justify-content: center; }
}

.performance-lite .grain { display: none; }
.performance-lite .navbar,
.performance-lite .btn-ghost,
.performance-lite .image-arrow,
.performance-lite .section-dark {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.performance-lite .cursor-glow { width: 220px; height: 220px; margin: -110px 0 0 -110px; }
.performance-lite .work-card,
.performance-lite .skill-card,
.performance-lite .activity-card { box-shadow: none; }
.performance-lite .work-card:hover { box-shadow: none; }

@media (hover: none), (pointer: coarse) {
  .cursor-glow, .cursor-core { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .cursor-glow { display: none; }
}
