@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;700&display=swap');

/* --- BASE & SETUP --- */
html {
    scroll-padding-top: 80px;
}
body {
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    --x: 50vw;
    --y: 50vh;
}
/* Prevent scrolling when modals are open */
body.mobile-menu-open, body.modal-open {
    overflow: hidden;
}

/* --- CURSOR LIGHT EFFECT --- */
.cursor-light {
    position: fixed;
    top: var(--y);
    left: var(--x);
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(168, 85, 247, 0) 60%);
    pointer-events: none;
    z-index: 20;
    transition: background 0.2s ease-out;
}

/* --- BACKGROUND --- */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

/* --- HEADER & NAVIGATION --- */
#nav-links a.active {
    color: #c084fc;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.5);
}

/* --- HERO & ANIMATIONS --- */
.Typewriter__cursor {
    color: #c084fc;
    font-weight: bold;
}
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in-down { animation: fadeInDown 1s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 1s ease-out 0.5s forwards; opacity: 0; }

.animate-fade-in-up-delay {
    animation: fadeInUp 1s ease-out 1s forwards; /* 1s delay */
    opacity: 0;
}

.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- SKILLS SECTION --- */
.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.3s ease;
}
.skill-item:hover {
    transform: translateY(-5px);
}
.skill-item p {
    font-weight: 500;
    color: #cbd5e1; /* slate-300 */
    transition: color 0.3s ease;
}
.skill-item:hover p {
    color: #c084fc;
}

/* --- PROJECT CARD --- */
.project-card {
    background-color: rgba(22, 33, 54, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(124, 58, 237, 0.2);
    transform-style: preserve-3d;
    transform: perspective(1000px);
}
.icon-container {
    width: 100%;
    height: 192px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0f172a;
}
.rocket-icon {
    font-size: 80px;
    color: #a78bfa;
    animation: floatAnimation 3s ease-in-out infinite;
}
@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- PROJECT MODAL --- */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.project-modal.open {
    opacity: 1;
    visibility: visible;
}
.project-modal-content {
    background-color: #1e293b;
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 56rem;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.project-modal.open .project-modal-content {
    transform: scale(1);
}
.project-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}
.project-modal-close:hover {
    color: white;
}
#modalTags .tech-tag, .project-card .tech-tag {
    @apply bg-slate-700 text-purple-300 text-sm font-semibold px-3 py-1 rounded-full;
}
.modal-text-content h3 {
    @apply text-xl font-bold text-purple-300 mt-6 mb-2 border-b border-slate-700 pb-2;
}
.modal-text-content p {
    @apply text-slate-400 leading-relaxed;
}


/* --- SCROLL TO TOP BUTTON --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #a855f7;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top-btn:hover {
    background: #9333ea;
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.6);
}

/* --- HAMBURGER MENU & MOBILE MENU --- */
#hamburger-btn {
    position: relative;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger-top,
.hamburger-middle,
.hamburger-bottom {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.hamburger-middle {
    transform: translateY(7px);
}
.hamburger-bottom {
    transform: translateY(14px);
}
#hamburger-btn.open .hamburger-top {
    transform: rotate(45deg) translateY(6px) translateX(6px);
}
#hamburger-btn.open .hamburger-middle {
    opacity: 0;
}
#hamburger-btn.open .hamburger-bottom {
    transform: rotate(-45deg) translateY(6px) translateX(-6px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 10, 15, 0.9);
    backdrop-filter: blur(15px);
    z-index: 40;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.mobile-menu.open {
    transform: translateX(0);
}
.mobile-menu-link {
    color: #cbd5e1;
    transition: color 0.3s ease;
}
.mobile-menu-link:hover {
    color: #c084fc;
}

