:root {
  --bg: #030303;
  --bg-dark: #000000;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.4);
  --accent: #fc3a00; /* Bright orange/red */
  --accent-glow: rgba(252, 58, 0, 0.6);
  --border: rgba(255, 255, 255, 0.15);
  --font-main: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.4;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

/* UTILS */
.text-accent { color: var(--accent); }
.text-dim { color: var(--text-dim); }

/* NAV */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 2rem 4rem;
  z-index: 100;
  font-size: 14px;
  color: var(--text-dim);
  mix-blend-mode: difference;
}
.navbar a:hover { color: #fff; }
.nav-cta {
  text-decoration: underline;
  margin-left: 2rem;
  color: #fff;
}

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: -10%; left: 0; width: 100%; height: 120%;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.hero-bg img, .hero-bg canvas {
  height: 100% !important;
  width: 100% !important;
  object-fit: cover !important;
  opacity: 0.74;
  filter: brightness(0.98) contrast(1.08);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 30%;
  background: linear-gradient(to top, rgba(3, 3, 3, 0.68) 0%, rgba(3, 3, 3, 0) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 4rem 8rem 4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-intro {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.hero-name {
  color: #fff;
  font-weight: 600;
  font-size: 1.2rem;
}
.hero-title {
  font-size: clamp(50px, 8vw, 110px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-top: 1rem;
}
.rotating-text-wrapper {
  display: inline-block;
  position: relative;
  min-width: 500px;
  height: 1.1em;
  vertical-align: bottom;
  perspective: 1000px;
}
.rt-word {
  position: absolute;
  top: 0; left: 0;
  white-space: nowrap;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  visibility: hidden;
}
.scroll-down {
  position: absolute;
  bottom: 3rem;
  left: 4rem;
  color: var(--text-dim);
  font-size: 14px;
}
.hero-list {
  position: absolute;
  right: 4rem;
  top: 40%;
  transform: translateY(-50%);
  text-align: right;
  font-size: 14px;
  color: var(--text-dim);
}
.hero-list li { margin-bottom: 0.5rem; }
.hero-help {
  display: inline-block;
  margin-top: 2rem;
  color: #fff;
  text-decoration: underline;
}
.hero-bottom-text {
  position: absolute;
  bottom: 3rem;
  right: 4rem;
  text-align: right;
  font-size: 14px;
  color: var(--text-dim);
  max-width: 300px;
}

/* ABOUT SECTION */
.about-section {
  padding: 10rem 4rem;
  background: var(--bg);
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.about-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(10vh);
}
.about-bg img {
  height: 80%;
  max-height: 800px;
  object-fit: contain;
  opacity: 0.25;
  filter: brightness(0.6) grayscale(100%);
  transform-origin: bottom center;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  position: relative;
  z-index: 2;
  align-items: start;
}
.left-col {
  position: sticky;
  top: 20vh;
  height: fit-content;
  padding-bottom: 2rem;
}
.left-col .sub-title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 4rem;
  color: #fff;
}
/* Chessboard */
.chessboard {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  grid-auto-rows: 110px;
  gap: 0;
}
.box {
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}
.box.empty {
  visibility: hidden;
}
.box.has-content {
  border: 1px solid rgba(255,255,255,0.05);
}
.box-text {
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.box.has-content:hover {
  background: var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
  z-index: 2;
  border-color: var(--accent);
}
.box.has-content:hover .box-text {
  color: #fff;
}

/* Scrub text */
.right-col {
  padding-top: 6rem;
  max-width: 600px;
}
.intro-note {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 1rem;
  display: block;
}
.scrub-text {
  font-size: clamp(24px, 3.5vw, 42px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.scrub-word {
  display: inline-block;
  margin-right: 0.25em;
  opacity: 0.15;
  filter: blur(8px);
  will-change: opacity, filter;
}

/* X-MARQUEE */
.marquee-x-section {
  position: relative;
  height: 500px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.marquee-x-wrapper {
  position: relative;
  width: 100vw;
  height: 100%;
}
.mq-dir {
  position: absolute;
  top: 50%;
  left: -20vw;
  width: 140vw;
  overflow: hidden;
  transform-origin: center center;
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
  font-size: clamp(30px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transition: all 0.4s ease;
  white-space: nowrap;
}
.mq-inner {
  display: inline-flex;
  gap: 2rem;
  width: max-content;
  will-change: transform;
}

.mq-inner span {
  flex: 0 0 auto;
}

@keyframes marqueeLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes marqueeRight {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

.track-front .mq-inner {
  animation: marqueeLeft 22s linear infinite;
}

.track-back .mq-inner {
  animation: marqueeRight 24s linear infinite;
}
/* Base States */
.track-front {
  background: var(--accent);
  color: #fff;
  transform: translateY(-50%) rotate(-6deg);
  z-index: 2;
  filter: blur(0px);
  opacity: 1;
}
.track-back {
  background: #1a1a1a;
  color: #fff;
  -webkit-text-stroke: 0;
  transform: translateY(-50%) rotate(6deg);
  z-index: 1;
  filter: blur(3px);
  opacity: 0.9;
}

/* Hover Interactivity */
/* Step 1: When anything runs hovered inside the wrapper, push BOTH tracks to blurred & grey */
.marquee-x-wrapper:hover .track-front,
.marquee-x-wrapper:hover .track-back {
  filter: blur(5px);
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.4);
  -webkit-text-stroke: 0;
}

/* Step 2: Override the rule ONLY for the specific track being directly hovered so it pops in orange */
.marquee-x-wrapper .track-front:hover,
.marquee-x-wrapper .track-back:hover {
  filter: blur(0px) !important;
  opacity: 1 !important;
  background: var(--accent) !important;
  color: #fff !important;
  -webkit-text-stroke: 0 !important;
}


/* CREDENTIALS */
.cred-section {
  padding: 8rem 4rem;
  background: var(--bg);
}
.cred-container {
  max-width: 1000px;
  margin: 0 auto;
}
.cred-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  cursor: default;
}
.cred-item:last-child {
  border-bottom: 1px solid var(--border);
}
.c-col {
  flex: 1;
  color: var(--text-dim);
  font-size: 1.1rem;
}
.c-col.main-col {
  color: #fff;
  font-weight: 500;
  font-size: 1.5rem;
  flex: 2;
}

/* Hover Loader effect */
.cred-item::before, .cred-item::after {
  content: '';
  position: absolute;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}
.cred-item::before { top: -1px; }
.cred-item::after { bottom: -1px; }
.cred-item:last-child::after { bottom: -1px; } /* handles last border */

.cred-item:hover::before, .cred-item:hover::after {
  width: 100%;
}
.cred-item:hover .c-col {
  color: #fff;
}


/* FOOTER */
.footer {
  position: relative;
  min-height: 100vh;
  background: var(--bg-dark);
  padding: 4rem 4rem 0 4rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
/* Sunset Semircircle */
.footer-sunset {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 120%;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 120%, 
    #ffffff 0%, 
    #ffc04a 10%, 
    var(--accent) 30%, 
    #3a0000 55%, 
    var(--bg-dark) 80%
  );
  filter: blur(60px);
  z-index: 0;
}

.footer-layout {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 12vw;
}

.f-left, .f-right { flex: 1; z-index: 3; }
.f-center { 
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  display: flex; 
  justify-content: center; 
  align-items: flex-end;
  pointer-events: none;
  z-index: 2;
}
.f-portrait {
  width: 85%;
  max-width: 382px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 -10px 40px rgba(0,0,0,0.5));
  display: block;
}

.f-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 14px;
}
.f-group a { color: #fff; font-weight: 500; }
.f-group a:hover { color: var(--accent); }
.mt-large { margin-top: 3rem; }
.mt-xlarge { margin-top: 5rem; }
.f-title {
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.f-big {
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.f-right { max-width: 400px; padding-bottom: 4rem;}
.f-text {
  font-size: clamp(20px, 2.5vw, 32px);
  line-height: 1.2;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

.footer-email-mq {
  position: absolute;
  bottom: 0; left: 0; width: 100vw;
  font-size: 15vw;
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.05em;
  white-space: nowrap;
  overflow: hidden;
  z-index: 1; /* Behind image */
  cursor: pointer;
  transition: color 0.4s;
  color: #fff;
}
.footer-email-mq:hover {
  color: var(--accent);
}
.email-mq-inner {
  display: inline-block;
}


@media(max-width: 1024px) {
  .about-grid, .footer-layout { flex-direction: column; grid-template-columns: 1fr; }
  .footer-layout { align-items: flex-start; padding-bottom: 20vw; gap: 4rem;}
  .marquee-x-section { height: 300px; }
  .f-center { 
    position: relative; 
    left: auto; transform: none; width: 100%; margin-top: 5vh; bottom: auto;
  }
}