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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* Light mode colors (default) */
:root {
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-shadow: rgba(255, 255, 255, 0.98);
}

/* Dark mode colors */
[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --border-color: #374151;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --navbar-bg: rgba(15, 15, 35, 0.95);
    --navbar-shadow: rgba(15, 15, 35, 0.98);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation */
.navbar {
    background: var(--navbar-bg);
    box-shadow: var(--shadow-light);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

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

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

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

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

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

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Name Header Section */
.name-header {
    position: relative;
    padding: 8rem 0 4rem;
    background: var(--bg-primary);
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.geometric-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.6;
    background-image: url('../images/banner/LightmodeBackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

[data-theme="dark"] .geometric-bg {
    opacity: 0.7;
    background-image: url('../images/banner/DarkmodeBackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@keyframes geometricFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.main-name {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
    filter: drop-shadow(-1px -1px 0 #000) 
            drop-shadow(1px -1px 0 #000) 
            drop-shadow(-1px 1px 0 #000) 
            drop-shadow(1px 1px 0 #000)
            drop-shadow(-1px 0 0 #000)
            drop-shadow(1px 0 0 #000)
            drop-shadow(0 -1px 0 #000)
            drop-shadow(0 1px 0 #000);
}

.main-subtitle {
    font-size: 1.5rem;
    color: white;
    font-weight: 500;
    position: relative;
    z-index: 2;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        -2px 0 0 #000,
        2px 0 0 #000,
        0 -2px 0 #000,
        0 2px 0 #000;
}

/* Welcome Section */
.welcome {
    padding: 4rem 0;
    background: var(--bg-secondary);
    text-align: center;
}

.welcome h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.welcome-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.section-preview h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.preview-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.preview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
    border-color: var(--primary-color);
}

.preview-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.preview-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.preview-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.preview-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

.preview-card:hover .preview-arrow {
    transform: translateX(5px);
}

/* Content Sections */
.about-me, .education, .experience {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.about-me:nth-of-type(even), .education:nth-of-type(even), .experience:nth-of-type(even) {
    background: var(--bg-secondary);
}

.about-me h2, .education h2, .experience h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-content p {
    margin-bottom: 1.5rem;
}

.experience-content {
    max-width: 800px;
    margin: 0 auto;
}

.experience-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.experience-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.experience-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.experience-duration {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.experience-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Skills Section within Experience */
.skills-section {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.skills-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-item {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-item:hover {
    transform: scale(1.05);
}

/* Education Section */
.education {
    background: var(--bg-secondary);
}

.education-content {
    max-width: 800px;
    margin: 0 auto;
}

.education-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.education-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.education-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.education-degree {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-description {
    color: var(--text-secondary);
}

/* Academic Achievements Section */
.achievements-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.achievements-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-primary);
    border-radius: calc(var(--border-radius) * 0.5);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.achievement-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(5px);
}

.achievement-item i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.achievement-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Links Section */
.links {
    padding: 4rem 0;
    background: var(--bg-tertiary);
    text-align: center;
}

.links h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-large);
}

.social-btn.linkedin:hover { border-color: #0077b5; }
.social-btn.github:hover { border-color: #333; }
.social-btn.youtube:hover { border-color: #ff0000; }
.social-btn.photos:hover { border-color: #4285f4; }

.social-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.social-btn.linkedin i { color: #0077b5; }
.social-btn.github i { color: #333; }
.social-btn.youtube i { color: #ff0000; }
.social-btn.photos i { color: #4285f4; }

[data-theme="dark"] .social-btn.github i { color: #f0f6fc; }

.social-btn span {
    font-weight: 600;
    font-size: 1.1rem;
}

.social-btn small {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Photo Carousel */
.photo-carousel {
    padding: 4rem 0;
    background: var(--bg-primary);
    text-align: center;
}

.photo-carousel h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.photo-slide {
    min-width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--border-radius);
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev { left: 1rem; }
.carousel-btn.next { right: 1rem; }

.carousel-footer {
    margin-top: 2rem;
}

.photo-album-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.photo-album-link:hover {
    gap: 0.75rem;
}

/* Contact Me Section */
.contact-me {
    padding: 4rem 0;
    background: var(--bg-secondary);
    text-align: center;
}

.contact-me h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-me p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    font-weight: 500;
}

.contact-option:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.contact-option.email:hover { border-color: var(--primary-color); }
.contact-option.linkedin:hover { border-color: #0077b5; }

.contact-option i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-option.email i { color: var(--primary-color); }
.contact-option.linkedin i { color: #0077b5; }

.contact-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-label {
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
    transition: var(--transition);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-right {
        gap: 1rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 4rem;
        flex-direction: column;
        background-color: var(--navbar-shadow);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        backdrop-filter: blur(10px);
    }

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

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Coded header responsive */
    .coded-header {
        padding: 6rem 0 3rem;
        min-height: 50vh;
    }

    .coded-name {
        font-size: 1rem;
        padding: 1.5rem;
    }

    /* Welcome section responsive */
    .welcome h2 {
        font-size: 2rem;
    }

    .preview-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Social links responsive */
    .social-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .social-btn {
        padding: 1.5rem 1rem;
    }

    /* Contact options responsive */
    .contact-options {
        flex-direction: column;
        align-items: center;
    }

    .contact-option {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* Education responsive */
    .education-item {
        flex-direction: column;
        text-align: center;
    }

    .achievements-section {
        text-align: left;
        margin-top: 1rem;
    }

    .achievement-item {
        justify-content: flex-start;
    }

    /* Experience responsive */
    .experience-item {
        flex-direction: column;
        text-align: center;
    }

    .skills-section {
        text-align: left;
        margin-top: 1rem;
    }

    .skills-list {
        justify-content: center;
    }

    /* Carousel responsive */
    .carousel-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .carousel-btn.prev { left: 0.5rem; }
    .carousel-btn.next { right: 0.5rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .coded-header {
        padding: 5rem 0 2rem;
    }

    .coded-name {
        font-size: 0.875rem;
        padding: 1rem;
    }

    .welcome h2 {
        font-size: 1.75rem;
    }

    .welcome-description {
        font-size: 1.125rem;
    }

    .about-me h2, .education h2, .experience h2, .links h2, .photo-carousel h2, .contact-me h2 {
        font-size: 1.75rem;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .social-btn {
        padding: 1.25rem 1rem;
    }
}