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

:root {
    --color-bg: #f5f5f5;
    --color-surface: #ffffff;
    --color-surface-2: #eeeeee;
    --color-text: #1a1a1a;
    --color-text-secondary: #666666;
    --color-accent: #10b981;
    --color-accent-hover: #059669;
    --color-accent-2: #d1fae5;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

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

/* Navigation */
.nav-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--color-accent);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 20px;
}

.nav-toggle:hover {
    background: var(--color-accent-hover);
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-right: 1px solid #e5e5e5;
    z-index: 1000;
    padding: 40px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s ease-out;
}

nav:hover {
    transform: translateX(0);
}

nav.open {
    transform: translateX(0);
    transition: transform 0.35s ease-out;
}

nav > div {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nav-logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    padding: 0 20px;
    margin-bottom: 40px;
    color: var(--color-accent);
}

.nav-logo:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    padding: 0 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 6px;
    display: block;
}

.nav-links a:hover {
    color: var(--color-accent);
    background: var(--color-accent-2);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.nav-overlay.open {
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    pointer-events: auto;
}

/* Hero Section */
.hero {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: none;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url('images/image.jpg') center center / cover no-repeat;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
}

.hero-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    color: var(--color-accent);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(48px, 8vw, 72px);
    font-weight: 700;
    letter-spacing: 0px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: white;
}

/* Section Styles */
.section {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 80px 20px;
    border-top: 1px solid #e5e5e5;
}

.section-title {
    font-size: clamp(36px, 6vw, 48px);
    font-weight: 700;
    margin-bottom: 60px;
    text-align: center;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-card {
    background: var(--color-surface);
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.project-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.15);
}

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

.project-header {
    height: 180px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    border-bottom: 1px solid #e5e5e5;
}

.project-body {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.project-description {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    flex: 1;
    line-height: 1.7;
}

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

.tag {
    background: var(--color-accent-2);
    color: var(--color-accent);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.project-link {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.project-link:hover {
    gap: 10px;
}

/* Resume Section */
.resume-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.resume-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--color-text);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 10px;
}

.resume-content h3:first-child {
    margin-top: 0;
}

.resume-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.resume-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.resume-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 15px;
}

.resume-subtitle {
    color: var(--color-text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
    font-style: italic;
}

.resume-description {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

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

.skill-item {
    background: var(--color-surface-2);
    padding: 14px 16px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e5e5e5;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-accent-2);
    transition: left var(--transition);
    z-index: -1;
}

.skill-item:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

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

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--color-surface);
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 30px;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.blog-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    transform: translateX(-100%);
    transition: transform var(--transition);
}

.blog-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.15);
}

.blog-card:hover::after {
    transform: translateX(0);
}

.blog-date {
    color: var(--color-text-secondary);
    font-size: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.blog-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.blog-tag {
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 600;
}

/* Article Modal */
.article-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.article-modal-overlay.open {
    display: flex;
}

.article-modal {
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    max-width: 720px;
    width: min(90%, 720px);
    max-height: 80vh;
    padding: 24px 24px 20px;
    position: relative;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.article-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.article-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text);
}

.article-modal-content {
    margin-top: 16px;
}

.article-modal-meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.article-modal-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 128, 0, 0.08);
    color: var(--color-accent);
}

.article-modal-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.article-modal-body {
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.article-modal-image {
    display: block;
    max-width: 100%;
    border-radius: 12px;
    margin: 12px 0 16px;
}

/* Project Modal */
.project-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    backdrop-filter: blur(4px);
}

.project-modal-overlay.open {
    display: flex;
}

.project-modal {
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    max-width: 880px;
    width: min(95%, 880px);
    max-height: 85vh;
    padding: 24px 24px 20px;
    position: relative;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.project-modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.project-modal-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text);
}

.project-modal-content {
    margin-top: 12px;
}

.project-modal-title {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.project-modal-summary {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 14px;
}

.project-modal-video-wrapper {
    margin: 12px 0 18px;
}

.project-modal-video-wrapper iframe,
.project-modal-video-wrapper video {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    border: none;
    aspect-ratio: 16 / 9;
}

.project-modal-body {
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

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

.contact-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--color-accent);
    transform: translateY(-4px);
}

.contact-icon {
    font-size: 32px;
}

.contact-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Footer */
footer {
    border-top: 1px solid #e5e5e5;
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 14px;
}

footer a {
    color: var(--color-accent);
    transition: var(--transition);
}

footer a:hover {
    color: var(--color-accent-hover);
}

/* Responsive */
@media (max-width: 768px) {
    .resume-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .section {
        padding: 50px 20px;
    }

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

    .contact-links {
        gap: 30px;
    }
}

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

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* NEW: Featured Projects horizontal scroll when many cards */
.featured-projects-grid.horizontal-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.featured-projects-grid.horizontal-scroll .project-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
}
