:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #2563eb;
    --border-color: #e2e8f0;
    --shadow-light: rgba(59, 130, 246, 0.08);
    --shadow-medium: rgba(59, 130, 246, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 40px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1px;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--accent);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transition: width 0.3s ease;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.section-title {
    font-size: 40px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 60px;
    text-align: center;
}

/* About Section */
.about {
    padding: 140px 0 120px;
    background-color: var(--bg-primary);
}

.about .section-title {
    text-align: center;
    margin-bottom: 60px;
}

.about-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 60px;
    align-items: start;
}

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

.about-photo {
    width: 260px;
    height: 340px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 30px var(--shadow-light);
    position: relative;
}

.about-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(59, 130, 246, 0.08), transparent);
    pointer-events: none;
}

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

.npdp-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 260px;
}

.npdp-badge:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.npdp-thumb {
    width: 44px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.npdp-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.npdp-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1px;
}

.npdp-sublabel {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.about-right {
    padding-top: 8px;
}

.about-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.about-stats {
    display: flex;
    gap: 60px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: left;
}

.stat-value {
    display: block;
    font-size: 42px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.about-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--accent);
}

.contact-link i {
    color: var(--accent);
}

/* Projects Section */
.projects {
    padding: 120px 0;
    background-color: var(--bg-secondary);
}

.projects .section-title,
.projects .section-subtitle {
    text-align: center;
}

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

.project-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

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

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

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(255, 255, 255, 0.95) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.project-info {
    padding: 24px;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    gap: 10px;
}

.tag {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Skills Section */
.skills {
    padding: 120px 0;
    background-color: var(--bg-primary);
}

.skills .section-title,
.skills .section-subtitle {
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px var(--shadow-medium);
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent);
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.skill-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.skill-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Resume Section */
.resume {
    padding: 120px 0;
    background-color: var(--bg-secondary);
}

.resume .section-title,
.resume .section-subtitle {
    text-align: center;
}

.resume-viewer {
    max-width: 1000px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow-light);
}

/* Viewed Section */
.viewed-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

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

.viewed-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-viewed {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #ffffff;
    padding: 16px 48px;
    border-radius: 40px;
    border: none;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-viewed:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn-viewed.viewed {
    background: var(--bg-secondary);
    color: var(--accent);
    border: 1px solid var(--accent);
    cursor: default;
}

.btn-viewed.viewed:hover {
    transform: none;
    box-shadow: none;
}

.viewed-count {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.viewed-count span {
    color: var(--accent);
    font-weight: 600;
    font-size: 18px;
}

/* Footer */
.footer {
    padding: 30px 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer p {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 20px;
    max-width: 900px;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

.project-intro {
    margin-bottom: 30px;
}

.project-intro h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}

.project-intro p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.project-gallery {
    margin-bottom: 30px;
}

.project-gallery h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #ffffff;
    padding: 15px 10px 10px;
    font-size: 12px;
    text-align: center;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    z-index: 1;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
    display: block;
    text-align: center;
    color: #ffffff;
    margin-top: 15px;
    font-size: 16px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 40px;
    color: #ffffff;
    cursor: pointer;
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 1;
}

/* NPDP Certificate Lightbox */
.npdp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.npdp-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
}

.npdp-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    max-height: 90vh;
}

.npdp-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.npdp-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    font-size: 36px;
    color: #ffffff;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.npdp-lightbox-close:hover {
    opacity: 1;
}

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 15px 20px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .about-left {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }
    
    .about-photo {
        width: 180px;
        height: 240px;
    }
    
    .npdp-badge {
        max-width: none;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 20px;
    }
}