* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2962ff;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #fafafa;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 5%;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* Sections Container */
.sections-container {
    position: relative;
    width: 100%;
    height: 100vh;
    padding-top: 80px;
}

/* Sections */
section {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    padding: 4rem 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow-y: auto;
}

section.active {
    opacity: 1;
    visibility: visible;
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Home Section */
#home {
    background: var(--white);
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease;
}

.hero-content .subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-light);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
#about {
    background: var(--bg-light);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 2rem;
    text-align: center;
}

.intro-text {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.about-box {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.about-box h3 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--primary);
    text-align: center;
}

.about-box p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
}

.timeline-item {
    margin-bottom: 1.2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid #e0e0e0;
}

.timeline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.timeline-item h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.timeline-item .period {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.timeline-item p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.cert-item {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.cert-item:last-child {
    margin-bottom: 0;
}

.cert-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.cert-item .cert-org {
    color: var(--text-light);
    font-size: 0.8rem;
}

.skills {
    margin-top: 2rem;
}

.skills h3 {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 1.2rem;
    text-align: center;
}

.skill-item {
    padding: 1.2rem 0.8rem;
    background: var(--white);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.skill-item h4 {
    font-size: 0.85rem;
}

/* Works Section */
#works {
    background: var(--white);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.work-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--bg-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover img {
    transform: scale(1.05);
}

.work-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1.5rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.work-card:hover .work-card-overlay {
    transform: translateY(0);
}

.work-card-overlay h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.work-card-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Work Detail Modal */
.work-detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    padding: 2rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.work-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.work-detail-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.work-detail-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.work-detail-image {
    height: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
    background: #000;
    margin: 10px auto;
}

.work-detail-info {
    padding: 2rem;
}

.work-detail-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.work-detail-info .category {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.work-detail-info p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.work-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.work-meta-item h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.work-meta-item p {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0;
}

/* Contact Section */
#contact {
    background: var(--bg-light);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.contact-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--text-dark);
}

.contact-card p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 4rem;
    justify-content: center;
}

.social-links a {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(41, 98, 255, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .about-sections {
        grid-template-columns: 1fr;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem;
        gap: 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .work-meta {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    section {
        padding: 3rem 5%;
    }

    .work-detail-info {
        padding: 2rem;
    }
    
    .work-detail-image {
        max-height: 40vh;
    }
}