* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0f0f1e;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    height: 70px; /* Fixed height for consistent spacing */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6c63ff;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #6c63ff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #6c63ff;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(108, 99, 255, 0.1) 0%, rgba(15, 15, 30, 1) 70%);
    padding-top: 80px; /* Add padding to account for fixed navbar */
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    border: 4px solid rgba(108, 99, 255, 0.3);
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: #a0a0a0;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 10px;
    color: #6c63ff;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #6c63ff;
    color: white;
    transform: translateY(-2px);
}

.tech-stack {
    margin-top: 3rem;
}

.tech-stack h3 {
    color: #6c63ff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tech-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.tech-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 10px;
    font-size: 2rem;
    color: #6c63ff;
    transition: all 0.3s ease;
}

.tech-icon:hover {
    background: #6c63ff;
    color: white;
    transform: translateY(-2px);
}

/* Section Styling */
.section {
    padding: 5rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.1);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.about-text p {
    color: #a0a0a0;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.download-cv {
    margin-top: 1rem;
    display: inline-block;
    padding: 12px 30px;
    background: #6c63ff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.download-cv:hover {
    background: #5a52d5;
    transform: translateY(-2px);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(108, 99, 255, 0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: #6c63ff;
    background: rgba(108, 99, 255, 0.1);
}

.service-icon {
    font-size: 3rem;
    color: #6c63ff;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.service-card p {
    color: #a0a0a0;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(108, 99, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    border-color: #6c63ff;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    min-height: 250px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.02);
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h3 {
    color: #ffffff;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.portfolio-category {
    color: #6c63ff;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.portfolio-content p {
    color: #a0a0a0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Portfolio Links */
.portfolio-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.demo-btn, .github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.demo-btn {
    background: #6c63ff;
    color: white;
}

.demo-btn:hover {
    background: #5a52d5;
    transform: translateY(-2px);
}

.github-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.github-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Portfolio Toggle Button */
.portfolio-toggle {
    text-align: center;
    margin-top: 3rem;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 15px 30px;
    background: linear-gradient(135deg, #6c63ff 0%, #8a7fff 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
    flex-direction: row;
}

.show-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
    background: linear-gradient(135deg, #5a52d5 0%, #7a6fff 100%);
}

.show-more-btn i {
    transition: transform 0.3s ease;
}

.show-more-btn:hover i {
    transform: translateY(2px);
}

.hidden-project {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.hidden-project.show {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Section */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6c63ff;
    background: rgba(108, 99, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0a0a0;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #6c63ff;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #5a52d5;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: rgba(15, 15, 30, 0.95);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(108, 99, 255, 0.2);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #6c63ff;
}

.footer p {
    color: #a0a0a0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(15, 15, 30, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        padding-top: 100px; /* Increase padding for mobile */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tech-icons {
        gap: 1rem;
    }

    .tech-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .portfolio-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding-top: 120px; /* Even more padding for very small screens */
    }

    .hero-content {
        padding: 1rem;
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Additional fix for very small devices like iPhone SE */
@media (max-width: 375px) {
    .hero {
        padding-top: 130px;
        min-height: calc(100vh - 70px);
    }
    
    .profile-image {
        width: 140px;
        height: 140px;
        margin-bottom: 1.5rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
}

/* Nest Hub and Nest Hub Max specific fixes */
@media (min-width: 1024px) and (max-height: 600px) {
    .hero {
        padding-top: 90px;
        min-height: calc(100vh - 20px);
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
    }
    
    .tech-stack {
        margin-top: 2rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}