/* assets/css/style.css */

:root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #6b6b6b;
    --accent: #00ffd5;
    --accent-dim: rgba(0, 255, 213, 0.15);
    --border: #1a1a1a;
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
    line-height: 1.4;
}
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* --- BACKGROUND EFFECTS --- */
.scanlines {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 100;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0px, rgba(0, 0, 0, 0.1) 1px, transparent 1px, transparent 2px);
    opacity: 0.2;
}

/* --- UI ELEMENTS --- */
.glow-text { text-shadow: 0 0 15px var(--accent), 0 0 30px var(--accent); }

.cursor {
    display: inline-block; width: 4px; height: 1.2em;
    background-color: var(--accent); margin-left: 8px;
    animation: blink 1s step-end infinite; vertical-align: middle;
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* --- NAVIGATION --- */
.site-nav {
    position: fixed; top: 30px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(15px);
    padding: 14px 32px; border-radius: 50px; z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex; gap: 30px;
}
.site-nav a {
    color: #888; text-decoration: none; font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem; transition: all 0.3s; text-transform: uppercase; letter-spacing: 1px;
}
.site-nav a:hover { color: var(--accent); }

/* --- HERO SECTION --- */
#hero h1 { 
  /* min size: 2.5rem | preferred: 8vw | max size: 6rem */
  font-size: clamp(2.5rem, 8vw, 6rem); 
  line-height: 1; /* Slight increase from 0.9 prevents letters from crashing if they wrap */
  word-break: break-word; /* Ensures it won't break the layout if a name is exceptionally long */
}
#hero p.roles { font-size: clamp(1.2rem, 3vw, 2.2rem); }
#hero p.intro { font-size: clamp(1rem, 1.5vw, 1.3rem); }

.hero-img {
    filter: grayscale(100%) drop-shadow(0 0 19px rgba(0, 255, 213, 0.2));
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    max-height: 85vh;
    object-fit: contain;
}
.hero-img:hover {
    filter: grayscale(0%) contrast(1.1) drop-shadow(0 0 5px rgba(0, 255, 213, 0.185));
    transform: scale(1.02);
}

/* --- SOCIAL LOGOS --- */
.social-logo {
    display: inline-flex; align-items: center; justify-content: center;
    color: #333; transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1); cursor: pointer;
}
.social-logo:hover { transform: translateY(-8px) scale(1.2); filter: drop-shadow(0 0 8px currentColor); }
.social-logo svg { width: 26px; height: 26px; }

/* --- CAROUSEL ENGINE --- */
.carousel-container, .projects-carousel-container {
    width: 100%; overflow: hidden; padding: 60px 0;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.carousel-track, .projects-carousel-track { display: flex; width: max-content; }
.carousel-track { animation: scrollLTR 45s linear infinite; }
.projects-carousel-track { animation: scrollRTL 55s linear infinite; }


/* Only pause on devices that actually have a hover state (Desktop) */
@media (hover: hover) {
    .carousel-container:hover .carousel-track,
    .projects-carousel-container:hover .projects-carousel-track {
        animation-play-state: paused;
    }
}

/* On Mobile, make sure the track doesn't get 'stuck' if someone taps it */
@media (hover: none) {
    .carousel-container, .projects-carousel-container {
        overflow-x: auto; /* Allows thumb scrolling */
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    /* We hide the animation on mobile so the user can scroll manually */
    /* Or keep it, but accept that manual drag requires JS */
}

@keyframes scrollLTR { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes scrollRTL { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

/* --- EXPERIENCE CARDS --- */
.experience-card {
    position: relative; width: 450px; margin: 0 25px; padding: 35px;
    background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 4px; flex-shrink: 0;
}
.work-logo { width: 55px; height: 55px; border-radius: 8px; object-fit: cover; background: #111; border: 1px solid var(--accent-dim); }
.card-bracket { position: absolute; width: 15px; height: 15px; border-color: var(--accent); border-style: solid; opacity: 0.6; }
.bracket-tl { top: -2px; left: -2px; border-width: 2px 0 0 2px; }
.bracket-tr { top: -2px; right: -2px; border-width: 2px 2px 0 0; }
.bracket-bl { bottom: -2px; left: -2px; border-width: 0 0 2px 2px; }
.bracket-br { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; }

/* --- DYNAMIC TIMELINE (EDUCATION) --- */
.timeline {
    position: relative; max-width: 1200px; margin: 100px auto;
}

/* The vertical line - Starts at center of first circle (52px from top) */
.timeline::after {
    content: ''; position: absolute; width: 2px; background: var(--accent);
    top: 52px; bottom: 52px; left: 50%; margin-left: -1px;
    transform: scaleY(0); transform-origin: top;
    transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1); /* Ultra slow & smooth */
    z-index: 1;
}

.timeline.animate-line::after { transform: scaleY(1); }

.timeline-container {
    padding: 10px 40px; position: relative; width: 50%;
    opacity: 0; transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1); z-index: 2;
}

.timeline-container.visible { opacity: 1; transform: translateY(0); }

.left-timeline-container { left: 0; }
.right-timeline-container { left: 50%; }

.timeline-img-container {
    position: absolute; width: 44px; height: 44px; right: -22px; top: 32px;
    background: #000; border: 2px solid var(--accent); border-radius: 50%;
    z-index: 10; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px var(--accent-dim); overflow: hidden;
}

.timeline-img-container img { width: 100%; height: 100%; object-fit: cover; }

.right-timeline-container .timeline-img-container { left: -22px; }

/* --- PROJECT CARDS --- */
.project-card {
    width: 380px; background: #0a0a0a; border: 1px solid #1a1a1a;
    border-radius: 8px; overflow: hidden; margin: 0 20px; flex-shrink: 0;
}

/* --- FOOTER --- */
.site-footer { padding: 60px 0; border-top: 1px solid #111; text-align: center; opacity: 0.4; font-family: 'JetBrains Mono'; font-size: 0.7rem; letter-spacing: 2px;}

@media screen and (max-width: 768px) {
    .timeline::after { left: 31px; top: 52px; }
    .timeline-container { width: 100%; padding-left: 70px; padding-right: 25px; }
    .right-timeline-container { left: 0; }
    .timeline-img-container { left: 9px !important; }
}



/* Music Control Box */
.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #00ffd5;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border: 1px solid rgba(0, 255, 213, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

/* Glow effect when hovering over the control box */
.music-control:hover {
    border-color: #00ffd5;
    box-shadow: 0 0 15px rgba(0, 255, 213, 0.3);
    transform: translateY(-2px);
}

.music-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.bar {
    width: 2px;
    height: 100%;
    background: #00ffd5;
    animation: music-peak 0.5s ease-in-out infinite alternate;
}

@keyframes music-peak {
    from { height: 20%; }
    to { height: 100%; }
}