/* --- SOCIAL LINKS --- */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem; /* 24px */
}
.social-links a {
    color: #94a3b8; /* slate-400 */
    font-size: 1.75rem; /* 28px */
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-links a:hover {
    color: #c084fc; /* purple-400 */
    transform: translateY(-3px);
}

/* --- JOURNEY TIMELINE --- */
.timeline-container {
    position: relative;
    max-width: 48rem; /* 768px */
    margin: 0 auto;
}
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #334155; /* slate-700 */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: #1e293b; /* slate-800 */
    border: 4px solid #a855f7; /* purple-600 */
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}
.timeline-item:nth-child(even) {
    left: 50%;
}
.timeline-item:nth-child(odd)::after {
    left: -10px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: #1e293b; /* slate-800 */
    border: 1px solid rgba(124, 58, 237, 0.2);
    position: relative;
    border-radius: 6px;
}
.timeline-date {
    @apply text-purple-400 font-bold mb-1;
}
.timeline-title {
    @apply text-xl text-white font-bold mb-2;
}
.timeline-description {
    @apply text-slate-400 leading-relaxed;
}
@media screen and (max-width: 768px) {
    .timeline-container::after { left: 15px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 15px; text-align: left !important; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after { left: 5px; }
}

/* --- COMMAND PALETTE --- */
.command-palette {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(9, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    padding-top: 15vh;
    z-index: 2000;
    opacity: 0; visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.command-palette.open {
    opacity: 1; visibility: visible;
}
.command-palette-content {
    background-color: #1e293b; /* slate-800 */
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 0.5rem;
    width: 90%;
    max-width: 40rem; /* 640px */
    height: fit-content;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.98);
    transition: transform 0.2s ease;
}
.command-palette.open .command-palette-content {
    transform: scale(1);
}
.command-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #334155; /* slate-700 */
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1.125rem;
    color: white;
    outline: none;
}
.command-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    overflow-y: auto;
}
.command-list li {
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #cbd5e1; /* slate-300 */
}
.command-list li i {
    color: #94a3b8; /* slate-400 */
}
.command-list li.selected, .command-list li:hover {
    background-color: #a855f7; /* purple-600 */
    color: white;
}
.command-list li.selected i, .command-list li:hover i {
    color: white;
}

/* --- EASTER EGG --- */
.easter-egg-rocket {
    position: fixed;
    left: -50px; /* Start off-screen */
    font-size: 40px;
    color: #a78bfa; /* violet-400 */
    z-index: 3000;
    pointer-events: none;
    animation: fly-across linear;
}
@keyframes fly-across {
    from { transform: translateX(0) rotate(15deg); }
    to { transform: translateX(110vw) rotate(15deg); }
}

/* --- 404 PAGE --- */
.text-404 {
    font-size: 10rem; /* 160px */
    font-weight: 700;
    line-height: 1;
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: linear-gradient(45deg, #4f46e5, #a855f7, #ec4899);
    text-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
    animation: floatText 8s ease-in-out infinite;
}

.astra-rocket {
    font-size: 6rem; /* 96px */
    color: #e2e8f0; /* slate-200 */
    transform: rotate(-35deg);
    animation: floatRocket 6s ease-in-out infinite;
}

.tether {
    position: absolute;
    top: 90px;
    left: 50%;
    width: 2px;
    height: 120px;
    background: linear-gradient(
        to bottom,
        #a855f7,
        rgba(168, 85, 247, 0)
    );
    transform-origin: top center;
    transform: translateX(-50%) rotate(15deg);
    opacity: 0.6;
}

.cta-button {
    @apply inline-block bg-purple-600 text-white font-bold py-3 px-8 rounded-full hover:bg-purple-700 transition duration-300 text-lg mt-12;
    animation: pulseButton 2s ease-in-out infinite;
}

/* Animations for 404 page elements */
@keyframes floatRocket {
    0% { transform: translateY(0px) rotate(-35deg); }
    50% { transform: translateY(-20px) rotate(-40deg); }
    100% { transform: translateY(0px) rotate(-35deg); }
}

@keyframes floatText {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(10px) scale(1.02); }
    100% { transform: translateY(0px) scale(1); }
}

@keyframes pulseButton {
    0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}