/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Theme - Chỉ background, không đổi màu chữ */
:root {
    /* Light Theme - Day Sky */
    --bg-primary: linear-gradient(180deg, #87CEEB 0%, #98D8E8 20%, #B0E0E6 40%, #87CEFA 100%);
}

/* Dark Theme - Night Sky */
body.dark-theme {
    --bg-primary: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 20%, #16213e 40%, #1e3a5f 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: white;
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.5s ease;
}

/* Sky Background Animation */
.sky-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: -2;
    transition: all 0.8s ease;
}

.clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Hide clouds when dark theme is active */
body.dark-theme .clouds {
    opacity: 0;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    animation: float 20s infinite ease-in-out;
}

.cloud:before,
.cloud:after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
}

.cloud-1 {
    width: 100px;
    height: 40px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.cloud-1:before {
    width: 80px;
    height: 80px;
    top: -40px;
    left: 10px;
}

.cloud-1:after {
    width: 60px;
    height: 60px;
    top: -30px;
    right: 10px;
}

.cloud-2 {
    width: 80px;
    height: 30px;
    top: 40%;
    right: 15%;
    animation-delay: -5s;
}

.cloud-2:before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 15px;
}

.cloud-2:after {
    width: 40px;
    height: 40px;
    top: -20px;
    right: 15px;
}

.cloud-3 {
    width: 120px;
    height: 50px;
    top: 60%;
    left: 20%;
    animation-delay: -10s;
}

.cloud-3:before {
    width: 100px;
    height: 100px;
    top: -50px;
    left: 20px;
}

.cloud-3:after {
    width: 80px;
    height: 80px;
    top: -40px;
    right: 20px;
}

.cloud-4 {
    width: 90px;
    height: 35px;
    top: 15%;
    right: 30%;
    animation-delay: -15s;
}

.cloud-4:before {
    width: 70px;
    height: 70px;
    top: -35px;
    left: 20px;
}

.cloud-4:after {
    width: 50px;
    height: 50px;
    top: -25px;
    right: 20px;
}

@keyframes float {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(100px) translateY(-20px);
    }
    50% {
        transform: translateX(200px) translateY(0);
    }
    75% {
        transform: translateX(100px) translateY(20px);
    }
}

/* Stars */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Show stars when dark theme is active */
body.dark-theme .stars {
    opacity: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: twinkle 3s infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* Enhanced twinkle animation for stars */
@keyframes twinkle {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0.5);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2);
    }
}

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

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    animation: pulse 2s infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dark theme navbar */
body.dark-theme .navbar {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.25);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Dark theme scrolled navbar */
body.dark-theme .navbar.scrolled {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h3 {
    color: white;
    font-weight: 700;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-link:hover {
    color: #FFD700;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FFD700;
    transition: width 0.3s ease;
}

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

/* Theme Toggle Button */
.theme-toggle-wrapper {
    margin: 0 20px;
}

#theme-toggle-button {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 4em;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.2s ease;
}

#theme-toggle-button:hover {
    transform: scale(1.05);
}

#toggle {
    opacity: 0;
    width: 0;
    height: 0;
}

#container,
#patches,
#stars,
#button,
#sun,
#moon,
#cloud {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.4s;
}

/* night sky background */
#toggle:checked + svg #container {
    fill: #2b4360;
}

/* move button to right when checked */
#toggle:checked + svg #button {
    transform: translate(28px, 2.333px);
}

/* show/hide sun and moon based on checkbox state */
#sun {
    opacity: 1;
}

#toggle:checked + svg #sun {
    opacity: 0;
}

#moon {
    opacity: 0;
}

#toggle:checked + svg #moon {
    opacity: 1;
}

/* show or hide background items on checkbox state */
#cloud {
    opacity: 1;
}

#toggle:checked + svg #cloud {
    opacity: 0;
}

#stars {
    opacity: 0;
}

#toggle:checked + svg #stars {
    opacity: 1;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

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

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

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

.hero-text {
    color: white;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    animation: slideInLeft 1s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF6347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Remove gradient text overrides */

.hero-text h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    animation: slideInLeft 1s ease 0.2s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
    animation: slideInLeft 1s ease 0.4s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    animation: slideInLeft 1s ease 0.6s both;
}

.btn {
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: white;
    color: #333;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.4);
}

.social-links {
    display: flex;
    gap: 20px;
    animation: slideInLeft 1s ease 0.8s both;
}

