:root{
  --bg: #030303;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.6);
  --text: #c0d0d6;
  --card-bg: rgba(0, 5, 15, 0.9);

  /* Scrollbar palette */
  --scroll-track: rgba(0,0,0,0.92);
  --scroll-border: rgba(0, 212, 255, 0.18);
  --scroll-thumb-a: rgba(0,212,255,0.25);
  --scroll-thumb-b: rgba(0,212,255,0.95);
  --scroll-glow: rgba(0, 212, 255, 0.65);
  --scroll-glow-soft: rgba(0, 212, 255, 0.25);
}

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

/* ====== BP.OS Scrollbar (WebKit + Firefox) ====== */
*{
  scrollbar-width: thin;
  scrollbar-color: rgba(0,212,255,0.82) rgba(0,0,0,0.85);
}

::-webkit-scrollbar{
  width: 14px;
}

::-webkit-scrollbar-track{
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,0.03) 0px,
      rgba(255,255,255,0.03) 2px,
      rgba(0,0,0,0.00) 4px,
      rgba(0,0,0,0.00) 8px
    ),
    radial-gradient(120% 80% at 50% 0%, rgba(0,212,255,0.08), transparent 60%),
    linear-gradient(180deg, #000 0%, rgba(0,0,0,0.85) 70%, #000 100%);
  border-left: 1px solid var(--scroll-border);
  box-shadow: inset 0 0 25px rgba(0,0,0,0.85);
}

::-webkit-scrollbar-thumb{
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.9);
  background:
    radial-gradient(60% 55% at 50% 30%, rgba(255,255,255,0.35), transparent 55%),
    linear-gradient(180deg, var(--scroll-thumb-a), var(--scroll-thumb-b)),
    repeating-linear-gradient(
      180deg,
      rgba(0,0,0,0.00) 0px,
      rgba(0,0,0,0.00) 6px,
      rgba(0,0,0,0.18) 8px
    );

  box-shadow:
    0 0 0 1px rgba(0,212,255,0.18),
    0 0 14px var(--scroll-glow-soft),
    0 0 24px rgba(0,212,255,0.12),
    inset 0 0 14px rgba(255,255,255,0.10);

  animation: bpScrollPulse 2.8s ease-in-out infinite;
}

::-webkit-scrollbar-thumb:hover{
  box-shadow:
    0 0 0 1px rgba(0,212,255,0.35),
    0 0 18px var(--scroll-glow),
    0 0 38px rgba(0,212,255,0.18),
    inset 0 0 16px rgba(255,255,255,0.14);
}

::-webkit-scrollbar-thumb:active{
  animation: none;
  box-shadow:
    0 0 0 1px rgba(0,212,255,0.55),
    0 0 22px var(--scroll-glow),
    inset 0 0 18px rgba(255,255,255,0.18);
}

@keyframes bpScrollPulse{
  0%, 100%{ filter: brightness(1); }
  50%{ filter: brightness(1.08); }
}

/* ====== Base ====== */
body{
  background-color: var(--bg);
  background-image: url('assets/background-pattern.png');
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.6;
}

