/* =========================
   CSS VARIABLES
========================= */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;

    --text-color: #333;
    --text-light: #666;

    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --card-bg: #ffffff;

    --border-color: #e0e0e0;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --header-height: 70px;
}


/* =========================
   DARK THEME
========================= */

[data-theme="dark"] {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;

    --text-color: #f8f9fa;
    --text-light: #b8c1d1;

    --bg-color: #1a1a2e;
    --bg-secondary: #16213e;
    --card-bg: #0f3460;

    --border-color: #2a2a4e;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
}


/* =========================
   RESET
========================= */

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


/* =========================
   HTML
========================= */

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}


/* =========================
   BODY
========================= */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
    overflow-x: hidden;
}


/* =========================
   MAIN
========================= */

main {
    padding-top: var(--header-height);
}


/* =========================
   CONTAINER
========================= */

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


/* =========================
   LOADER
========================= */

.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: var(--bg-color);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;

    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;

    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);

    border-radius: 50%;

    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-wrapper.fade-out {
    opacity: 0;
    pointer-events: none;
}


/* =========================
   HEADER
========================= */

.header {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: var(--header-height);

    background: var(--bg-color);

    backdrop-filter: blur(10px);

    z-index: 1000;

    transition: var(--transition);

    border-bottom: 1px solid var(--border-color);
}


/* =========================
   NAVBAR
========================= */

.navbar {
    height: 100%;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    height: 100%;

    margin: 0 auto;
    padding: 0 20px;

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


/* LOGO */

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;

    text-decoration: none;
}


/* NAV MENU */

.nav-menu {
    display: flex;

    list-style: none;

    gap: 2rem;
}

.nav-link {
    color: var(--text-color);

    text-decoration: none;

    font-weight: 500;

    transition: var(--transition);

    position: relative;
}

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

.nav-link::after {
    content: '';

    position: absolute;

    bottom: -5px;
    left: 0;

    width: 0;
    height: 2px;

    background: var(--primary-color);

    transition: width 0.3s ease;
}

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


/* THEME BUTTON */

.theme-toggle {
    cursor: pointer;

    padding: 0.5rem;

    border-radius: 50%;

    background: var(--bg-secondary);

    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
}


/* MOBILE MENU BUTTON */

.nav-toggle {
    display: none;

    flex-direction: column;

    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;

    background: var(--text-color);

    margin: 3px 0;

    transition: var(--transition);
}


/* =========================
   HERO SECTION
========================= */

.hero {
    min-height: calc(100vh - var(--header-height));

    display: flex;
    align-items: center;

    padding: 70px 0 90px;

    background:
        linear-gradient(135deg,
            var(--bg-color) 0%,
            var(--bg-secondary) 100%);

    position: relative;

    overflow: hidden;

    isolation: isolate;
}


/* HERO BACKGROUND EFFECT */

.hero::before {
    content: '';

    position: absolute;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background:
        radial-gradient(circle at 20% 80%,
            var(--primary-color) 0%,
            transparent 50%),
        radial-gradient(circle at 80% 20%,
            var(--secondary-color) 0%,
            transparent 50%);

    opacity: 0.1;

    z-index: -2;
}


/* SMOOTH TRANSITION TO ABOUT */

.hero::after {
    content: '';

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 100px;

    background: linear-gradient(to bottom,
            transparent 0%,
            var(--bg-secondary) 100%);

    z-index: -1;

    pointer-events: none;
}


/* HERO CONTAINER */

.hero-container {
    max-width: 1200px;

    width: 100%;

    margin: 0 auto;

    padding: 0 20px;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 4rem;

    align-items: center;

    position: relative;

    z-index: 2;
}


/* HERO CONTENT */

.hero-content {
    animation: fadeInLeft 1s ease;
}

.hero-title {
    font-size: 3.5rem;

    font-weight: bold;

    margin-bottom: 1rem;

    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;

    margin-bottom: 1rem;

    min-height: 2rem;
}

.typing-text {
    color: var(--primary-color);

    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;

    color: var(--text-light);

    margin-bottom: 2rem;
}


/* =========================
   HERO BUTTONS
========================= */

.hero-buttons {
    display: flex;

    gap: 1rem;

    margin-bottom: 2rem;

    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.5rem;

    border: none;

    border-radius: 50px;

    font-weight: 600;

    text-decoration: none;

    transition: var(--transition);

    cursor: pointer;

    display: inline-flex;

    align-items: center;

    gap: 0.5rem;

    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;

    color: var(--primary-color);

    border: 2px solid var(--primary-color);
}

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

    color: white;

    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;

    color: var(--text-color);

    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);

    color: var(--primary-color);

    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;

    font-size: 0.9rem;
}


/* =========================
   SOCIAL ICONS
========================= */

.hero-social {
    display: flex;

    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: var(--bg-secondary);

    display: flex;

    align-items: center;
    justify-content: center;

    color: var(--text-color);

    text-decoration: none;

    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary-color);

    color: white;

    transform: translateY(-3px);
}


/* =========================
   HERO IMAGE
========================= */

.hero-image {
    display: flex;

    justify-content: center;
    align-items: center;

    animation: fadeInRight 1s ease;
}

