/* --- Base Styles & Variables --- */
:root {
    --primary-font: 'Exo 2', sans-serif;
    --bg-color: #000000; /* Pure black background */
    --text-color: #e0e0e0;
    --primary-accent: #ffffff; /* Changed from blue to white */
    --secondary-accent: #cccccc; /* Changed from light blue to light grey */
    --card-bg: rgba(255, 255, 255, 0.08); /* More translucent white glass effect */
    --card-border: rgba(255, 255, 255, 0.2);
    --card-shadow: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--primary-font);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Starfield Background --- */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
}

/* --- Header & Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color var(--transition-speed) ease;
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.75);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-accent); /* Changed to white */
    transition: width var(--transition-speed) ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    position: relative;
    transition: transform var(--transition-speed) ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: transform var(--transition-speed) ease, top var(--transition-speed) ease, bottom var(--transition-speed) ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.nav-toggle.active .hamburger { background-color: transparent; }
.nav-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle.active .hamburger::after { transform: rotate(-45deg); bottom: 0; }

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 70px; /* Header height */
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    /* Updated gradient to be white/grey */
    background: linear-gradient(45deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* --- General Section & Card Styling --- */
.content-section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 8px 32px 0 var(--card-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px 0 var(--card-shadow);
}

/* --- Specific Section Styles --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.skill h3 { color: var(--primary-accent); } /* Changed to white */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform var(--transition-speed) ease;
    border: 1px solid var(--card-border);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 75%;
    height: 200px;
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.project-content {
    padding: 1.5rem;
}

.achievements-list {
    list-style: none;
    padding-left: 0;
}

.achievements-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--card-border);
}
.achievements-list li:last-child {
    border-bottom: none;
}

/* --- Form --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-color);
    font-family: var(--primary-font);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
}

/* --- Buttons --- */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    border: none;
    cursor: pointer;
}
.btn-primary {
    background-color: var(--primary-accent);
    color: #000000; /* Black text for contrast on white button */
}
.btn-primary:hover {
    background-color: var(--secondary-accent);
    transform: scale(1.05);
}
.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-accent);
}
.btn-secondary:hover {
    background-color: var(--primary-accent);
    color: #000000; /* Black text on hover */
    transform: scale(1.05);
}
.btn-link {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
}

/* --- Footer --- */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
}
.social-links {
    margin-bottom: 1rem;
}
.social-links a {
    color: var(--text-color);
    margin: 0 1rem;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}
.social-links a:hover {
    color: var(--primary-accent);
}

/* --- Scroll to Top Button --- */

/* --- Glossy Scroll-to-Top Button Styles --- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        0 8px 32px rgba(255, 255, 255, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}
.scroll-top-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: pulse 1.5s ease-out;
}
.scroll-top-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 12px 40px rgba(255, 255, 255, 0.2),
        0 6px 20px rgba(0, 0, 0, 0.1),
        inset 0 2px 6px rgba(255, 255, 255, 0.5),
        inset 0 -2px 6px rgba(0, 0, 0, 0.1);
}
.scroll-top-btn:hover::before {
    left: 100%;
}
.arrow-up {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 18px solid rgba(255, 255, 255, 0.8);
    position: relative;
    transition: all 0.3s ease;
}
.scroll-top-btn:hover .arrow-up {
    border-bottom-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-3px);
}
@keyframes bubble {
    0% {
        transform: scale(0) translateY(0);
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: scale(1.5) translateY(-30px);
        opacity: 0;
    }
}
.bubble {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.scroll-top-btn:hover .bubble {
    animation: bubble 1s ease-out infinite;
}
.bubble:nth-child(2) {
    width: 8px;
    height: 8px;
    left: 15px;
    animation-delay: 0.2s;
}
.bubble:nth-child(3) {
    width: 6px;
    height: 6px;
    right: 15px;
    animation-delay: 0.4s;
}
.bubble:nth-child(4) {
    width: 12px;
    height: 12px;
    left: 25px;
    bottom: 10px;
    animation-delay: 0.6s;
}
.bubble:nth-child(5) {
    width: 7px;
    height: 7px;
    right: 20px;
    bottom: 15px;
    animation-delay: 0.8s;
}
@keyframes pulse {
    0% {
        box-shadow: 
            0 8px 32px rgba(255, 255, 255, 0.1),
            0 4px 16px rgba(0, 0, 0, 0.1),
            inset 0 2px 4px rgba(255, 255, 255, 0.4),
            inset 0 -2px 4px rgba(0, 0, 0, 0.1),
            0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    100% {
        box-shadow: 
            0 8px 32px rgba(255, 255, 255, 0.1),
            0 4px 16px rgba(0, 0, 0, 0.1),
            inset 0 2px 4px rgba(255, 255, 255, 0.4),
            inset 0 -2px 4px rgba(0, 0, 0, 0.1),
            0 0 0 20px rgba(255, 255, 255, 0);
    }
}
@media (max-width: 768px) {
    .scroll-top-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .arrow-up {
        border-left-width: 10px;
        border-right-width: 10px;
        border-bottom-width: 15px;
    }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 2rem 0;
        text-align: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}
