/* --- Global & Variables --- */
:root {
    --primary: #1a252c;
    --secondary: #d4af37; /* Gold thread */
    --bg-light: #f4f4f9;
    --text-dark: #333;
    --text-light: #fff;
    --dye-color: rgba(41, 128, 185, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-light); color: var(--text-dark); overflow-x: hidden; scroll-behavior: smooth; }

/* --- Persistent Header --- */
header {
    position: fixed; top: 0; width: 100%; padding: 1.5rem 3rem;
    background: rgba(26, 37, 44, 0.95); backdrop-filter: blur(10px);
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.logo { color: var(--secondary); font-size: 2rem; font-weight: bold; text-decoration: none; letter-spacing: 2px; }
nav a { color: var(--text-light); text-decoration: none; margin-left: 2rem; font-size: 1.1rem; transition: color 0.3s; }
nav a:hover { color: var(--secondary); }

/* --- Base Slide Styling --- */
.slide { min-height: 100vh; padding: 8rem 3rem 4rem; display: flex; align-items: center; justify-content: center; position: relative; opacity: 0; transform: translateY(30px); transition: all 1s ease-out; }
.slide.in-view { opacity: 1; transform: translateY(0); }
.content { max-width: 1100px; width: 100%; z-index: 10; }
.section-title { font-size: 2.5rem; color: var(--primary); border-bottom: 3px solid var(--secondary); display: inline-block; margin-bottom: 2rem; padding-bottom: 0.5rem; }

/* --- Hero Section & Weave Animation --- */
#hero { background: var(--primary); color: var(--text-light); text-align: center; overflow: hidden; }
.hero-content h1 { font-size: 4rem; margin-bottom: 1rem; color: var(--secondary); }
.tagline { font-size: 1.5rem; margin-bottom: 2rem; font-weight: 300; }
.btn { display: inline-block; padding: 1rem 2rem; background: var(--secondary); color: var(--primary); text-decoration: none; font-weight: bold; border-radius: 5px; transition: transform 0.3s; }
.btn:hover { transform: scale(1.05); }

/* Weave Background Animation */
.weave-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.2; }
.warp-threads, .weft-threads { position: absolute; width: 100%; height: 100%; }
.warp-threads {
    background: repeating-linear-gradient(90deg, transparent, transparent 20px, #fff 20px, #fff 40px);
    animation: slideWarp 20s linear infinite;
}
.weft-threads {
    background: repeating-linear-gradient(0deg, transparent, transparent 20px, var(--secondary) 20px, var(--secondary) 40px);
    animation: slideWeft 20s linear infinite; opacity: 0.5;
}
@keyframes slideWarp { from { transform: translateY(0); } to { transform: translateY(-100px); } }
@keyframes slideWeft { from { transform: translateX(0); } to { transform: translateX(-100px); } }
.hero-content { position: relative; z-index: 2; }

/* --- About Section --- */
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
.about-text p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.5rem; }
.hobbies-list { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.hobbies-list h3 { margin-bottom: 1rem; color: var(--primary); }
.hobbies-list ul { list-style: none; }
.hobbies-list li { margin-bottom: 1rem; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.hobbies-list i { color: var(--secondary); }

/* --- Education Section --- */
.edu-container { display: flex; gap: 2rem; margin-bottom: 3rem; }
.edu-card { flex: 1; background: var(--primary); color: white; padding: 2rem; border-radius: 8px; border-left: 5px solid var(--secondary); }
.edu-card h3 { margin-bottom: 0.5rem; }
.institution { color: #ccc; font-style: italic; }
.skills-container { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.skill-category { background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.skill-category h3 { margin-bottom: 1rem; color: var(--primary); }

/* --- Projects Section (Dye Diffusion Animation) --- */
#projects { background: white; position: relative; overflow: hidden; }
.dye-overlay {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, var(--dye-color) 0%, transparent 70%);
    opacity: 0; z-index: 1; transition: opacity 2s ease;
}
.slide.in-view .dye-overlay { opacity: 1; animation: dyeSpread 10s ease-in-out infinite alternate; }
@keyframes dyeSpread { 0% { transform: scale(1) translate(0, 0); } 100% { transform: scale(1.2) translate(5%, 5%); } }
.relative-z { position: relative; z-index: 2; }

.timeline { border-left: 3px solid var(--secondary); padding-left: 2rem; margin-top: 2rem; }
.timeline-item { margin-bottom: 2.5rem; position: relative; }
.timeline-item::before {
    content: ''; position: absolute; left: -2.75rem; top: 0; width: 1rem; height: 1rem;
    background: var(--secondary); border-radius: 50%; border: 3px solid white;
}
.timeline-item h3 { color: var(--primary); margin-bottom: 0.5rem; }
.timeline-item p { line-height: 1.6; color: #555; }

/* --- Contact Section --- */
.text-center { text-align: center; }
.contact-links { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.contact-btn {
    display: flex; align-items: center; gap: 10px; padding: 1rem 2rem;
    background: var(--primary); color: white; text-decoration: none;
    border-radius: 5px; font-size: 1.1rem; transition: background 0.3s;
}
.contact-btn:hover { background: var(--secondary); color: var(--primary); }

/* Responsive adjustments */
@media (max-width: 768px) {
    header { padding: 1rem; flex-direction: column; gap: 1rem; }
    nav a { margin: 0 1rem; }
    .about-grid, .edu-container, .skills-container { grid-template-columns: 1fr; flex-direction: column; }
    .hero-content h1 { font-size: 3rem; }
}
/* --- 3D ZOOM-THROUGH ANIMATION --- */
#zoom-loader {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: #1a252c; 
    z-index: 9999;
    display: flex; 
    justify-content: center; 
    align-items: center;
    overflow: hidden; 
    perspective: 1000px; /* Enables 3D space */
}

/* The Fabric Grid */
.weave-tunnel {
    position: absolute; 
    width: 200vw; 
    height: 200vh;
    /* Creates a dense warp/weft visual */
    background-image: 
        linear-gradient(90deg, rgba(212, 175, 55, 0.3) 2px, transparent 2px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.15) 2px, transparent 2px);
    background-size: 30px 30px;
    transform-origin: center center;
    
    /* The magic transition settings */
    transition: transform 2.5s cubic-bezier(0.7, 0, 0.3, 1), opacity 2s ease-in;
}

.loader-text-container {
    position: relative;
    z-index: 2;
    text-align: center;
    transition: transform 2s ease-in, opacity 1.5s ease-in;
}

.loader-title {
    color: #d4af37; 
    font-size: 5rem; 
    letter-spacing: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.loader-subtitle {
    color: white;
    font-size: 1.5rem;
    margin-top: 10px;
    letter-spacing: 3px;
}

/* --- THE TRIGGER CLASSES (Fired by JavaScript) --- */
.zoom-active .weave-tunnel {
    /* Zooms the fabric 80x its size so you go "through" a tiny square */
    transform: scale(80) translateZ(100px); 
    opacity: 0;
}

.zoom-active .loader-text-container {
    /* Throws the text forward at the screen */
    transform: scale(5) translateZ(400px);
    opacity: 0;
}