.profile-card {
    width: 300px;
    height: 300px;

    border-radius: 20px;

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    overflow: hidden;

    box-shadow: var(--shadow);

    transition: var(--transition);
}

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

    box-shadow: var(--shadow-hover);
}

.profile-img {
    width: 100%;
    height: 100%;

    border-radius: 20px;

    overflow: hidden;
}

.profile-img img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}


/* =========================
   GENERAL SECTIONS
========================= */

section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;

    text-align: center;

    margin-bottom: 3rem;

    position: relative;

    color: var(--text-color);
}

.section-title::after {
    content: '';

    position: absolute;

    bottom: -10px;

    left: 50%;

    transform: translateX(-50%);

    width: 60px;
    height: 3px;

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));
}


/* =========================
   ABOUT SECTION
========================= */
.about {
    background: var(--bg-secondary);
    padding: 70px 0 90px;
    scroll-margin-top: var(--header-height);
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    display: block;
    width: 100%;
}

.about-text p {
    display: block;
    font-size: 1.08rem;
    line-height: 1.8;
    margin: 0 auto 1.5rem;
    max-width: 850px;
    color: var(--text-light);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.stat-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-item h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}


/* =========================
   ANCHOR SCROLL FIX
========================= */

.skills,
.experience,
.projects,
.education,
.contact {
    scroll-margin-top: var(--header-height);
}


/* =========================
   SKILLS
========================= */

.skills-grid {
    display: grid;

    grid-template-columns: repeat(auto-fit,
            minmax(300px, 1fr));

    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);

    padding: 2rem;

    border-radius: 15px;

    box-shadow: var(--shadow);

    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);

    box-shadow: var(--shadow-hover);
}

.skill-category h3 {
    color: var(--primary-color);

    margin-bottom: 1.5rem;

    font-size: 1.3rem;
}

.skill-item {
    margin-bottom: 1rem;
}

.skill-item span {
    display: block;

    margin-bottom: 0.5rem;

    font-weight: 500;
}

.skill-bar {
    width: 100%;

    height: 8px;

    background: var(--border-color);

    border-radius: 10px;

    overflow: hidden;
}

.skill-progress {
    height: 100%;

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    border-radius: 10px;

    width: 0;

    transition: width 2s ease;
}


/* =========================
   EXPERIENCE
========================= */

.experience {
    background: var(--bg-secondary);
}

.timeline {
    max-width: 800px;

    margin: 0 auto;

    position: relative;
}

.timeline::before {
    content: '';

    position: absolute;

    left: 50%;

    top: 0;
    bottom: 0;

    width: 2px;

    background: var(--primary-color);

    transform: translateX(-50%);
}

.timeline-item {
    position: relative;

    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;

    left: 50%;
    top: 0;

    width: 20px;
    height: 20px;

    background: var(--primary-color);

    border-radius: 50%;

    transform: translateX(-50%);

    z-index: 1;
}

.timeline-content {
    background: var(--card-bg);

    padding: 2rem;

    border-radius: 15px;

    box-shadow: var(--shadow);

    width: calc(50% - 40px);

    margin-left: auto;

    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);

    box-shadow: var(--shadow-hover);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;

    margin-right: auto;
}

.timeline-date {
    color: var(--primary-color);

    font-weight: 600;

    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    color: var(--text-color);

    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-light);

    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    margin-bottom: 0.5rem;

    padding-left: 1.5rem;

    position: relative;
}

.timeline-content li::before {
    content: '▸';

    position: absolute;

    left: 0;

    color: var(--primary-color);
}


/* =========================
   PROJECTS
========================= */

.projects-grid {
    display: grid;

    grid-template-columns: repeat(auto-fit,
            minmax(350px, 1fr));

    gap: 2rem;
}

.project-card {
    background: var(--card-bg);

    border-radius: 15px;

    overflow: hidden;

    box-shadow: var(--shadow);

    transition: var(--transition);
}

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

    box-shadow: var(--shadow-hover);
}

.project-image {
    height: 200px;

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 3rem;

    color: white;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    color: var(--text-color);

    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-light);

    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;

    flex-wrap: wrap;

    gap: 0.5rem;

    margin-bottom: 1.5rem;
}

.project-tech span {
    background: var(--bg-secondary);

    color: var(--primary-color);

    padding: 0.3rem 0.8rem;

    border-radius: 20px;

    font-size: 0.9rem;
}

.project-buttons {
    display: flex;

    gap: 1rem;
}


/* =========================
   EDUCATION
========================= */

.education {
    background: var(--bg-secondary);
}

.education-grid {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;

    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.education-card {
    width: 100%;
    max-width: 100%;

    margin: 0;

    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;

    box-shadow: var(--shadow);

    display: flex;
    gap: 2rem;
    align-items: center;

    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-5px);

    box-shadow: var(--shadow-hover);
}

.education-icon {
    width: 80px;
    height: 80px;

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    color: white;

    font-size: 2rem;

    flex-shrink: 0;
}

.education-content h3 {
    color: var(--text-color);

    margin-bottom: 0.5rem;
}

