/* ---- CSS Variables ---- */
:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --text-muted: #8b949e;
    --primary-color: #58a6ff;
    --primary-hover: #3182ce;
    --secondary-color: #21262d;
    --secondary-hover: #30363d;
    --card-bg: rgba(22, 27, 34, 0.7);
    --border-color: #30363d;
    --navbar-bg: rgba(13, 17, 23, 0.85);

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    --transition: all 0.3s ease;
}

/* ---- Reset & Baseline ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

/* Background Pattern (Dot Grid) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(rgba(201, 209, 217, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -2;
    pointer-events: none;
}

/* Floating Animated Shapes Background */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    z-index: -2;
    pointer-events: none;
}

.floating-shapes li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(88, 166, 255, 0.05); /* very subtle primary color */
    border: 1px solid rgba(88, 166, 255, 0.15); /* outline */
    animation: floatShape 25s linear infinite;
    top: -150px;
}

/* Adding variety to the floating shapes */
.floating-shapes li:nth-child(1) { left: 15%; width: 60px; height: 60px; animation-delay: 0s; }
.floating-shapes li:nth-child(2) { left: 5%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; border-radius: 50%; }
.floating-shapes li:nth-child(3) { left: 70%; width: 40px; height: 40px; animation-delay: 4s; }
.floating-shapes li:nth-child(4) { left: 40%; width: 80px; height: 80px; animation-delay: 0s; animation-duration: 18s; border-radius: 50%; }
.floating-shapes li:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.floating-shapes li:nth-child(6) { left: 85%; width: 100px; height: 100px; animation-delay: 3s; }
.floating-shapes li:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; border-radius: 50%; border-style: dashed; }
.floating-shapes li:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }

@keyframes floatShape {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

/* Background Gradients (Micro-aesthetics) */
.bg-blur {
    position: fixed;
    top: -150px;
    left: -150px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.15) 0%, rgba(13, 17, 23, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.bg-blur-secondary {
    position: fixed;
    bottom: -200px;
    right: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.1) 0%, rgba(13, 17, 23, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 60px 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 20px;
}

.section-title {
    font-size: 3rem;
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: transparent;
    padding: 20px 0;
    z-index: 100;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    font-size: 1rem;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* ---- Hero Section ---- */
.hero {
    padding-top: 150px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glowing-orb {
    width: 320px;
    height: 320px;
    background: linear-gradient(135deg, var(--primary-color), #8a2be2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 60px rgba(88, 166, 255, 0.4);
    animation: float 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.glowing-orb::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

.glowing-orb i {
    font-size: 6rem;
    color: #fff;
    z-index: 2;
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--primary-color);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

.greeting {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 30px;
}

.description {
    max-width: 600px;
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: #fff;
}

/* ---- Dual Grid Layout (About & Contact) ---- */
.dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
}

/* ---- About Section ---- */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ---- Skills Section ---- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px 30px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 25px;
    align-items: center;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 166, 255, 0.5);
}

.skill-card h3 {
    margin-bottom: 8px;
    font-size: 1.4rem;
    align-self: end;
}

.skill-icon {
    font-size: 3.5rem;
    margin-bottom: 0;
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bg {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0;
    align-self: start;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* ---- Projects Section ---- */
.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(--border-color);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.folder-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.project-links a {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.project-links a:hover {
    color: #fff;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.project-desc {
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.project-tags span {
    font-size: 0.85rem;
    font-family: var(--font-main);
    color: var(--primary-color);
    background: rgba(88, 166, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

/* ---- Contact Section ---- */
.contact-content {
    text-align: left;
    max-width: none;
    margin: 0;
}

.contact-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 15px 30px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.contact-card:hover {
    background-color: var(--secondary-hover);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.contact-card i {
    font-size: 1.5rem;
}

/* ---- Footer ---- */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ---- Animations ---- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Mobile Menu (Hamburger) ---- */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-color);
}

/* ---- Scroll to Top Button ---- */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    z-index: 99;
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.6);
}

/* ---- Side Bars ---- */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.side-bar {
    position: fixed;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: slideUp 0.8s ease 1s forwards;
}

.side-left {
    left: 40px;
}

.side-bar ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin-bottom: 25px;
}

.side-bar a {
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: var(--transition);
}

.side-bar a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.side-bar .vertical-line {
    width: 2px;
    height: 90px;
    background-color: var(--text-muted);
}

/* Hide sidebars on smaller screens */
@media (max-width: 1024px) {
    .side-bar {
        display: none !important;
    }
}

/* ---- Media Queries ---- */
@media (max-width: 900px) {
    .dual-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        margin-top: 20px;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-visual {
        margin-top: 40px;
    }
    .glowing-orb {
        width: 250px;
        height: 250px;
    }
    .title {
        font-size: 3rem;
    }
    .about-stats {
        grid-template-columns: 1fr;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--navbar-bg);
        backdrop-filter: blur(10px);
        width: 60%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        z-index: 100;
    }
    
    .nav-links.nav-active {
        right: 0;
    }

    .hamburger {
        display: block;
    }

    /* Hamburger Animation */
    .hamburger.toggle .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.toggle .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.toggle .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
