* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #150a08;
  color: #ffffff;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a:hover {
  color: #f14e0c;
}

img {
  max-width: 100%;
  display: block;
}

/* ============ 1. FIXED BACKGROUND VIDEO ============ */

.bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #150a08;
}

.bg-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Preloader */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #150a08;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.preloader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

#preloader-text {
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  color: #e6c3b0;
}

/* Content wrapper scrolling over the video */

.content {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

/* ============ 3. NAVBAR ============ */

#topnav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 44px;
}

#topnav .logo {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#topnav .logo .reg,
#heroTitle .reg {
  font-size: 12px;
  vertical-align: super;
}

#heroTitle .reg {
  font-size: 0.2em;
  vertical-align: 2.9em;
}

#navlinks {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Glass pill buttons — same recipe as hunsy's nav (public/style.css:130):
   translucent white fill, blurred backdrop, soft inset highlight — plus the
   same orbiting-light ring used on .talk-btn, sized down for the nav. */
.nav-btn {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  isolation: isolate;
  border-radius: 999px;
  padding: 1px;
  --duration: 3.4;
  --light-width: 46px;
  --light-color: #f14e0c;
}

.nav-btn-light {
  position: absolute;
  inset: 0;
  z-index: 0;
  aspect-ratio: 1;
  width: var(--light-width);
  offset-path: var(--path, none);
  offset-distance: 0%;
  background: radial-gradient(ellipse at center, var(--light-color), transparent 70%);
  animation: star-btn calc(var(--duration) * 1s) linear infinite;
}

.nav-btn-fill {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  transition: background 0.2s ease;
}

.nav-btn:hover .nav-btn-fill {
  background: rgba(255, 255, 255, 0.24);
}

/* Inspired by a "star button" component: a soft radial light orbits the
   pill's border on an infinite loop (CSS motion path), peeking through a
   2px ring around an opaque fill — same trick as the reference component's
   masked border layer, just in plain CSS since this project has no
   React/Tailwind build. The path itself is computed in JS from the
   button's measured size (see script.js). */
.talk-btn {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  isolation: isolate;
  border-radius: 999px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.18);
  --duration: 3;
  --light-width: 70px;
  --light-color: #f14e0c;
}

.talk-btn-light {
  position: absolute;
  inset: 0;
  z-index: 0;
  aspect-ratio: 1;
  width: var(--light-width);
  offset-path: var(--path, none);
  offset-distance: 0%;
  background: radial-gradient(ellipse at center, var(--light-color), transparent 70%);
  animation: star-btn calc(var(--duration) * 1s) linear infinite;
}

.talk-btn-fill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 26px;
  border-radius: 999px;
  background: #ffffff;
  transition: background 0.3s ease;
}

.talk-btn:hover .talk-btn-fill {
  background: #f14e0c;
}

.talk-btn-label {
  position: relative;
  z-index: 2;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(180deg, #111111, #6b6b6b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: color 0.3s ease, background 0.3s ease;
}

.talk-btn:hover .talk-btn-label {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #ffffff;
}

@keyframes star-btn {
  0% {
    offset-distance: 0%;
  }
  100% {
    offset-distance: 100%;
  }
}

/* ============ Shared bits ============ */

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.section-label .num {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  cursor: pointer;
}

.icon-circle-42 {
  width: 42px;
  height: 42px;
}

.icon-circle-46 {
  width: 46px;
  height: 46px;
}

.tag-pill {
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 15px;
}

/* Scroll-reveal system */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1), transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc((var(--order, 1) - 1) * 0.13s);
}

.reveal-card {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc((var(--order, 1) - 1) * 0.13s);
}

.reveal.is-visible,
.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 4. HERO ============ */

.hero {
  position: relative;
  height: 100vh;
  min-height: 760px;
}

#heroTitleWrap {
  position: absolute;
  left: 70px;
  top: 96px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

body.is-loaded #heroTitleWrap {
  opacity: 1;
  transform: translateY(0);
}