.education-content h4 {
    color: var(--primary-color);

    margin-bottom: 0.5rem;
}

.education-date {
    color: var(--text-light);

    margin-bottom: 1rem;
}

.education-content p {
    color: var(--text-light);
}


/* =========================
   CONTACT
========================= */

.contact-content {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 3rem;

    max-width: 800px;

    margin: 0 auto;
}

.contact-item {
    display: flex;

    gap: 1rem;

    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    color: white;

    flex-shrink: 0;
}

.contact-details h3 {
    color: var(--text-color);

    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-light);
}

.contact-social h3 {
    color: var(--text-color);

    margin-bottom: 1.5rem;

    text-align: center;
}

.social-links {
    display: flex;

    flex-direction: column;

    gap: 1rem;
}

.social-link {
    display: flex;

    align-items: center;

    gap: 1rem;

    padding: 1rem;

    background: var(--card-bg);

    border-radius: 10px;

    text-decoration: none;

    color: var(--text-color);

    transition: var(--transition);

    box-shadow: var(--shadow);
}

.social-link:hover {
    transform: translateX(5px);

    box-shadow: var(--shadow-hover);

    color: var(--primary-color);
}

.social-link i {
    width: 30px;

    text-align: center;

    color: var(--primary-color);
}


/* =========================
   FOOTER
========================= */

.footer {
    background: var(--bg-secondary);

    padding: 2rem 0;

    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;

    justify-content: space-between;

    align-items: center;

    flex-wrap: wrap;

    gap: 1rem;
}

.footer-social {
    display: flex;

    gap: 1rem;
}

.footer-social-icon {
    width: 35px;
    height: 35px;

    border-radius: 50%;

    background: var(--card-bg);

    display: flex;

    align-items: center;
    justify-content: center;

    color: var(--text-color);

    text-decoration: none;

    transition: var(--transition);
}

.footer-social-icon:hover {
    background: var(--primary-color);

    color: white;
}


/* =========================
   SCROLL TO TOP
========================= */

.scroll-to-top {
    position: fixed;

    bottom: 30px;
    right: 30px;

    width: 50px;
    height: 50px;

    border-radius: 50%;

    background: linear-gradient(135deg,
            var(--primary-color),
            var(--secondary-color));

    border: none;

    color: white;

    cursor: pointer;

    display: flex;

    align-items: center;
    justify-content: center;

    opacity: 0;

    visibility: hidden;

    transition: var(--transition);

    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;

    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);

    box-shadow: var(--shadow);
}


/* =========================
   ANIMATIONS
========================= */

@keyframes fadeInLeft {
    from {
        opacity: 0;

        transform: translateX(-50px);
    }

    to {
        opacity: 1;

        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;

        transform: translateX(50px);
    }

    to {
        opacity: 1;

        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;

        transform: translateY(30px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;

    transform: translateY(30px);

    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================
   TABLET / MOBILE
========================= */

@media (max-width: 768px) {

    .header {
        height: var(--header-height);
    }

    .nav-menu {
        position: fixed;

        left: -100%;

        top: var(--header-height);

        flex-direction: column;

        background: var(--bg-color);

        width: 100%;

        text-align: center;

        transition: 0.3s;

        box-shadow: var(--shadow);

        padding: 2rem 0;
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }


    /* MOBILE HERO */

    .hero {
        min-height: calc(100vh - var(--header-height));

        padding: 60px 0 80px;
    }

    .hero::after {
        height: 80px;
    }

    .hero-container {
        grid-template-columns: 1fr;

        text-align: center;

        gap: 2.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-social {
        justify-content: center;
    }

    .profile-card {
        width: 250px;
        height: 250px;
    }

    .profile-img {
        width: 100%;
        height: 100%;
    }


    /* TIMELINE */

    .timeline::before {
        left: 30px;
    }

    .timeline-dot {
        left: 30px;
    }

    .timeline-content {
        width: calc(100% - 60px);

        margin-left: 60px !important;
    }


    /* CONTACT */

    .contact-content {
        grid-template-columns: 1fr;

        gap: 2rem;
    }


    /* FOOTER */

    .footer-content {
        text-align: center;

        justify-content: center;
    }


    /* SECTION TITLE */

    .section-title {
        font-size: 2rem;
    }


    /* ABOUT */

    .about {
        min-height: auto;

        padding: 80px 0;
    }
}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    .hero {
        padding: 50px 0 70px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;

        align-items: center;
    }

    .btn {
        width: 200px;

        justify-content: center;
    }

    .profile-card {
        width: 220px;
        height: 220px;
    }

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

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

    .about-stats {
        grid-template-columns: 1fr;
    }

    .education-card {
        flex-direction: column;

        text-align: center;
    }

    .social-links {
        align-items: center;
    }

    .social-link {
        width: 100%;
    }
}

/* ===== FORCE EXPERIENCE SECTION VISIBLE ===== */

.experience {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 2;
}

.experience .container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.experience .timeline {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.experience .timeline-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.experience .timeline-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.experience h2,
.experience h3,
.experience h4,
.experience p,
.experience li,
.experience ul,
.experience .timeline-date {
    visibility: visible !important;
    opacity: 1 !important;
}