/* Custom Styles and View Transition overrides */

/* Hide modal initially */
#team-modal[aria-hidden="true"] {
  display: none;
}

/* Modal open state */
body.modal-open {
  overflow: hidden;
}

/* Custom scrollbar for modal */
#team-modal-content::-webkit-scrollbar {
  width: 6px;
}
#team-modal-content::-webkit-scrollbar-track {
  background: transparent;
}
#team-modal-content::-webkit-scrollbar-thumb {
  background: rgba(44, 74, 59, 0.2);
  border-radius: 4px;
}

/* View Transition API customizations */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}

::view-transition-old(hero-image),
::view-transition-new(hero-image) {
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1); /* ease-out */
}

::view-transition-old(hero-name),
::view-transition-new(hero-name) {
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* Skill bars animation */
@keyframes fillBar {
  from { width: 0; }
  to { width: var(--fill); }
}

.skill-bar-fill {
  width: var(--fill);
}

.modal-animating-in .skill-bar-fill {
  animation: fillBar 800ms cubic-bezier(0, 0, 0.2, 1) forwards;
  width: 0;
}

/* Staggered delay */
.modal-animating-in .skill-bar-container:nth-child(1) .skill-bar-fill { animation-delay: 100ms; }
.modal-animating-in .skill-bar-container:nth-child(2) .skill-bar-fill { animation-delay: 160ms; }
.modal-animating-in .skill-bar-container:nth-child(3) .skill-bar-fill { animation-delay: 220ms; }
.modal-animating-in .skill-bar-container:nth-child(4) .skill-bar-fill { animation-delay: 280ms; }

/* Modal Content Fade In */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-body-content {
  opacity: 0;
}

.modal-animating-in .modal-body-content {
  animation: fadeUp 400ms cubic-bezier(0, 0, 0.2, 1) forwards;
  animation-delay: 200ms;
}

/* Hover micro-interactions */
.card-hover-border {
  opacity: 0;
  transition: opacity 300ms ease;
}
.group:hover .card-hover-border {
  opacity: 1;
}

/* ──────────────────────────────────────────────
   HERO SECTION — AcidSquares extra aesthetics
   ────────────────────────────────────────────── */

/* Canvas visible immediately once WebGL starts */
#hero-canvas {
  opacity: 1;
}

/* Label — subtle amber pulse glow */
@keyframes labelPulse {
  0%, 100% { opacity: 0.55; letter-spacing: 0.2em; }
  50%       { opacity: 0.85; letter-spacing: 0.24em; }
}
.hero-label {
  animation: labelPulse 4s ease-in-out infinite;
  animation-delay: 2.4s;
}

/* Architecture image — slow vertical float */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0px);   box-shadow: 0 20px 60px rgba(44,74,59,0.10); }
  50%       { transform: translateY(-10px); box-shadow: 0 32px 80px rgba(44,74,59,0.18); }
}
.hero-image-wrap {
  animation: heroFloat 7s ease-in-out infinite;
  animation-delay: 2.8s;
}

/* CTA button — travelling shimmer */
.hero-cta {
  position: relative;
  overflow: hidden;
}
.hero-cta::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 82, 63, 0.18) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: ctaShimmer 4s ease-in-out infinite;
  animation-delay: 3.5s;
}
@keyframes ctaShimmer {
  0%   { left: -80%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}

/* ═══════════════════════════════════════════════
   CUSTOM CURSOR  (desktop / fine-pointer only)
   ═══════════════════════════════════════════════ */
@media (pointer: fine) {
  body, a, button, [role="button"], .team-card,
  .ticker-item, li[class*="cursor-pointer"] {
    cursor: none !important;
  }

  #cursor-dot {
    position: fixed;
    width: 7px; height: 7px;
    background: #2C4A3B;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    transition: background 0.25s, transform 0.15s;
    mix-blend-mode: multiply;
  }

  #cursor-ring {
    position: fixed;
    width: 34px; height: 34px;
    border: 1.5px solid rgba(44, 74, 59, 0.45);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    transition: width 0.35s ease, height 0.35s ease,
                border-color 0.3s ease, background 0.3s ease;
  }

  body.cur-hover #cursor-dot {
    background: #c5523f;
    transform: translate(-50%, -50%) scale(1.8);
  }
  body.cur-hover #cursor-ring {
    width: 54px; height: 54px;
    border-color: rgba(197, 82, 63, 0.4);
    background: rgba(197, 82, 63, 0.04);
  }
}

