/* ====== CSS RESET & BASE STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0984e3;
    --secondary-color: #00cec9;
    --accent-color: #ffd700;
    --dark-color: #2d3436;
    --light-color: #f9f9f9;
    --gray-color: #636e72;
    --light-gray: #dfe6e9;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.3rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray-color);
}

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

ul {
    list-style: none;
}

/* ====== BUTTON STYLES ====== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.3);
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(9, 132, 227, 0.4);
}

/* ====== NAVIGATION ====== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    padding: 0.8rem 5%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    padding: 2px;
}

.logo h2 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    font-weight: 500;
    color: var(--gray-color);
    padding: 0.5rem 0;
}

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

.line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links li:hover .line {
    width: 100%;
}

/* ====== HAMBURGER MENU ====== */
.menu {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--dark-color);
    z-index: 1001;
}

.menu .fa-times {
    display: none;
}

.menu.active .fa-bars {
    display: none;
}

.menu.active .fa-times {
    display: block;
}

.navMenu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navMenu.active {
    display: block;
}

.navMenu ul {
    padding: 1.5rem 0;
}

.navMenu ul li {
    margin: 0;
    border-bottom: 1px solid var(--light-gray);
}

.navMenu ul li:last-child {
    border-bottom: none;
}

.navMenu ul li a {
    display: block;
    padding: 1.2rem 2rem;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
}

.navMenu ul li a:hover {
    background: var(--light-color);
    color: var(--primary-color);
    padding-left: 2.5rem;
}

/* ====== HERO SECTION ====== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10rem 5% 5rem;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.highlight {
    color: var(--accent-color);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(255, 215, 0, 0.3);
    z-index: -1;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-image {
    position: relative;
    z-index: 1;
    width: 40%;
    animation: fadeIn 1s ease 0.5s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ====== SECTION STYLES ====== */
section {
    padding: 6rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

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

.section-subtitle {
    text-align: center;
    color: var(--gray-color);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* ====== PORTFOLIO SECTION ====== */
.portfolio {
    background: var(--light-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.project:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project a {
    display: block;
    position: relative;
    overflow: hidden;
}

.project img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0 !important;
    border: none;
    transition: transform 0.5s ease;
}

.project:hover img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 132, 227, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project:hover .project-overlay {
    opacity: 1;
}

.project-overlay i {
    color: white;
    font-size: 3rem;
}

.project-info {
    padding: 1.8rem;
}

.project-info h3 {
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.project-info p {
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ====== CATEGORY SECTION ====== */
.category {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.category-select {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0 3rem;
}

.category-btn {
    padding: 0.9rem 2rem;
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 30px;
    color: var(--gray-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-category {
    transition: var(--transition);
}

.project-category.hidden {
    display: none;
}

/* ====== ABOUT SECTION ====== */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.skills-section {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.skills-section h3 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.skill-category {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.skill-category h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.skill-category h4 i {
    color: var(--primary-color);
}

.skill-category ul li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--light-gray);
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category ul li:last-child {
    border-bottom: none;
}

.skill-category ul li i {
    color: var(--primary-color);
}

/* ====== CONTACT SECTION ====== */
.contact {
    background: white;
}

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 15px;
    transition: var(--transition);
}

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

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.contact-form {
    background: var(--light-color);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.1);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    padding-right: 3rem;
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.form-note {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-color);
    font-size: 0.95rem;
}

.social-contact {
    text-align: center;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--light-gray);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.4rem;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(9, 132, 227, 0.3);
}

/* ====== FOOTER ====== */
footer {
    background: var(--dark-color);
    color: white;
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 2px solid var(--primary-color);
}

.footer-logo h3 {
    margin-bottom: 0.5rem;
    color: white;
}

.footer-logo p {
    color: #a0a0a0;
}

.footer-links h4,
.footer-services h4,
.footer-contact h4 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-services h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: #a0a0a0;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-services ul li {
    color: #a0a0a0;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    color: #a0a0a0;
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #a0a0a0;
    margin-bottom: 0.5rem;
}

.footer-bottom i {
    color: #ff6b6b;
    margin: 0 5px;
}

/* ====== BACK TO TOP BUTTON ====== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(9, 132, 227, 0.3);
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.back-to-top.show {
    display: flex;
}

/* ====== RESPONSIVE MEDIA QUERIES ====== */

/* Large Desktop (1200px and above) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    h1 { font-size: 4.5rem; }
    h2 { font-size: 3rem; }
}

/* Desktop (1024px to 1199px) */
@media (max-width: 1199px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    
    .hero {
        padding: 9rem 5% 4rem;
    }
    
    .hero-content h1 {
        font-size: 3.2rem;
    }
}

/* Tablet Landscape (768px to 1023px) */
@media (max-width: 1023px) {
    .nav-links {
        gap: 1.5rem;
    }
    
    .logo h2 {
        font-size: 1.2rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 8rem 5% 4rem;
        min-height: auto;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-image {
        width: 70%;
    }
    
    .portfolio-grid,
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Tablet Portrait (576px to 767px) */
@media (max-width: 767px) {
    nav {
        padding: 1rem 5%;
    }
    
    .logo h2 {
        font-size: 1.1rem;
    }
    
    .menu {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 7rem 5% 3rem;
    }
    
    .hero-content h1 {
        font-size: 2.4rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-image {
        width: 90%;
    }
    
    section {
        padding: 4rem 5%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .portfolio-grid,
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
    
    .category-select {
        gap: 0.8rem;
    }
    
    .category-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Mobile Phones (up to 575px) */
@media (max-width: 575px) {
    .logo h2 {
        font-size: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .project-info {
        padding: 1.5rem;
    }
    
    .skills-section {
        padding: 2rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
    
    .social-icons a {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .logo h2 {
        font-size: 0.9rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .category-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .project img {
        height: 200px;
    }
}

/* Print Styles */
@media print {
    .menu,
    .navMenu,
    .category-select,
    .contact-form,
    .social-contact,
    .back-to-top {
        display: none !important;
    }
    
    nav {
        position: static;
        box-shadow: none;
        background: white;
    }
    
    body {
        color: black;
        background: white;
    }
    
    a {
        color: black;
    }
    
    .hero {
        background: white !important;
        color: black;
        min-height: auto;
        padding: 2rem 5%;
    }
    
    .hero::before {
        display: none;
    }
    
    section {
        padding: 2rem 5%;
        break-inside: avoid;
    }
    
    .project {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}