/* =========================================
   1. Variables
   ========================================= */
:root {
  --orange: #FF6A00;
  --bg-1: #040404;
  --bg-2: #0b0b0f;
  --card: #0b1116;
}

/* =========================================
   2. Reset & Base Styles
   ========================================= */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Enable hyphenation for mobile */
body {
  font-family: 'Host Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  hyphens: auto;
  -webkit-hyphens: auto;
  /* Background moved to #global-bg div to fix mobile scaling issues */
  background-color: transparent; /* Changed from var(--bg-1) to transparent so #global-bg is visible */
  /* Default text color for body */
  color: var(--orange);
}

/* Background Wrapper */
#global-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh; /* Use 100vh instead of 100% to ensure full viewport coverage */
  min-height: 100vh; /* Extra safety for mobile browsers */
  z-index: -1;
  background-image: linear-gradient(rgba(4,4,4,0.78), rgba(7,7,7,0.85)), url("assets/images/Texture Grunge UI Black.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  /* Will-change helps mobile browsers handle the fixed layer separately */
  will-change: transform;
  transform: translateZ(0);
}

/* Fix mobile horizontal scroll */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Disable hyphenation on desktop */
@media (min-width: 768px) {
  body {
    hyphens: manual;
    -webkit-hyphens: manual;
  }
}

/* Force primary textual content to orange, excluding h2 and .force-black */
body *:not(svg):not([role="img"]):not(button):not(.btn):not(a):not(.skill-chip):not(.card):not(input):not(textarea):not(h2):not(.force-black):not(.force-black *) {
  color: var(--orange);
}

::selection {
  background: var(--orange);
  color: #000;
}

a { color: var(--orange); }

button:focus, a:focus {
  outline: 2px solid rgba(255,106,0,0.12);
  outline-offset: 3px;
}

/* Accessibility */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =========================================
   3. Typography
   ========================================= */
/* Headings: use BBH Bartle */
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'BBH Bartle', 'Share Tech Mono', monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
}

h2 { color: #ffffff; }

/* Inherit Host Grotesk for standard text elements */
p, header, #experience, .font-body {
  font-family: 'Host Grotesk', sans-serif;
}

/* Keep a small tap highlight on touch devices */
@media (hover: none) {
  h1, h2, h3, h4, h5, h6 { -webkit-tap-highlight-color: rgba(255,106,0,0.06); }
}

/* =========================================
   4. Navigation (Dock & Mobile)
   ========================================= */
/* --- Floating Bottom Dock Nav --- */
#dock-nav {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 40px -10px rgba(0, 0, 0, 0.8);
}

.dock-item {
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dock-item:hover {
  transform: translateY(-2px);
}

/* --- Mobile Menu Overlay --- */
#mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-link {
  position: relative;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s;
  transform: translateY(20px);
  opacity: 0;
}

#mobile-nav.open .mobile-link {
  transform: translateY(0);
  opacity: 1;
}

#mobile-nav.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-nav.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-nav.open .mobile-link:nth-child(4) { transition-delay: 0.3s; }
#mobile-nav.open .mobile-link:nth-child(5) { transition-delay: 0.4s; }

.mobile-link:hover {
  color: var(--orange);
  text-shadow: 4px 4px 0 rgba(255, 255, 255, 0.1);
  transform: skewX(-10deg) translateX(10px) !important;
}

/* Hide scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* =========================================
   5. Components
   ========================================= */

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.72rem 1.25rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(255,106,0,0.16);
  background: linear-gradient(180deg, rgba(255,122,34,1), rgba(255,90,0,1));
  color: #000; /* Text black as requested */
  font-family: 'BBH Bartle', 'Share Tech Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.9,.2,1), box-shadow .26s ease, background .18s ease, color .12s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 28px rgba(255,106,0,0.08);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 6px rgba(255,106,0,0.10);
}

/* Button internal gloss effect */
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(1200px 80px at 10% 20%, rgba(255,255,255,0.08), transparent 18%);
  mix-blend-mode: overlay;
  opacity: 0.85;
  pointer-events: none;
}

.btn::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255,160,80,0);
  transition: box-shadow .26s ease, opacity .26s ease;
  pointer-events: none;
}

