/* ===== ROOT VARIABLES ===== */
:root {
    --nav-height: 80px;
    --bg-dark: #0b0b16;
    --surface-dark: #141424;
    --text-dark: #e2e2fc;
    --accent: #a56eff;
    --accent-glow: #7f4fcf;
    --btn-bg: #a56eff;
    --btn-hover: #8a4de0;
    --card-bg: #1b1b30;
    --border-glow: rgba(165, 110, 255, 0.2);
    --transition: all 0.25s ease;
}

body.light-theme {
    --bg-dark: #f8faff;
    --surface-dark: #ffffff;
    --text-dark: #16162c;
    --accent: #6c3fc9;
    --accent-glow: #8f5ae6;
    --btn-bg: #6c3fc9;
    --btn-hover: #5a32a8;
    --card-bg: #f0f2fe;
    --border-glow: rgba(108, 63, 201, 0.15);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-dark);
    transition: background-color 0.3s, color 0.2s;
    line-height: 1.5;
    scroll-behavior: smooth;
    padding-top: var(--nav-height);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

section {
    padding: 4rem 0;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--bg-dark);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LEFT SECTION - LOGO */
.nav-left {
    flex: 0 0 auto;
}

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent), #b380ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    transform: rotate(5deg);
    transition: var(--transition);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.logo-wrapper:hover .logo-text {
    transform: rotate(0deg) scale(1.1);
}

.logo-full {
    font-size: 1.5rem;
    font-weight: 500;
    background: linear-gradient(130deg, var(--accent), #b380ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* CENTER SECTION - NAVIGATION MENU */
.nav-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    list-style: none;
}

.nav-link {
    position: relative;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--accent);
}

/* RIGHT SECTION - THEME TOGGLE & HAMBURGER */
.nav-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    cursor: pointer;
    background: var(--card-bg);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    border: 1px solid var(--border-glow);
    font-size: 1.3rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--accent);
}

.theme-toggle:hover .theme-icon {
    color: white;
}

.theme-icon {
    transition: var(--transition);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
header.hero {
    padding: 1.5rem 2rem 3rem;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-text {
    flex: 1 1 350px;
}

.hero-text h2 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-text h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    background: linear-gradient(145deg, var(--accent), #c49bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.9rem 2rem;
    background: var(--btn-bg);
    color: white;
    font-weight: 600;
    border-radius: 60px;
    box-shadow: 0 12px 20px -12px var(--accent-glow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.btn:hover {
    background: var(--btn-hover);
    transform: translateY(-4px);
    box-shadow: 0 22px 28px -14px var(--accent);
}

.hero-image img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 40px 20px 40px 20px;
    border: 3px solid var(--accent);
    box-shadow: 0 25px 40px -15px var(--accent-glow);
    transition: 0.4s;
}

.hero-image img:hover {
    transform: scale(1.02) rotate(1deg);
    border-radius: 30px 50px 30px 50px;
}

/* ===== SECTION HEADINGS ===== */
h2 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}

h2:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 70px;
    height: 4px;
    background: var(--accent);
    border-radius: 4px;
}

/* ===== ABOUT SECTION ===== */
.about p {
    font-size: 1.3rem;
    max-width: 800px;
    background: var(--card-bg);
    padding: 2rem 2.5rem;
    border-radius: 40px;
    border: 1px solid var(--border-glow);
    box-shadow: 0 20px 30px -15px rgba(0, 0, 0, 0.5);
    line-height: 1.9;
}

/* ===== SKILLS SECTION ===== */
.skills .skill-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem 4rem;
}

.skill-group {
    background: var(--card-bg);
    padding: 1.8rem 2rem;
    border-radius: 36px;
    border: 1px solid var(--border-glow);
    box-shadow: 0 15px 25px -10px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.skill-group:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

.skill-group h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    color: var(--accent);
}

.skill-group img {
    width: 58px;
    margin: 0.6rem;
    transition: 0.25s;
    filter: drop-shadow(0 4px 6px #00000050);
}

.skill-group img:hover {
    transform: scale(1.2) rotate(3deg);
}

/* ===== TIMELINE SECTION ===== */
.timeline-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
}