.container{
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

/* ===== Header ===== */
header{
  background: rgba(0, 0, 0, 0.95);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

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

.logo-area{
  display: flex;
  align-items: center;
  gap: 15px;
}

.studio-logo{
  height: 24px;
  width: auto;
  filter: drop-shadow(0 0 5px var(--accent));
}

.nav-title{
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
}

nav ul{
  display: flex;
  list-style: none;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a{
  text-decoration: none;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: bold;
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.95;
}

nav a:hover{
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
}

/* ===== Sections ===== */
section{ padding: 100px 0; }

.glow-text{
  color: var(--accent);
  text-shadow: 0 0 15px var(--accent-glow);
  text-transform: uppercase;
  letter-spacing: 5px;
  margin-bottom: 22px;
  text-align: center;
  font-size: 1.8rem;
}

.section-lead{
  max-width: 900px;
  margin: 0 auto 40px auto;
  text-align: center;
  opacity: 0.92;
}

.subhead{
  color: #ffffff;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.section-divider{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.35), transparent);
  margin: 70px 0 0 0;
  box-shadow: 0 0 20px rgba(0,212,255,0.12);
}

.content-wrapper{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.content-wrapper.reverse{ direction: rtl; }
.content-wrapper.reverse .text-block{ direction: ltr; }

/* ===== Image Box ===== */
.image-box{
  position: relative;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2), 0 0 25px var(--accent-glow);
  overflow: hidden;
  background: #000;
  transition: 0.4s ease-in-out;
  border-radius: 16px;
}

.image-box img{
  width: 100%;
  height: auto;
  display: block;
}

.hero-img-final{
  max-width: 950px;
  margin: 40px auto 0 auto;
}

/* ===== Hero Stats ===== */
.hero-stats{
  margin-top: 35px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat{
  border: 1px solid rgba(0,212,255,0.18);
  background: rgba(0, 5, 15, 0.55);
  border-radius: 16px;
  padding: 16px 16px;
  box-shadow: 0 0 20px rgba(0,212,255,0.10);
}

.stat-num{
  display: block;
  color: var(--accent);
  font-weight: bold;
  letter-spacing: 2px;
  font-size: 1.1rem;
  margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(0,212,255,0.25);
}

.stat-label{
  display: block;
  opacity: 0.85;
  font-size: 0.92rem;
}

/* ===== Specialties ===== */
.specialties-section{
  position: relative;
  overflow: hidden;
}

/* Spotlight (Apple-ish) */
.specialties-section::before{
  content:"";
  position: absolute;
  inset: -200px;
  background:
    radial-gradient(360px 360px at var(--mx, 50%) var(--my, 30%),
      rgba(0,212,255,0.14),
      transparent 62%);
  pointer-events: none;
  opacity: 0.9;
}

.specialty-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.specialty-card{
  background: var(--card-bg);
  padding: 40px 30px;
  border: 1px solid rgba(0, 212, 255, 0.15);
  text-align: center;
  transition: 0.4s;
  border-radius: 18px;
  backdrop-filter: blur(6px);
}

.specialty-card:hover{
  border-color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-3px);
}

.specialty-card .icon{
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 16px;
  text-shadow: 0 0 15px var(--accent-glow);
}

.specialty-card h4{
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.specialty-card p{
  opacity: 0.95;
  font-size: 0.95rem;
}

/* ===== Projects ===== */
.project-cards{
  margin-top: 55px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card{
  background: rgba(0, 5, 15, 0.75);
  border: 1px solid rgba(0,212,255,0.18);
  border-radius: 18px;
  padding: 22px 22px;
  box-shadow: 0 0 20px rgba(0,212,255,0.10);
}

.project-card h4{
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.project-card p{ opacity: 0.92; }

.chip-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip{
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,212,255,0.18);
  color: var(--accent);
  background: rgba(0,212,255,0.06);
}

/* ===== Timeline ===== */
.timeline{
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.timeline-item{
  position: relative;
  border: 1px solid rgba(0,212,255,0.18);
  background: rgba(0, 5, 15, 0.60);
  border-radius: 18px;
  padding: 16px 16px 16px 44px;
  box-shadow: 0 0 18px rgba(0,212,255,0.08);
}

.tl-dot{
  position: absolute;
  left: 16px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(0,212,255,0.35);
}

.tl-content h4{
  color: #fff;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
}

.tl-content p{ opacity: 0.9; }

/* ===== Lists ===== */
.clean-list{
  list-style: none;
  padding-left: 0;
  margin: 14px 0 14px 0;
  display: grid;
  gap: 10px;
}

.clean-list li{
  border-left: 2px solid rgba(0,212,255,0.35);
  padding-left: 12px;
  opacity: 0.92;
}

/* ===== Terminal ===== */
.terminal-box{
  margin-top: 18px;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0,212,255,0.18);
  background: rgba(0,0,0,0.55);
  box-shadow: inset 0 0 25px rgba(0,0,0,0.75), 0 0 22px rgba(0,212,255,0.08);
}

.terminal-line{
  font-size: 0.88rem;
  opacity: 0.95;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0,212,255,0.10);
}

.terminal-line:last-child{ border-bottom: none; }

.t-time{
  color: rgba(255,255,255,0.70);
  margin-right: 8px;
}

.t-tag{
  color: var(--accent);
  font-weight: bold;
  margin-right: 8px;
  letter-spacing: 1px;
}

/* ===== Contact ===== */
.contact-grid{
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.contact-btn.final-btn{
  padding: 30px 45px;
  min-width: 360px;
  border: 2px solid #ffffff;
  color: #fff;
  text-decoration: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  background: rgba(0, 212, 255, 0.05);
  transition: 0.4s;
  box-shadow: 0 0 15px var(--accent-glow);
  border-radius: 18px;
}

.contact-btn.final-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--accent-glow);
  border-color: var(--accent);
}

.contact-btn.final-btn span{
  font-size: 1.3rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-btn.final-btn small{
  margin-top: 10px;
  opacity: 0.75;
}

/* ===== Tags / Footer ===== */
.system-tag{
  margin-top: 20px;
  padding: 10px;
  border: 1px solid var(--accent);
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: bold;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(0,212,255,0.18);
}

footer{
  text-align: center;
  padding: 60px;
  font-size: 0.7rem;
  opacity: 0.4;
  letter-spacing: 2px;
}

/* ===== Legal Pages ===== */
.legal-page{
  padding: 100px 20px;
}

.legal-page h3{
  margin-top: 40px;
  margin-bottom: 10px;
  color: #ffffff;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.95;
  font-size: 1rem;
}

.legal-page p, .legal-page li{
  font-size: 0.95rem;
  opacity: 0.95;
}

.legal-page a{
  color: var(--accent);
  text-decoration: none;
}

.legal-page a:hover{
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ===== To Top Button ===== */
.to-top{
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  background: rgba(0,0,0,0.85);
  border: 1px solid var(--accent);
  color: var(--accent);
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
  font-size: 20px;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
  border-radius: 16px;
  user-select: none;
}

.to-top:hover{
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.75);
}

/* ===== Scroll Animations (Apple-ish Reveal) ===== */
.reveal{
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  filter: blur(10px);
  transition:
    opacity 900ms ease,
    transform 900ms cubic-bezier(.2,.8,.2,1),
    filter 900ms ease;
  transition-delay: var(--delay, 0ms);
  will-change: transform, opacity, filter;
}

.reveal.is-visible{
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Motion Safe */
@media (prefers-reduced-motion: reduce){
  .reveal{
    transition: none;
    transform: none;
    filter: none;
    opacity: 1;
  }
}