#heroTitle {
  margin: 0;
  font-size: clamp(88px, 14vw, 230px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

#heroSubtitle {
  margin-top: -6px;
  font-size: clamp(64px, 10.5vw, 175px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

#heroInfo {
  position: absolute;
  left: 70px;
  bottom: 60px;
  width: 640px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.4s, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
}

body.is-loaded #heroInfo {
  opacity: 1;
  transform: translateY(0);
}

.hero-headline {
  margin: 0;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-sub {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  width: 330px;
}

#marquee {
  position: absolute;
  left: 70px;
  right: 470px;
  bottom: 20px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 14%, black 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, black 14%, black 86%, transparent 100%);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 90px;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.marquee-text {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

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

#heroCard {
  position: absolute;
  right: 70px;
  bottom: 6px;
  width: 440px;
}

.hero-card-img {
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
}

.hero-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-card-img:hover img {
  transform: scale(1.06);
}

.hero-card-bar {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(18, 14, 12, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 16px 20px;
}

.hero-card-title {
  font-size: 18px;
  font-weight: 600;
}

.hero-card-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

/* ============ 5. ABOUT COMPANY ============ */

#about {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  padding: 26vh 70px;
}

#aboutText {
  display: flex;
  flex-direction: column;
}

.about-line {
  white-space: nowrap;
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 42px;
}

.about-line .w {
  display: inline;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.5s ease;
}

/* ============ 6. OUR SERVICES ============ */

#services {
  padding: 120px 70px;
}

.services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.services-intro {
  max-width: 470px;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

#svcGrid {
  margin-top: 110px;
  display: grid;
  grid-template-columns: 44% 1fr;
  gap: 90px;
}

.svc-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 38px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  color: #ffffff;
  transition: color 0.4s ease;
}

.svc-row:hover {
  color: #f14e0c;
}

.svc-icon svg {
  stroke: currentColor;
  display: block;
}

.svc-title {
  font-size: clamp(38px, 3.2vw, 56px);
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.svc-num {
  font-size: 15px;
}

#svcImgs {
  display: flex;
  gap: 18px;
}

.svc-img {
  flex: 1;
  height: 420px;
  overflow: hidden;
  border-radius: 4px;
}

.svc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.svc-img:hover img {
  transform: scale(1.05);
}

.svc-desc {
  margin: 30px 0 0;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  max-width: 660px;
}

.svc-tags-row {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.svc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ 7. BEST PORTFOLIO ============ */

#projects {
  padding: 130px 70px;
}

.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.projects-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.projects-range {
  font-size: 13px;
}

.dash-strip {
  width: 110px;
  height: 24px;
  background-image: repeating-linear-gradient(90deg, #ffffff 0 2px, transparent 2px 6px);
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 100%;
}

#pfHero {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
}