.timeline-item {
    background: var(--card-bg);
    padding: 2rem 2.5rem;
    border-radius: 30px;
    border-left: 8px solid var(--accent);
    box-shadow: 0 15px 25px -8px var(--border-glow);
    transition: 0.2s;
}

.timeline-item h3 {
    font-size: 1.9rem;
    font-weight: 600;
}

.timeline-item .date {
    font-weight: 600;
    color: var(--accent);
    margin: 0.5rem 0 1rem;
    font-size: 1.2rem;
}

/* ===== PROJECTS SECTION ===== */
.project-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 32px;
    overflow: hidden;
    flex: 1 1 350px;
    border: 1px solid var(--border-glow);
    transition: var(--transition);
    box-shadow: 0 16px 30px -10px #00000055;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 28px 40px -14px var(--accent);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.project-tech {
    color: var(--text-dark);
    opacity: 0.8;
    font-weight: 500;
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

.project-list {
    list-style-type: none;
    padding: 0;
    margin: 1rem 0;
}

.project-list li {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-list li:before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.2rem 0;
}

.project-tags span {
    background: var(--accent);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.project-tags span:hover {
    transform: scale(1.05);
    background: var(--btn-hover);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

.project-link.github {
    background: #24292e;
    color: white;
}

body.light-theme .project-link.github {
    background: #2f363d;
    color: white;
}

.project-link.github:hover {
    background: #000000;
    transform: translateY(-3px);
}

.project-link.github img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.project-link.demo {
    background: var(--accent);
    color: white;
}

.project-link.demo:hover {
    background: var(--btn-hover);
    transform: translateY(-3px);
}

/* ===== STATS SECTION ===== */
.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 60px;
    padding: 3rem 2rem;
    margin-top: 2rem;
    border: 1px solid var(--border-glow);
}

.stat-item {
    text-align: center;
    min-width: 130px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

/* ===== CONTACT SECTION ===== */
.contact {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.contact h2 {
    margin-bottom: 3rem;
    text-align: left;
}

/* Contact Info Cards */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.contact-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    flex: 1 1 280px;
    max-width: 350px;
    text-align: center;
    border: 1px solid var(--border-glow);
    transition: var(--transition);
    box-shadow: 0 16px 30px -10px #00000055;
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 28px 40px -14px var(--accent);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.contact-card h3 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.contact-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    word-break: break-word;
}

.contact-link {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1rem;
}

.contact-link:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
}

/* GitHub icon filter for dark/light mode */
:root {
    --github-filter: brightness(0) invert(1);
    /* For dark mode - white icon */
}

body.light-theme {
    --github-filter: brightness(0) invert(0);
    /* For light mode - black icon */
}

/* Responsive */
@media (max-width: 768px) {
    .contact-info {
        gap: 1.5rem;
    }

    .contact-card {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    .contact-card h3 {
        font-size: 1.6rem;
    }

    .contact-card p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact {
        padding: 3rem 1rem;
    }

    .contact-icon {
        font-size: 2.5rem;
    }

    .contact-icon img {
        width: 35px;
        height: 35px;
    }

    .contact-link {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2.5rem 1rem;
    border-top: 1px solid var(--border-glow);
    font-size: 1.2rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-center {
        position: static;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        text-align: left;
        padding: 2rem;
        gap: 1.5rem;
        transition: 0.3s;
        border-bottom: 1px solid var(--border-glow);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .logo-full {
        display: none;
    }

    .logo-text {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .project-card {
        flex: 1 1 100%;
    }

    .project-card h3 {
        font-size: 1.5rem;
    }

    .project-image {
        height: 180px;
    }

    .project-links {
        flex-direction: column;
    }

    .project-link {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .hero-text h2 {
        font-size: 2.2rem;
    }

    .hero-text h3 {
        font-size: 1.4rem;
    }

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

    h2 {
        font-size: 2.2rem;
    }

    .skill-group img {
        width: 45px;
    }

    .timeline-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-right {
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .stats-container {
        border-radius: 30px;
        padding: 2rem 1rem;
    }

    .project-content {
        padding: 1.2rem;
    }

    .project-list li {
        font-size: 0.9rem;
    }

    .project-tags span {
        font-size: 0.8rem;
        padding: 0.2rem 0.8rem;
    }
}