/* Custom Styles for the new dark theme */
html, body {
    overflow-x: hidden;
}
body {
    font-family: 'Inter', sans-serif;
        /* Avoid native smooth scroll to prevent conflict with Locomotive-scroll */
        scroll-behavior: auto;
    background-color: #111827; /* bg-gray-900 */
}

/* Locomotive-scroll core boilerplate */
html.has-scroll-smooth {
    overflow: hidden;
}
.has-scroll-smooth body { overflow: hidden; }

[data-scroll-container] {
    display: block;
    min-height: 100vh;
    will-change: transform;
}

[data-scroll-section] {
    position: relative;
}

/* Scrollytelling layout (content-first: no forced full-height) */
.project-category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 6rem 0;
}
.project-category-grid {
    padding-bottom: 2rem;
}

/* Content-aware spacing for light sections */
#education > .container,
#leadership > .container,
#resume > .container,
#contact > .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Reduced to avoid compounding with section py- classes */
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Reveal animations for cards */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline styles */
.timeline {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.5rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 12px;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    opacity: 0.4;
}
.timeline-item {
    position: relative;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 2.75rem; /* more space from blue dot */
}
.timeline-item::after {
    content: '';
    position: absolute;
    top: 1.25rem;
    left: 6px;
    width: 14px;
    height: 14px;
    background: #60a5fa;
    border: 3px solid #1f2937; /* gray-800 */
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}
/* Virtual Experience badges (text logos to avoid network delays) */
.timeline-badge-wrapper { display:flex; gap:1rem; align-items:flex-start; }
.timeline-badge { flex:0 0 56px; width:56px; height:48px; border-radius:16px; display:flex; align-items:center; justify-content:center; padding:0 6px; font-size:0.60rem; font-weight:700; line-height:1.05; text-align:center; letter-spacing:0.6px; color:#fff; box-shadow:0 4px 14px -2px rgba(0,0,0,0.4); white-space:normal; word-break:break-word; }
.badge-deloitte { background:linear-gradient(135deg,#2563eb,#7c3aed); }
.badge-ba { background:linear-gradient(135deg,#dc2626,#f59e0b); }
.badge-cba { background:linear-gradient(135deg,#059669,#10b981); }
.timeline-item h3 { margin-top:0; }
.timeline-item p { margin-top:0.5rem; }

/* Slide animations */
.fade-in-section { opacity: 1; transform: none; }
.fade-in-section.is-visible { opacity: 1; transform: none; }
.slide-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.slide-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Sticky titles for major sections */
.section-title {
    position: relative;
    z-index: 1;
    padding: 0.25rem 0;
}

/* Mobile timeline fallback */
@media (max-width: 768px) {
  .timeline::before { left: 12px; }
  .timeline-item { width: 100%; margin-left: 0; margin-right: 0; padding-left: 2rem; }
  .timeline-item::after { left: 6px; right: auto; }
    .section-title { position: static; background: transparent; }
}
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 0.25rem;
}
.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}
.card {
    background-color: rgba(31, 41, 55, 0.5); /* bg-gray-800 with opacity */
    border: 1px solid #374151; /* border-gray-700 */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    overflow: hidden; /* To keep image corners rounded */
    border-radius: 0.75rem; /* rounded-xl */
}
.card:hover {
    transform: translateY(-8px);
    border-color: #60a5fa; /* light blue */
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.3);
}
.card:hover img {
    transform: scale(1.05);
}
.card img {
    transition: transform 0.2s ease;
}
.card img:not([src]), .card img[src=""], .card img[onerror] {
    background: #1e293b;
    min-height: 8rem;
    display: block;
}

/* Prevent transient disappearance on refresh for reveal elements */
.reveal-on-scroll { will-change: transform, opacity; }
.reveal-on-scroll.visible { opacity:1 !important; transform:translateY(0) !important; }
/* Helper: project card images editable and consistent height */
.project-card-img { object-fit:cover; width:100%; height:8rem; }
.hero-bg {
    position: relative;
    background-size: cover;
    background-position: center;
}
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-bg { overflow: hidden; }

/* Spacing fix for GSAP-split words */
h1 .word { margin-right: 0.2rem; }
.hero-background-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}
.frosted-button {
    background-color: rgba(59, 130, 246, 0.5); /* bg-blue-600 with opacity */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.7);
}
/* Modal Styles */
.modal-overlay {
    transition: opacity 0.3s ease;
}
.modal-container {
    background-color: rgba(31, 41, 55, 0.8); /* bg-gray-800 with more opacity */
    backdrop-filter: blur(16px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Animation Classes */
.fade-in-section { opacity: 1; transform: none; }
.fade-in-section.is-visible { opacity: 1; transform: none; }
.skill-tag {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.skill-tag.visible {
    opacity: 1;
    transform: translateY(0);
}
.social-icon:hover {
    filter: drop-shadow(0 0 8px #60a5fa);
}

/* Scroll progress bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    z-index: 60;
    transition: width 0.15s ease-out;
}

/* Sticky header subtle elevation on scroll */
header.stuck {
    background-color: rgba(17, 24, 39, 0.85);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Smooth hover transitions for links/buttons */
a, button {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card tilt and lift */
.card:hover {
    transform: translateY(-8px) rotateX(1deg) rotateY(-1deg);
}

/* Parallax hero adjustment (small visual depth) */
/* Parallax for hero is handled via the absolutely positioned image with data-scroll-speed; avoid background-attachment: fixed to prevent conflicts with transform-based scrollers */
.hero-bg { will-change: transform; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  #scroll-progress { transition: none; }
}

/* Custom Cursor */
#custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 28px; height: 28px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 9999px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 2000;
    mix-blend-mode: difference;
}
/* Custom cursor themes */
#custom-cursor[data-theme="dot"] { width: 8px; height: 8px; border: none; background: rgba(255,255,255,0.9); mix-blend-mode: difference; }
#custom-cursor[data-theme="ring"] { border-width: 2px; background: transparent; box-shadow: 0 0 0 2px rgba(255,255,255,0.15) inset; }
#custom-cursor.click-ripple { box-shadow: 0 0 0 2px rgba(99,102,241,0.7) inset, 0 0 18px rgba(99,102,241,0.5); transition: box-shadow 180ms ease; }

/* --- Tabs for Projects --- */
.tabs { position: relative; }
.tab {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.06);
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.tab:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.tab.active { background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(59,130,246,0.35)); color: #fff; border-color: rgba(99,102,241,0.5); }

/* --- Quick Navigation Dock --- */
#quick-nav {
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}
#quick-nav .qnav {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: rgba(17,24,39,0.75);
    border: 1px solid rgba(255,255,255,0.08);
    color: #d1d5db;
    backdrop-filter: blur(6px);
    transition: background 200ms ease, color 200ms ease, transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
#quick-nav .qnav:hover { background: rgba(31,41,55,0.9); color: #fff; transform: translateX(-2px); border-color: rgba(99,102,241,0.45); box-shadow: 0 4px 18px rgba(99,102,241,0.2); }
#quick-nav .qnav.active { background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(59,130,246,0.35)); color: #fff; border-color: rgba(99,102,241,0.5); box-shadow: 0 6px 22px rgba(99,102,241,0.28); }

@media (max-width: 1024px) {
    #quick-nav { right: 0.5rem; }
}
@media (max-width: 768px) {
    #quick-nav { display: none; }
}

/* Small-screen heading margin tuning */
@media (max-width: 640px) {
    h2.section-title { margin-bottom: 1.25rem !important; }
    #contact h2.section-title, #skills h2.section-title, #awards h2.section-title, #experience h2.section-title, #projects h2.section-title { margin-top: 0.5rem; }
}

/* --- Filter animations for tab switching --- */
.filter-anim { transition: opacity 220ms ease, transform 220ms ease; }
.filter-hide { opacity: 0 !important; transform: scale(0.98) !important; pointer-events: none; }
.filter-show { opacity: 1 !important; transform: scale(1) !important; }
