:root {
    --bg-color: #030509;
    --text-color: #ffffff;
    --accent-color: #4c51bf; /* Deep purple from your image */
    --accent-light: #a78bfa; /* Light violet from your image */
    --card-bg: #0d1117;
    --card-border: #30363d;
    --text-gray: #9ca3af;    /* Gray color for the sub-text */
    --nav-height: 80px;      /* Defined height for navbar consistency */
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    /* This pushes the logo to the left and the links to the right */
    justify-content: space-between; 
    align-items: center;
    padding: 0 50px;
    z-index: 1000;
    background: rgba(3, 5, 9, 0.8);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-logo { 
    font-weight: 800; 
    font-size: 1.4rem; 
    letter-spacing: 2px; 
    color: var(--accent-light);
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 65px; 
    /* Remove the margin-right: 50px we added earlier to let space-between work */
    margin-right: 0; 
    height: 100%;
}

.nav-logo img {
    height: 75px; /* Your requested size */
    width: auto;
    position: absolute;
    left: -15px; /* Offset to the left */
    top: 50%;
    transform: translateY(-50%); /* Centers image vertically regardless of size */
    object-fit: contain;
    transition: transform 0.3s ease;
    z-index: 1001;
}

.nav-logo img:hover {
    transform: translateY(-50%) scale(1.1);
}


.nav-links { 
    list-style: none; 
    display: flex; 
    gap: 30px; 
    margin: 0; 
    padding: 0;
    /* Ensures the list itself stays aligned to the right end of the flex container */
    margin-left: auto; 
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    opacity: 0.7;
}

.nav-links a:hover { 
    opacity: 1; 
    color: var(--accent-light); 
    font-size:1rem;
    transition: all 500ms;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

#starCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    pointer-events: none;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(4rem, 12vw, 10rem); 
    margin: 0;
    font-weight: 800;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: clamp(1.5rem, 4vw, 3rem); /* Matches your requested 3em roughly but remains responsive */
    color: var(--text-gray);
    font-weight: 500;
    margin-top: 15px;
    text-transform: none;
    letter-spacing: normal;
}

/* --- Typewriter Highlight & Compatibility --- */
.highlight {
    background: linear-gradient(to right, var(--accent-color), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; 
    font-weight: 600;
    display: inline-block;
}

.highlight::after {
    content: "|";
    margin-left: 2px;
    color: var(--accent-light);
    -webkit-text-fill-color: var(--accent-light); /* Important: bypasses the transparent text fill */
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Content Sections --- */
.section-padding { padding: 100px 20px; }
.container { max-width: 1100px; margin: 0 auto; }
.section-title { font-size: 3rem; text-align: center; margin-bottom: 60px; font-weight: 700; }


.about-section { background: var(--bg-color); }
.about-flex { display: flex; align-items: center; gap: 60px; flex-wrap: wrap; }
.about-image { flex: 1; min-width: 300px; text-align: center; }
.about-image img { 
    width: 100%; 
    max-width: 380px; 
    border-radius: 15px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}
.about-text { flex: 1.2; min-width: 300px; }
.about-text h2 { font-size: 2.5rem; margin-top: 0; color: var(--accent-light); }
.about-text p { line-height: 1.8; opacity: 0.8; font-size: 1.1rem; }

/* --- Projects Grid --- */
.projects-section { background: #06090f; }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent-light);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.2);
}

.project-card h3 { margin: 0 0 10px 0; font-size: 1.4rem; color: var(--accent-light); }
.project-card p { opacity: 0.7; font-size: 0.95rem; line-height: 1.6; }
.project-tag {
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    background: rgba(74, 144, 226, 0.1); 
    color: var(--accent-light);
    padding: 4px 10px; 
    border-radius: 4px; 
    display: inline-block; 
    margin-bottom: 15px;
}

/* --- Modal --- */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 2000;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-content {
    background: var(--card-bg); padding: 40px; border-radius: 20px;
    max-width: 600px; width: 100%; position: relative;
    border: 1px solid var(--card-border);
}
.close-modal {
    position: absolute; top: 20px; right: 20px; font-size: 2rem;
    cursor: pointer; color: #555;
}
.close-modal:hover { color: #fff; }
.modal-divider { border: 0; border-top: 1px solid #333; margin: 20px 0; }
#modalTitle { color: var(--accent-light); margin-top: 0; }
#modalDescription { line-height: 1.6; opacity: 0.9; }

/* --- Footer --- */
.footer { padding: 80px 0 40px; text-align: center; background: var(--bg-color); }
.social-btns { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; }
.social-link {
    padding: 10px 25px; 
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px; 
    color: white; 
    text-decoration: none; 
    font-size: 0.9rem; 
    transition: 0.3s;
}
.social-link:hover { 
    background: var(--accent-color); 
    border-color: var(--accent-color); 
}
.small-credit { font-size: 1rem; opacity: 0.3; letter-spacing: 2px; text-transform: uppercase; }

.social-btns {
    display: flex;
    gap: 20px; /* Adjust spacing between the buttons */
    justify-content: center;
    align-items: center;
}

.social-link {
    display: flex;
    flex-direction: column; /* Stacks image on top of text */
    align-items: center;    /* Centers them horizontally */
    text-decoration: none;
    color: inherit;         /* Keeps your original text color */
}

.social-link img {
    width: 32px;            /* Set your desired icon size */
    height: 32px;
    margin-bottom: 8px;     /* Space between image and text */
    transition: transform 0.2s;
}

/* Optional: Add a hover effect */
.social-link:hover img {
    transform: scale(1.1);
}

/* Languages*/
.languages-section { background: #06090f; }

.languages-card-wrapper {
    /* If your project cards have a specific background/border, put it here */
    background: var(--card-bg, #1a1a1a); /* Using a variable or your specific hex */
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 15px;
    padding: 3rem;
    margin-top: 2rem;
}

.languages-grid {
    display: grid;
    /* Responsive grid: icons will wrap automatically */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 3rem 1.5rem;
    justify-items: center;
}

.lang-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.lang-item img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.2));
}

.lang-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color, #ffffff);
}

/* Optional: Slight lift on hover */
.lang-item:hover {
    transform: translateY(-5px);
}


.project-card {
    cursor: pointer; /* Changes mouse to a hand icon */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}


/* Initial state: Hidden */
body {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Old fading method: Fade in when class is added */
body.loaded {
    opacity: 1;
}


/* Container for the cover image */
.project-cover {
    width: calc(100% + 60px); /* Offsets the 30px padding of the card */
    margin: -30px -30px 20px -30px; /* Pulls image to the edges and adds bottom spacing */
    height: 180px;
    overflow: hidden;
    border-radius: 12px 12px 0 0; /* Matches top card corners */
    border-bottom: 1px solid var(--card-border);
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the area without distortion */
    transition: transform 0.4s ease;
}

/* Zoom effect on hover */
.project-card:hover .project-cover img {
    transform: scale(1.05);
}


/* Container for the indicator */
.scroll-indicator {
    position: absolute;
    bottom: 80px; /* Moved higher (was 30px) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

/* Larger White Triangle */
.arrow {
    width: 0; 
    height: 0; 
    /* Increased border sizes for a larger triangle */
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 22px solid white; 
    /* Changed to ease-in-out for smooth motion */
    animation: smoothFloat 2.5s ease-in-out infinite;
    opacity: 0.8;
}

/* Smooth Sine-Wave Motion */
@keyframes smoothFloat {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(15px); /* Moves down 15px */
    }
    100% {
        transform: translateY(0);
    }
}