/* --- MODERN & PROFESSIONAL PORTFOLIO STYLING (DARK THEME) --- */

/* 1. CSS Variables & Global Styles */
:root {
    --bg-light: #f8f9fa;
    --primary-dark: #1a1b2f;
    --secondary-dark: #2a2c47;
    --text-light: #f1f3f5;
    --text-dark: #212529;
    --accent-gold: #ffc107;
    --accent-glow: #ffc10733;
    --card-bg: #ffffff;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

/* Global Styles - DARK THEME */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.7;
    scroll-behavior: smooth;
}

a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-gold);
}

/* Scrollbar - DARK THEME */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e5077;
}

/* Navbar - DARK THEME */
nav {
    background: rgba(42, 44, 71, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: box-shadow 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

nav .logo {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--text-light);
}

nav .nav-links-container {
    display: flex;
}

nav .nav-links a {
    margin-left: 2rem;
    font-weight: 600;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    /* Ensure it's on top */
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active .line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero-section {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 2rem;
}

.hero-content {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-text {
    flex: 1.5;
}

.hero-text p {
    font-size: 1.2rem;
    margin: 0;
}

.hero-text h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 0.5rem 0;
}

.hero-text h1 span:last-child {
    color: var(--accent-gold);
}

.wavy-line {
    width: 150px;
    stroke: var(--accent-gold);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 2s ease-out forwards;
    animation-delay: 1s;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-text h2 {
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 1.5rem;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--secondary-dark);
    box-shadow: 0 0 40px var(--accent-glow);
}

.hero-stats {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-item p {
    margin: 0;
    opacity: 0.8;
}

.stat-item span {
    font-size: 2.5rem;
    font-weight: 700;
}

main {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.section h2 {
    font-weight: 900;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-light);
}

.card {
    background: var(--secondary-dark);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), var(--accent-glow), transparent 80%);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.card:hover::before {
    opacity: 1;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card.wide {
    grid-column: span 2;
}

.project-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    margin-top: 0;
}

.project-card i {
    color: var(--accent-gold);
}

.contact-prompt {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-button {
    background: transparent;
    color: var(--accent-gold);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    border: 2px solid var(--accent-gold);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
    position: relative;
    /* Fix for card hover effect */
    z-index: 10;
}

.contact-button:hover {
    color: var(--primary-dark);
    background: var(--accent-gold);
    transform: scale(1.05);
    box-shadow: 0 8px 20px var(--accent-glow);
}

.contact-button i {
    margin-right: 0.5rem;
}

footer {
    text-align: center;
    padding: 2.5rem;
    margin-top: 4rem;
    background: var(--secondary-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- ANIMATIONS --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll:nth-child(2) {
    transition-delay: 0.1s;
}

.animate-on-scroll:nth-child(3) {
    transition-delay: 0.2s;
}

.animate-on-scroll:nth-child(4) {
    transition-delay: 0.3s;
}

.hero-stats .animate-on-scroll {
    transition-delay: 0.4s;
}

/* --- RESPONSIVE STYLING --- */

/* Tablet View */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }

    .hero-stats {
        flex-direction: row;
        justify-content: center;
        gap: 2.5rem;
        width: 100%;
        margin-top: 2rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card.wide {
        grid-column: span 1;
    }
}

/* Mobile View */
@media (max-width: 768px) {
    body {
        line-height: 1.6;
    }

    main {
        padding: 0 1.5rem;
    }

    .hamburger {
        display: block;
    }

    /* Side menu container */
    .nav-links-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--primary-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
    }

    .nav-links-container.active {
        right: 0;
    }

    /* This is the key fix! */
    .nav-links {
        display: flex;
        /* Make it a flex container */
        flex-direction: column;
        /* Stack links vertically */
        align-items: center;
        /* Center them horizontally */
        gap: 2.5rem;
        /* Add space between links */
    }

    .nav-links a {
        margin: 0;
        /* Remove horizontal margin from desktop */
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 3rem 1.5rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-image img {
        width: 250px;
        height: 250px;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-direction: column;
        /* Stack stats on small mobile */
    }

    .stat-item span {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .card {
        padding: 1.5rem;
    }
}