#pfTitle {
  margin: 0;
  padding-left: 16%;
  font-size: clamp(46px, 4.4vw, 74px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pf-intro {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

#pfGrid {
  margin-top: 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 150px;
}

.pf-col {
  display: flex;
  flex-direction: column;
  gap: 160px;
}

.pf-col-offset {
  margin-top: 100px;
}

.pf-card-offset {
  margin-left: 40px;
}

.pf-media {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
}

.pf-visual {
  position: relative;
  max-width: 500px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #0d0605;
}

.pf-visual .pf-poster,
.pf-visual .pf-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-visual .pf-video {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-media.is-playing .pf-visual .pf-video {
  opacity: 1;
}

.pf-media:hover .pf-visual .pf-poster,
.pf-media:hover .pf-visual .pf-video {
  transform: scale(1.05);
}

/* ── PROJECT VIDEO MODAL ───────────────────────────────── */

.pf-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: rgba(5, 3, 2, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  z-index: 999;
}

.pf-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.pf-modal-inner {
  position: relative;
  width: 100%;
  max-width: 1100px;
}

.pf-modal-title {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.pf-modal-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #000;
  display: block;
}

.pf-modal-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease;
}

.pf-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

body.modal-open {
  overflow: hidden;
}

.pf-rail {
  width: 16px;
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 8px;
  flex-shrink: 0;
}

.pf-dash {
  width: 14px;
  height: 62px;
  background-image: repeating-linear-gradient(180deg, #ffffff 0 4px, transparent 4px 10px);
  background-position: center;
}

.pf-year {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.pf-index {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  margin-top: auto;
}

.pf-title {
  margin-top: 30px;
  font-size: 30px;
  font-weight: 500;
}

.pf-desc {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
}

.pf-tags-row {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

/* ============ 8. ABOUT ME ============ */

#about-me {
  padding: 140px 70px 160px;
}

#amGrid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 80px;
}

#amTitle {
  margin: 32px 0 0;
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.am-right {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.am-bio {
  margin: 0;
  max-width: 620px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.am-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#amContact {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  width: fit-content;
  font-size: 17px;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

/* ============ RESPONSIVE ============ */

html,
body {
  overflow-x: hidden;
}

@media (max-width: 1100px) {
  #topnav {
    padding: 22px 40px !important;
  }
  #navlinks {
    display: none !important;
  }
  #heroTitle {
    font-size: clamp(72px, 16vw, 180px) !important;
  }
  #heroInfo {
    width: 55vw !important;
  }
  #heroCard {
    width: 300px !important;
  }
  #heroCard img {
    height: 218px !important;
  }
  #marquee {
    left: 40px !important;
    right: 370px !important;
  }
  #about,
  #services,
  #projects,
  #about-me {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
  #about {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  #aboutText > div {
    white-space: normal !important;
    display: inline;
  }
  #svcGrid {
    grid-template-columns: 1fr !important;
    gap: 60px !important;
    margin-top: 70px !important;
  }
  #svcImgs > div {
    height: 320px !important;
  }
  #pfGrid {
    grid-template-columns: 1fr !important;
  }
  #pfGrid > div {
    margin-top: 0 !important;
    gap: 100px !important;
  }
  #pfGrid > div > div {
    margin-left: 0 !important;
    max-width: 520px !important;
  }
  #pfTitle {
    padding-left: 0 !important;
    width: auto !important;
    height: auto !important;
    font-size: clamp(38px, 6vw, 74px) !important;
  }
  #amGrid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .am-bio {
    font-size: 19px !important;
  }
}

@media (max-width: 640px) {
  #topnav {
    padding: 16px 20px !important;
  }
  #topnav > div:first-child {
    font-size: 20px !important;
  }
  #heroTitleWrap {
    left: 20px !important;
    top: 88px !important;
  }
  #heroTitle {
    font-size: clamp(64px, 22vw, 120px) !important;
  }
  #heroInfo {
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
    bottom: 110px !important;
  }
  #heroInfo p {
    font-size: 28px !important;
  }
  #heroInfo > div {
    font-size: 15px !important;
  }
  #heroCard {
    display: none !important;
  }
  #marquee {
    left: 20px !important;
    right: 20px !important;
    bottom: 28px !important;
  }
  #marquee img {
    height: 26px !important;
  }
  #marquee > div {
    gap: 56px !important;
  }
  #about {
    padding: 18vh 20px !important;
  }
  #aboutText span {
    font-size: 24px !important;
    line-height: 32px !important;
  }
  #services {
    padding: 80px 20px !important;
  }
  #svcList > div {
    padding: 26px 0 !important;
    gap: 16px !important;
  }
  #svcList > div > div:last-child {
    font-size: clamp(28px, 8vw, 38px) !important;
  }
  #svcList svg {
    width: 20px !important;
    height: 20px !important;
  }
  #svcImgs {
    flex-direction: column !important;
  }
  #svcImgs > div {
    height: 240px !important;
    flex: none !important;
  }
  #projects {
    padding: 90px 20px !important;
  }
  #pfHero {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  #pfGrid {
    margin-top: 80px !important;
  }
  #pfGrid > div {
    gap: 80px !important;
  }
  #pfGrid img {
    max-height: 380px !important;
  }
  #pfGrid > div > div > div:nth-of-type(2) {
    font-size: 24px !important;
  }
  #about-me {
    padding: 90px 20px 100px !important;
  }
  .am-bio {
    font-size: 18px !important;
  }
  #amContact {
    font-size: 15px !important;
  }
}