.btn > * { position: relative; z-index: 1; }

.btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 28px 70px rgba(255,106,0,0.18), 0 6px 22px rgba(0,0,0,0.48);
}

.btn:hover::after {
  box-shadow: 0 22px 60px rgba(255,106,0,0.14), inset 0 0 24px rgba(255,255,255,0.02);
}

.btn:active { transform: translateY(-1px) scale(0.998); }

.btn--ghost {
  background: transparent;
  color: var(--orange) !important;
  border: 1px solid rgba(255,106,0,0.18);
  box-shadow: none;
}

.btn--ghost:hover { background: rgba(255,106,0,0.06); }

/* --- Cards / Tiles --- */
.card {
  background: linear-gradient(180deg, rgba(255,106,0,0.06), rgba(255,106,0,0.02));
  border: 1px solid rgba(255,106,0,0.12);
  transition: transform .22s cubic-bezier(.2,.9,.2,1), box-shadow .22s;
  border-radius: 0.8rem;
}

.card:focus { box-shadow: 0 0 0 4px rgba(255,106,0,0.06); }

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 50px rgba(255,106,0,0.12), inset 0 0 60px rgba(255,106,0,0.04);
}

.card .aspect-4-3 {
  transition: transform .22s cubic-bezier(.2,.9,.2,1), box-shadow .22s;
}

.card .aspect-4-3:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 30px rgba(255,106,0,0.12), 0 8px 30px rgba(0,0,0,0.6);
}

/* --- Skill Chips --- */
.skill-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.65rem;
  border-radius: 0.35rem; /* Matched to .btn border-radius */
  background: rgba(255,106,0,0.04);
  border: 1px solid rgba(255,106,0,0.12);
  color: var(--orange);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.skill-chip:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(255,106,0,0.08);
  background: rgba(255,106,0,0.06);
}

/* --- Modal --- */
#modal { display: none; }
#modal.show { display: flex; }

/* --- Marquee --- */
.marquee-wrapper {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 2rem;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  min-width: 100%;
  animation: scroll 20s linear infinite;
}

/* Pause on hover for better UX */
.marquee-wrapper:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 2rem)); }
}

/* =========================================
   6. Sections & Specifics
   ========================================= */

/* --- Hero Section --- */
#hero {
  position: relative;
}

/* Hero Headline (3D Modern Grunge Hover) */
#hero-headline {
  font-size: clamp(2.1rem, 6.6vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0 0 0.4rem 0;
  max-width: 90ch;
  position: relative;
  z-index: 1;
  
  /* 3D Base */
  color: #e0e0e0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  perspective: 1000px;
}

#hero-headline:hover {
  /* 3D Tilt & Scale */
  transform: scale(1.05) rotateX(8deg) rotateY(-6deg) rotateZ(1deg);
  
  /* Grunge Shadow / Glitch Effect */
  text-shadow: 
    4px 4px 0px var(--orange),
    -3px -3px 0px rgba(255, 255, 255, 0.15),
    0 0 30px rgba(255, 106, 0, 0.3);
    
  /* Slight character expansion */
  letter-spacing: -0.005em;
}

@media (min-width: 1280px) {
  #hero-headline { font-size: clamp(2.6rem, 6.6vw, 5.2rem); }
}

/* --- Experience Section --- */
#experience article h3 { color: var(--orange); }
#experience article { background-clip: padding-box; }
#experience article .text-xs { color: rgba(255,106,0,0.75); }

/* =========================================
   7. Animations
   ========================================= */

/* --- Scroll Reveal Base --- */
.reveal {
  /* opacity: 0;  Disabled to prevent invisibility if JS fails */
  /* transform: translateY(30px); */
  will-change: opacity, transform;
}

.reveal.active {
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger Delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* --- Hero Entrance Animation (On Load) --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  opacity: 0; /* Start hidden */
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-delay-1 { animation-delay: 0.1s; }
.hero-delay-2 { animation-delay: 0.3s; }
.hero-delay-3 { animation-delay: 0.5s; }

/* --- Subtle Float for Chips/Elements --- */
@keyframes subtle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.animate-float:hover {
  animation: subtle-float 3s ease-in-out infinite;
}/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
