/* ===========================
   RESET & GLOBAL STYLES
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066ff;
    --primary-dark: #0052cc;
    --secondary-color: #001a66;
    --accent-color: #00bfff;
    --neutral-100: #f5f7fb;
    --neutral-200: #ebeef3;
    --neutral-400: #a0a8b8;
    --neutral-600: #5a6478;
    --neutral-800: #1a1f2e;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--neutral-800);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   UTILITY CLASSES
   =========================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--neutral-800);
    text-align: center;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-600);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   BUTTONS
   =========================== */

.btn {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 102, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.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(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    font-size: 0.95rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ===========================
   NAVBAR
   =========================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.active {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--neutral-600);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::before {
    width: 100%;
}

.nav-cv-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(0, 191, 255, 0.1));
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    transition: var(--transition);
    cursor: pointer;
}

.nav-cv-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white !important;
    transform: scale(1.1);
}

.nav-cv-btn i {
    font-size: 1.2rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--neutral-800);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 50px;
    background: linear-gradient(135deg, #f5f7fb 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 191, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title br {
    display: none;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--neutral-600);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 102, 255, 0.1);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    background: linear-gradient(135deg, #e8f1ff 0%, #f0f7ff 100%);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-animation {
    flex: 1;
    position: relative;
    height: 400px;
    display: none;
}

.floating-box {
    position: absolute;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0.1;
}

.box1 {
    width: 200px;
    height: 200px;
    top: 50px;
    right: 50px;
    animation: float 6s ease-in-out infinite;
}

.box2 {
    width: 150px;
    height: 150px;
    bottom: 100px;
    right: 100px;
    animation: float 8s ease-in-out infinite 1s;
}

.box3 {
    width: 100px;
    height: 100px;
    bottom: 50px;
    right: 300px;
    animation: float 7s ease-in-out infinite 2s;
}

/* ===========================
   ABOUT SECTION
   =========================== */

.about {
    padding: 80px 20px;
    background: #ffffff;
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    animation: fadeInUp 0.8s ease-out;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--neutral-600);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.about-text strong {
    color: var(--primary-color);
}

.interest-list {
    list-style: none;
    margin-top: 1.5rem;
}

.interest-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--neutral-700);
    font-size: 1rem;
}

.interest-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #f5f7fb 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 102, 255, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.12);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--neutral-800);
}

.stat-card p {
    color: var(--neutral-600);
    font-size: 1rem;
}

/* ===========================
   SKILLS SECTION
   =========================== */

.skills {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fb 0%, #ffffff 100%);
    position: relative;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.skill-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 102, 255, 0.1);
    transition: var(--transition);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.skill-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary-color);
    box-shadow: 0 16px 40px rgba(0, 102, 255, 0.15);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(0, 102, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: scale(1.1);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--neutral-800);
}

.skill-card p {
    color: var(--neutral-600);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.skill-bar {
    background: #e0e7ff;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.skill-progress {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    height: 100%;
    border-radius: 10px;
    transition: var(--transition);
}

.skill-card:hover .skill-progress {
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.5);
}

.skill-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* ===========================
   PROJECTS SECTION
   =========================== */

.projects {
    padding: 80px 20px;
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 102, 255, 0.1);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px rgba(0, 102, 255, 0.2);
}

.project-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f1ff 0%, #f0f7ff 100%);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}


.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--neutral-800);
}

.project-content p {
    color: var(--neutral-600);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

.project-card:hover .tag {
    background: var(--primary-color);
    color: white;
}

/* ===========================
   MODAL
   =========================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--neutral-600);
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--neutral-800);
}

.modal-content h3 {
    color: var(--neutral-800);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--neutral-600);
    line-height: 1.8;
}

/* ===========================
   CONTACT SECTION
   =========================== */

.contact {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fb 0%, #ffffff 100%);
    position: relative;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(0, 102, 255, 0.1);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05), rgba(0, 191, 255, 0.05));
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.contact-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary-color);
    box-shadow: 0 16px 40px rgba(0, 102, 255, 0.2);
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.contact-card:hover i {
    transform: scale(1.15);
}

.contact-card h4 {
    color: var(--neutral-800);
    margin-bottom: 0;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}


/* ===========================
   FOOTER
   =========================== */

.footer {
    background: var(--neutral-800);
    color: white;
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h4 i {
    color: var(--primary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 102, 255, 0.2);
    color: var(--primary-color);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===========================
   BACK TO TOP BUTTON
   =========================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 102, 255, 0.4);
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll animation utility class */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 1rem;
        padding: 2rem 20px;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 10px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-cv-btn {
        width: 36px;
        height: 36px;
    }

    .hero {
        min-height: auto;
        padding: 100px 20px 50px;
        margin-top: 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-image-wrapper {
        max-width: 100%;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .contact-wrapper {
        width: 100%;
    }

    .contact-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1rem;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-cv-btn {
        width: 32px;
        height: 32px;
    }

    .nav-cv-btn i {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
        padding-bottom: 1rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .skill-card,
    .project-card {
        padding: 1.5rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .contact-card i {
        font-size: 2rem;
    }

    .footer-section h4 {
        font-size: 1rem;
    }
}