/* Mobile — hide cursor elements entirely */
@media (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ═══════════════════════════════════════════════
   TECH STACK TICKER
   ═══════════════════════════════════════════════ */
.tech-ticker-section {
  position: relative;
  -webkit-mask-image: linear-gradient(
    to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(
    to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.ticker-row { overflow: hidden; }

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
}

.ticker-track--fwd { animation: tickFwd 38s linear infinite; }
.ticker-track--rev { animation: tickRev 38s linear infinite; }

@media (max-width: 640px) {
  .ticker-track--fwd { animation-duration: 24s; }
  .ticker-track--rev { animation-duration: 24s; }
}

/* Pause on hover (desktop) or touch-hold */
.ticker-row:hover .ticker-track { animation-play-state: paused; }

@keyframes tickFwd {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes tickRev {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 22px 6px 0;
  position: relative;
  transition: transform 0.3s ease;
}

/* Bullet separator */
.ticker-item::after {
  content: '◆';
  font-size: 5px;
  color: rgba(197, 82, 63, 0.35);
  margin-left: 22px;
  flex-shrink: 0;
}

.ticker-name {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #2C4A3B;
  transition: color 0.3s ease;
}

.ticker-sep {
  color: rgba(44, 74, 59, 0.25);
  font-size: 0.75rem;
  line-height: 1;
}

.ticker-desc {
  font-size: 0.7rem;
  color: rgba(44, 74, 59, 0.5);
  letter-spacing: 0.04em;
  font-style: italic;
  transition: color 0.3s ease;
}

/* Alt row: slightly different shade */
.ticker-item--alt .ticker-name { color: #5a3825; }
.ticker-item--alt .ticker-sep  { color: rgba(90, 56, 37, 0.25); }
.ticker-item--alt .ticker-desc { color: rgba(90, 56, 37, 0.45); }

/* Hover pop — only on desktop */
@media (pointer: fine) {
  .ticker-item:hover { transform: translateY(-2px); }
  .ticker-item:hover .ticker-name { color: #c5523f; }
  .ticker-item:hover .ticker-desc { color: rgba(197, 82, 63, 0.65); }
  .ticker-item--alt:hover .ticker-name { color: #c5523f; }
}

/* ═══════════════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in-view     { opacity: 1; transform: translateY(0); }
.reveal-delay-1     { transition-delay: 80ms; }
.reveal-delay-2     { transition-delay: 180ms; }
.reveal-delay-3     { transition-delay: 280ms; }

/* ═══════════════════════════════════════════════
   WORK CARDS — 3D TILT (desktop)
   ═══════════════════════════════════════════════ */
.work-tilt {
  transition: transform 0.15s ease, box-shadow 0.35s ease;
  transform-style: preserve-3d;
}
.work-tilt:hover {
  box-shadow: 0 24px 60px rgba(44,74,59,0.14);
}

/* ═══════════════════════════════════════════════
   CAPABILITY ROWS — accent left-border slide
   ═══════════════════════════════════════════════ */
li[class*="border-b"] {
  position: relative;
}
li[class*="border-b"]::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: #c5523f;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
li[class*="border-b"]:hover::before { transform: scaleY(1); }

/* ═══════════════════════════════════════════════
   MOBILE REFINEMENTS
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hero heading slightly smaller on small screens */
  .hero-label { font-size: 0.65rem; }

  /* Ticker smaller padding on mobile */
  .ticker-item { padding: 4px 14px 4px 0; gap: 6px; }
  .ticker-name, .ticker-desc { font-size: 0.65rem; }

  /* Team cards: full-width touch targets */
  .team-card { touch-action: manipulation; }

  /* Floating image: reduce movement on mobile */
  .hero-image-wrap {
    animation-name: heroFloatMobile;
  }
  @keyframes heroFloatMobile {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
  }

  /* Reveal slightly faster on mobile */
  .reveal {
    transition-duration: 0.6s;
    transform: translateY(16px);
  }
}



/* ══════════════════════════════════════════
   SCROLL PROGRESS BAR
   ══════════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, #2C4A3B, #c5523f);
  z-index: 9997;
  transition: width 0.1s linear;
}

/* ══════════════════════════════════════════
   HEADER — glass on scroll + dark on light
   ══════════════════════════════════════════ */
#site-header {
  color: #2C4A3B;
}
#site-header.scrolled {
  background: rgba(246,243,236,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(44,74,59,0.08);
  padding-top: 14px;
  padding-bottom: 14px;
}
.header-logo { color: inherit; text-decoration: none; }
.nav-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.65;
  transition: opacity 0.25s ease;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: #c5523f;
  transition: width 0.3s ease;
}
.nav-link:hover { opacity: 1; }
.nav-link.active { opacity: 1; }
.nav-link.active::after { width: 100%; }

/* ══════════════════════════════════════════
   MOBILE NAV OVERLAY
   ══════════════════════════════════════════ */
.mobile-nav-overlay {
  background: #2C4A3B;
  pointer-events: none;
  clip-path: circle(0% at calc(100% - 40px) 40px);
  transition: clip-path 0.55s cubic-bezier(0.77,0,0.18,1);
}
.mobile-nav-overlay.open {
  pointer-events: all;
  clip-path: circle(150% at calc(100% - 40px) 40px);
}
.mobile-nav-link {
  font-family: 'Literata', serif;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 300;
  color: rgba(246,243,236,0.85);
  text-decoration: none;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(20px);
  transition: color 0.3s ease, opacity 0.4s ease, transform 0.4s ease;
}
.mobile-nav-overlay.open .mobile-nav-link {
  opacity: 1; transform: translateY(0);
}
.mobile-nav-overlay.open .mobile-nav-link:nth-child(1) { transition-delay: 0.15s; }
.mobile-nav-overlay.open .mobile-nav-link:nth-child(2) { transition-delay: 0.22s; }
.mobile-nav-overlay.open .mobile-nav-link:nth-child(3) { transition-delay: 0.29s; }
.mobile-nav-overlay.open .mobile-nav-link:nth-child(4) { transition-delay: 0.36s; }
.mobile-nav-link:hover { color: #c5523f; }

/* Hamburger bars */
.ham-bar {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
#nav-toggle.open .ham-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: #F6F3EC; }
#nav-toggle.open .ham-bar:nth-child(2) { opacity: 0; width: 0; }
#nav-toggle.open .ham-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: #F6F3EC; }

/* ══════════════════════════════════════════
   SCROLL DOWN INDICATOR
   ══════════════════════════════════════════ */
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}
.scroll-chevron { animation: bounceDown 1.8s ease-in-out infinite; display: block; }
.scroll-down-indicator { text-decoration: none; color: inherit; }

/* ══════════════════════════════════════════
   CAPABILITY NUMBERS
   ══════════════════════════════════════════ */
.cap-num {
  font-family: 'Literata', serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: #c5523f;
  opacity: 0.6;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}
li:hover .cap-num { opacity: 1; }
.cap-arrow { color: #c5523f; }

/* ══════════════════════════════════════════
   BACK TO TOP BUTTON
   ══════════════════════════════════════════ */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #2C4A3B;
  color: #F6F3EC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: none;
  z-index: 200;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s ease;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(44,74,59,0.25);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
#back-to-top:hover { background: #c5523f; }

/* ══════════════════════════════════════════
   HIDE SCROLLBAR (SLIDERS)
   ══════════════════════════════════════════ */
.hide-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ═══════════════════════════════════════════════
   FLOATING ELEMENTS (HERO)
   ═══════════════════════════════════════════════ */
@keyframes float1 {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-20px) rotate(-2deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-15px) rotate(6deg); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0) rotate(6deg); }
  50% { transform: translateY(15px) rotate(1deg); }
}
@keyframes float4 {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50% { transform: translateY(-25px) rotate(-8deg); }
}

.float-anim-1 { animation: float1 6s ease-in-out infinite; }
.float-anim-2 { animation: float2 5s ease-in-out infinite; animation-delay: 1s; }
.float-anim-3 { animation: float3 7s ease-in-out infinite; animation-delay: 2s; }
.float-anim-4 { animation: float4 8s ease-in-out infinite; animation-delay: 0.5s; }
