/* ==========================================================================
   1. FIXED BACKGROUND VIDEO
   ========================================================================== */
.fixed-video-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; 
    height: 100vh;
    z-index: -10;
    overflow: hidden;
    background: #000;
}

.bg-video {
    position: absolute;
    top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.6; 
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(17,17,17,0.8) 0%, rgba(17,17,17,0.3) 50%, rgba(17,17,17,0.9) 100%);
}

/* ==========================================================================
   2. HERO SECTION
   ========================================================================== */
.hero {
    height: 100vh;
    position: relative;
    z-index: 1;
}

.hero-content {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1;
    padding: 0 20px;
    pointer-events: none; /* Prevents the invisible container from blocking clicks */
}

.hero-content > * {
    pointer-events: auto; /* Keeps the text selectable and interactable */
}

.hero h1 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 8rem); 
    margin: 0 0 1vh 0;
    letter-spacing: 2px;
    line-height: 1.1;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards; 
}

.hero h2 {
    font-family: var(--font-code);
    font-weight: 400;
    font-size: clamp(1.2rem, 2.5vw, 2.5rem);
    color: var(--text-muted);
    margin: 0;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.7s forwards; 
}

.typewriter-text { color: var(--accent-color); font-weight: 600; }
.typewriter-text::after { content: '|'; color: var(--accent-color); animation: blink 0.7s infinite; }

/* ==========================================================================
   3. SCROLL PROMPT ANIMATION
   ========================================================================== */
.scroll-prompt {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 2rem;
    animation: bounce 2s infinite;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 10;
    cursor: pointer;
}

.scroll-prompt.hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-15px) translateX(-50%); }
    60% { transform: translateY(-7px) translateX(-50%); }
}

/* ==========================================================================
   4. SCROLLING SECTION LAYOUTS
   ========================================================================== */
.home-section {
    padding: 100px 5vw;
    width: 100%;
    scroll-margin-top: 8vh; 
    position: relative;
    z-index: 5; /* This ensures your sections physically slide OVER the fixed hero text! */
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0 0 30px 0;
}

.text-center { text-align: center; }

.solid-bg {
    background-color: var(--bg-color); 
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.glass-bg {
    background: rgba(17, 17, 17, 0.4);
    /* backdrop-filter: blur(12px); */ 
    /* -webkit-backdrop-filter: blur(12px); */
}

/* ==========================================================================
   5. ABOUT & BUTTONS
   ========================================================================== */
.about-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.about-text-column {
    flex: 1; 
}

.about-image-column {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.profile-img {
    width: 280px;
    height: 280px;
    border-radius: 50%; 
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 255, 102, 0.15); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 255, 102, 0.3);
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 800px;
    text-align: left; 
}

.about-text b { color: var(--text-main); }

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
}

.btn-primary:hover {
    background: #00cc55;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 255, 102, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid #444;
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.cta-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   6. CORE SPECIALTIES GRID
   ========================================================================== */
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.specialty-card {
    background: rgba(21, 21, 21, 0.8);
    border: 1px solid #222;
    border-radius: 10px;
    padding: 35px 25px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.specialty-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(0, 255, 102, 0.1);
}

.specialty-icon {
    font-size: 2.8rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.specialty-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: var(--text-main);
}

.specialty-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}

/* ==========================================================================
   7. TECH STACK GRID
   ========================================================================== */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.stack-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.45); 
    font-size: 0.85rem;
    margin-top: 40px;
    font-style: italic;
    line-height: 1.5;
}

.stack-category h3 {
    font-family: var(--font-code);
    color: var(--text-main);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-list { list-style: none; padding: 0; margin: 0; }

.skill-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
}

.skill-name { color: var(--text-muted); }

.skill-name i {
    width: 25px; 
    text-align: center;
    margin-right: 8px;
    color: var(--accent-color);
}

.skill-time { font-family: var(--font-code); color: var(--text-main); font-weight: 600; }

/* ==========================================================================
   8. FEATURED PROJECTS
   ========================================================================== */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mini-project-card {
    display: flex;
    flex-direction: column;
    background: #151515;
    border: 1px solid #222;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.mini-project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.mini-project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #222;
}

.mini-project-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mini-project-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

.mini-project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

.read-more {
    color: var(--text-muted);
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-project-card:hover .read-more {
    color: var(--accent-color);
}

.mini-project-card:hover .read-more i {
    transform: translateX(5px);
    transition: transform 0.3s ease;
    color: var(--accent-color);
}

/* ==========================================================================
   9. EXPERIENCE TIMELINE
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0; bottom: 0;
    width: 2px;
    background: #333;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 50px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: 13px; 
    top: 5px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
    transition: all 0.3s ease; /* Smooth hover transition */
}

/* The interactive hover state for the timeline dot */
.timeline-item:hover .timeline-dot {
    background: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.8);
    transform: scale(1.2);
}

.timeline-date {
    font-family: var(--font-code);
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.timeline-content h3 { margin: 10px 0 5px 0; font-size: 1.5rem; }

/* The wrapper that holds the logo and company name side-by-side */
.company-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px 0;
}

.company-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: contain; 
}

.company-header h4 { margin: 0; color: #888; font-weight: 400; font-size: 1.1rem; }

.timeline-content p { color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ==========================================================================
   10. SHARED TAG SYSTEM (Projects & Experience)
   ========================================================================== */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px; 
    margin-bottom: 20px; 
}

.tag {
    font-family: var(--font-code);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tag i { margin-right: 2px; }

/* Color coding for rapid scanning */
.tag-engine { color: #00d2ff; background: rgba(0, 210, 255, 0.1); border: 1px solid rgba(0, 210, 255, 0.2); }
.tag-lang   { color: #ff3366; background: rgba(255, 51, 102, 0.1); border: 1px solid rgba(255, 51, 102, 0.2); }
.tag-tool   { color: #ffaa00; background: rgba(255, 170, 0, 0.1); border: 1px solid rgba(255, 170, 0, 0.2); }
.tag-area   { color: var(--accent-color); background: rgba(0, 255, 102, 0.1); border: 1px solid rgba(0, 255, 102, 0.2); }

/* ==========================================================================
   11. MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .hero h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); white-space: nowrap; }
    .home-section { padding: 60px 5vw; }
    .timeline::before { left: 10px; }
    .timeline-dot { left: 3px; }
    .timeline-item { padding-left: 40px; }
}

@media (max-width: 992px) {
    .about-grid {
        flex-direction: column-reverse; 
        text-align: center;
        gap: 40px;
    }
    
    .about-text {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .section-title {
        text-align: center;
    }
}