.social-links a {
    color: white;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    padding: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-links a:hover {
    color: #FFD700;
    transform: translateY(-5px) rotate(360deg);
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.hero-image {
    text-align: center;
    animation: slideInRight 1s ease 0.5s both;
}

.hero-image img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.hero-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Floating elements */
.floating-element {
    position: absolute;
    animation: float-vertical 3s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 10%;
    animation-delay: 1s;
}

.floating-element:nth-child(3) {
    top: 40%;
    left: 5%;
    animation-delay: 2s;
}

@keyframes float-vertical {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: white;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

/* About Section */
.about {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Dark theme backgrounds */
body.dark-theme .about {
    background: rgba(0, 0, 0, 0.3);
}

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

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.about-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark theme info items */
body.dark-theme .info-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.info-item i {
    color: #FFD700;
    font-size: 1.3rem;
}

/* Skills Section */
.skills {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Dark theme backgrounds */
body.dark-theme .skills {
    background: rgba(0, 0, 0, 0.3);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
    align-items: start;
}

.skill-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

/* Dark theme card styles */
body.dark-theme .skill-category {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF6347);
    transition: left 0.5s;
}

.skill-category:hover::before {
    left: 0;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.skill-category h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
    flex-shrink: 0;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-content: flex-start;
    align-items: center;
    flex: 1;
    text-align: center;
    width: 100%;
}

.skill-tag {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    min-width: fit-content;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.9));
}

.skill-tag:hover::before {
    left: 100%;
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, #FFD700, #FFA500, #FF6347);
    top: 0;
    bottom: 0;    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: 4px solid white;
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

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

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* Dark theme timeline content */
body.dark-theme .timeline-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.2);
}

.timeline-content h3 {
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: none;
}

/* Dark theme timeline titles */
body.dark-theme .timeline-content h3 {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.timeline-content h4 {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.timeline-content .duration {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-style: italic;
}

/* Dark theme timeline duration */
body.dark-theme .timeline-content .duration {
    color: rgba(255, 255, 255, 0.7);
}

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

.timeline-content li {
    color: #374151;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

/* Dark theme timeline list items */
body.dark-theme .timeline-content li {
    color: rgba(255, 255, 255, 0.8);
}

.timeline-content li::before {
    content: '▸';
    color: #FFD700;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Projects Section */
.projects {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Dark theme backgrounds */
body.dark-theme .projects {
    background: rgba(0, 0, 0, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

/* Dark theme project cards */
body.dark-theme .project-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF6347);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

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

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

.project-content {
    padding: 30px;
}

.project-content h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.project-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-type {
    color: #FFD700;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-links a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 20px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.project-links a:hover {
    color: white;
    background: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

/* Contact Section */
.contact {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Dark theme backgrounds */
body.dark-theme .contact {
    background: rgba(0, 0, 0, 0.3);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark theme contact items */
body.dark-theme .contact-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-item:hover {
    transform: translateX(10px);
    background: rgba(255, 215, 0, 0.2);
}

.contact-item i {
    color: #FFD700;
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

.contact-form {
    background: rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark theme contact form */
body.dark-theme .contact-form {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

/* Dark theme form inputs */
body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    padding: 30px 0;
    backdrop-filter: blur(10px);
}

/* Message */
.message {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 15px;    font-weight: 500;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.message.hidden {
    opacity: 0;
    transform: translateX(100%);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    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);
    }
}

/* Responsive Design */
@media (max-width: 768px) {    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    /* Dark theme mobile menu */
    body.dark-theme .nav-menu {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
    }

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

    .hamburger {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 21px;
    }

    .timeline-item:nth-child(even) {
        left: 0%;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-info {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }    /* Mobile Skills Optimization */
    .skills-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
        justify-items: center;
    }

    .skill-category {
        padding: 20px 15px;
        min-height: 150px;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }

    .skill-category h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }    .skill-tags {
        gap: 6px;
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .skill-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-radius: 15px;
        margin: 2px;
    }

    .hero-image img {
        width: 280px;
        height: 280px;
    }
}

/* Extra small devices (phones in portrait mode) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    /* Ultra Mobile Skills */
    .skills-container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 5px;
    }

    .skill-category {
        padding: 15px 12px;
        border-radius: 15px;
        min-height: 130px;
    }

    .skill-category h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }    .skill-tags {
        gap: 5px;
        align-content: flex-start;
        justify-content: center;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .skill-tag {
        padding: 5px 10px;
        font-size: 0.75rem;
        border-radius: 12px;
        min-width: auto;
        flex-shrink: 0;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text h2 {
        font-size: 1.3rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-image img {
        width: 240px;
        height: 240px;
    }
}

/* Landscape phones and small tablets */
@media (max-width: 768px) and (orientation: landscape) {
    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .skill-category {
        min-height: 120px;
        padding: 15px;
    }

    .skill-tags {
        gap: 4px;
    }

    .skill-tag {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* Android specific optimizations */
@media screen and (max-width: 768px) and (-webkit-device-pixel-ratio: 2) {
    .skill-tag {
        -webkit-tap-highlight-color: rgba(255, 215, 0, 0.3);
        touch-action: manipulation;
    }

    .skill-category {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #FFD700, #FFA500);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #FFA500, #FF6347);
}

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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h3 {
    color: #3b82f6;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #3b82f6;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

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

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

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease;
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #3b82f6;
}

.social-links {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s ease 0.8s both;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: #3b82f6;
    transform: translateY(-3px);
}

.hero-image {
    text-align: center;
    animation: fadeInRight 1s ease 0.5s both;
}

.hero-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #3b82f6;
    border-radius: 2px;
}

/* About Section */
.about {
    background: white;
}

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

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #6b7280;
}

.about-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
}

.info-item i {
    color: #3b82f6;
    font-size: 1.2rem;
}

/* Skills Section */
.skills {
    background: #f8fafc;
}

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

.skill-category {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.skill-category h3 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.skill-item {
    margin-bottom: 15px;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Timeline Styles */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: #3b82f6;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 20px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: #3b82f6;
    border: 3px solid white;
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}

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

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd)::after {
    right: -8px;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* Timeline styles already defined above */

/* Projects Section */
.projects {
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 10px;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    background: #e0f2fe;
    color: #0277bd;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-links a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: #2563eb;
}

/* Contact Section */
.contact {
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    color: #1f2937;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #374151;
}

.contact-item i {
    color: #3b82f6;
    font-size: 1.2rem;
    width: 20px;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* Message */
.message {
    position: fixed;
    top: 90px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    transition: all 0.3s ease;
}

.message.success {
    background: #10b981;
    color: white;
}

.message.error {
    background: #ef4444;
    color: white;
}

.message.hidden {
    opacity: 0;
    transform: translateX(100%);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

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

    .hamburger {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

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

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::before {
        left: 60px;
        border: medium solid white;
        border-width: 10px 10px 10px 0;
        border-color: transparent white transparent transparent;
    }

    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 23px;
    }

    .timeline-item:nth-child(even) {
        left: 0%;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-info {
        flex-direction: column;
        gap: 20px;
    }

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

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