/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    overflow-x: hidden;
    background: #0a0a0a;
}

/* Background and Animations */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0a0a0a 100%);
    z-index: -2;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(30, 144, 255, 0.1), rgba(0, 100, 200, 0.05));
    backdrop-filter: blur(10px);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 10s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 30%;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-40px) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    padding: 15px 30px;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #1e90ff, #00bfff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link:hover {
    background: rgba(30, 144, 255, 0.2);
    color: #1e90ff;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 50px;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    min-height: 8.4rem; /* Fixed height to prevent layout shift */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gradient-text {
    background: linear-gradient(45deg, #1e90ff, #00bfff, #87ceeb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #1e90ff, #0066cc);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 144, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
}

.image-card {
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.image-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    opacity: 1;
    display: block;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about-text {
    padding: 3rem;
    margin: 0 auto;
    max-width: 800px;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #1e90ff;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #d0d0d0;
    line-height: 1.7;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 0.8rem;
    background: rgba(30, 144, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
}

.skill-item:hover {
    background: rgba(30, 144, 255, 0.2);
    transform: translateY(-2px);
}

.skill-item i {
    font-size: 1.5rem;
    color: #1e90ff;
    width: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.skill-item span {
    font-weight: 500;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

/* Education Section */
.education-content {
    max-width: 800px;
    margin: 0 auto;
}

.education-card {
    padding: 3rem;
    margin-bottom: 2rem;
}

.education-info {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.education-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #1e90ff, #0066cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.3);
}

.education-icon i {
    font-size: 2rem;
    color: white;
}

.education-details h3 {
    font-size: 1.8rem;
    color: #1e90ff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.education-details h4 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.education-years {
    color: #b0b0b0;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.education-description {
    color: #d0d0d0;
    line-height: 1.7;
    font-size: 1rem;
}

/* Experience Section */
.experience-content {
    max-width: 1000px;
    margin: 0 auto;
}

.experience-card {
    padding: 3rem;
    margin-bottom: 2rem;
}

.experience-info {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.experience-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #1e90ff, #0066cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.3);
}

.experience-icon i {
    font-size: 2rem;
    color: white;
}

.experience-details h3 {
    font-size: 1.8rem;
    color: #1e90ff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.experience-details h4 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.experience-location {
    color: #b0b0b0;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.experience-years {
    color: #b0b0b0;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.experience-description {
    color: #d0d0d0;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.experience-description p {
    margin-bottom: 0.8rem;
}

.experience-description strong {
    color: #ffffff;
    font-weight: 600;
}

.experience-description ul {
    margin: 0.5rem 0 1rem 1.5rem;
    padding: 0;
}

.experience-description li {
    margin-bottom: 0.5rem;
    color: #d0d0d0;
}

.experience-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 1;
    display: block;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(30, 144, 255, 0.3), rgba(0, 100, 200, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder i {
    font-size: 3rem;
    color: #1e90ff;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 50px;
    height: 50px;
    background: rgba(30, 144, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: #1e90ff;
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e90ff;
}

.project-content p {
    color: #d0d0d0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.tech-tag {
    background: rgba(30, 144, 255, 0.2);
    color: #1e90ff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Contact Section */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    text-align: center;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #1e90ff;
}

.contact-info p {
    color: #d0d0d0;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(30, 144, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: rgba(30, 144, 255, 0.2);
    transform: translateX(5px);
}

.contact-link i {
    color: #1e90ff;
    font-size: 1.2rem;
    width: 20px;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #1e90ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        min-height: 6rem; /* Adjusted height for tablet */
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        align-items: stretch;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 1.5rem 0;
    }
    
    .navbar {
        width: 95%;
        padding: 10px 20px;
    }
    
    .about-text,
    .contact-info {
        padding: 2rem;
    }
    
    /* Mobile fixes for experience and education cards */
    .experience-info,
    .education-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .experience-icon,
    .education-icon {
        align-self: center;
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }
    
    .experience-icon i,
    .education-icon i {
        font-size: 1.5rem;
    }
    
    .experience-card,
    .education-card {
        padding: 2rem 1.5rem;
    }
    
    .experience-details h3,
    .education-details h3 {
        font-size: 1.5rem;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .experience-details h4,
    .education-details h4 {
        font-size: 1.1rem;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .experience-tech,
    .tech-tag {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        min-height: 4.8rem; /* Adjusted height for mobile */
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile footer fixes */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.3rem;
        font-size: 0.8rem;
    }
    
    .footer {
        padding: 1rem 0;
    }
    
    /* Additional mobile fixes for very small screens */
    .experience-card,
    .education-card {
        padding: 1rem 0.8rem;
        margin: 0 0.3rem 1.5rem 0.3rem;
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .experience-details,
    .education-details {
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    .experience-details h3,
    .education-details h3 {
        font-size: 1.2rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: none;
        max-width: 100%;
        white-space: normal;
    }
    
    .experience-details h4,
    .education-details h4 {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    .experience-location,
    .experience-years,
    .education-years {
        font-size: 0.85rem;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .experience-description,
    .education-description {
        font-size: 0.85rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    .experience-description p,
    .education-description p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    .experience-description ul,
    .education-description ul {
        margin-left: 0.8rem;
        padding-right: 0.3rem;
        max-width: 100%;
        overflow: hidden;
    }
    
    .experience-description li,
    .education-description li {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    .experience-tech {
        max-width: 100%;
        overflow: hidden;
    }
    
    .tech-tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        display: inline-block;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* Smooth scrolling and animations */
@media (prefers-reduced-motion: no-preference) {
    .project-card,
    .about-text,
    .contact-info,
    .education-card,
    .experience-card {
        animation: fadeInUp 0.6s ease-out forwards;
        animation-fill-mode: forwards;
    }
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #1e90ff, #0066cc);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #00bfff, #1e90ff);
}
