:root {
    --black: #1a1a1a;
    --gray: #666;
    --white: #ffffff;
    --bg-white: #fdfdfd;
    --transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
body { 
    font-family: 'Inter', 
    sans-serif; 
    color: var(--black); 
    background-color: var(--bg-white); 
    line-height: 1.5; 
    padding-bottom: 80px; 
    overflow-x: hidden; 
}

/* Header */
header { 
    padding: 15px 10%; 
    position: sticky; 
    top: 0; 
    background: rgba(253, 253, 253, 0.8); 
    backdrop-filter: blur(10px); 
    z-index: 100; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}

nav { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

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

nav ul li a { 
    text-decoration: none; 
    color: var(--black); 
    font-size: 13px; 
    font-weight: 700; 
    text-align: center; 
}

nav ul li a span { 
    display: block; 
    font-size: 9px; 
    color: #888; 
    font-weight: 400; 
}

.gradient-bg { 
    position: fixed; 
    top: -5%; 
    right: 5%; 
    width: 700px; 
    height: 700px; 
    z-index: -1; 
    filter: blur(100px); 
    background: radial-gradient(circle, rgba(255,182,193,0.3) 0%, rgba(135,206,250,0.3) 30%, transparent 100%); 
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.hero-left {
    padding: 80px 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(0,0,0,0.07);
}

.hero-right {
    padding: 80px 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;

}

.hero-greeting {
    font-size: 20px;
    font-weight: 400;
    color: var(--gray);
    margin-bottom: 8px;
}

h1 {
    font-size: 64px;
    line-height: 1.05;
    margin-bottom: 16px;
    font-weight: 900;
    letter-spacing: -3px;
}

h1 em {
    font-style: italic;
    font-weight: 400;
}

.subtitle {
    font-size: 18px;
    color: var(--black);
    margin-bottom: 4px;
}

.description {
    color: var(--gray);
    font-size: 18px;
    line-height: 1.6;
    max-width: 400px;
}

.open-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    border: 1.5px solid #d1d1d1;
    padding: 8px 18px;
    border-radius: 50px;
    width: fit-content;
}

.open-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4CAF50;
    flex-shrink: 0;
}

.hero-tags-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 10px;
}

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

.hero-tag {
    background-color: #f7f7f7;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    border: 1.5px solid #d1d1d1 !important;
    transition: var(--transition);
    cursor: default;
}

.hero-tag:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black) !important;
    transform: translateY(-2px);
}

.cta-row {
    display: flex;
    align-items: center;
    gap: 35px;
    margin-top: 32px;
}

.cta-link {
    font-size: 32px;
    color: var(--black);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.cta-btn-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
    border-bottom: 2px solid var(--black);
    height: 32px;
    line-height: 32px;
    transition: var(--transition);
    white-space: nowrap;
}

.cta-link:hover, .cta-btn-text:hover {
    transform: translateY(-3px);
    opacity: 0.7;
}

/* About strengths */
.about-strengths {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid #eee;
}

.about-strengths h3 {
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--gray);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    border-left: 4px solid var(--black);
    padding-left: 12px;
}

.about-strengths ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about-strengths ul li {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
}

.about-strengths ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--black);
    opacity: 0.5;
}

/* Sections Common */
section { 
    padding: 100px 10%; 
}
.section-header h2 { 
    font-size: 36px; 
    font-weight: 900; 
    text-align: center; 
    margin-bottom: 0; 
    letter-spacing: -1px; 
}

.section-header:not(.resume-header) h2 {
    margin-bottom: 60px;
}

/* MY RESUME header with download btn */
.resume-dl-row {
    max-width: 1200px;
    margin: -40px auto 40px auto;
    display: flex;
    justify-content: flex-end;
    padding: 0 0;
}

.resume-dl-btn {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
    border-bottom: 2px solid var(--black);
    padding-bottom: 2px;
    transition: var(--transition);
    white-space: nowrap;
}

.resume-dl-btn:hover {
    opacity: 0.6;
    transform: translateY(-2px);
}

/* MY RESUME */
.exp-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px; max-width: 1200px; 
    margin: 0 auto; 
}

.col-title { 
    font-size: 14px; 
    letter-spacing: 3px; 
    color: var(--gray); 
    margin-bottom: 30px; 
    border-left: 4px solid var(--black); 
    padding-left: 15px; 
}

.exp-num { 
    font-size: 18px; 
    font-weight: 900; 
    opacity: 0.3; 
    width: 40px; 
    flex-shrink: 0; 
}

.exp-info { 
    flex: 1; 
    padding: 0 10px; 
}

.exp-info h3 {
    font-size: 16px; 
    margin: 0 0 5px 0; 
    font-weight: 600;
}

.exp-duration { 
    font-size: 12px; 
    font-weight: 700; 
    color: var(--gray);
    transition: var(--transition); 
}

.exp-card:hover { 
    background: var(--black); 
    color: var(--white); 
    border-radius: 12px; 
    transform: translateY(-5px); 
    border-bottom: 1px solid transparent; 
}

.exp-card:hover .exp-duration { 
    color: var(--white); 
    opacity: 0.8; 
}

/* Skills Tags */
.skills-tags-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.skills-category {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.skills-category-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray);
    white-space: nowrap;
    min-width: 110px;
    padding-top: 8px;
}

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

.skill-tag {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #ccc;
    background: #fff;
    color: var(--black);
    cursor: default;
    transition: var(--transition);
    transform: scale(1);
}

.skill-tag:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
    transform: scale(1.08);
}

/* Experience Show More */
.exp-card {
    display: flex;
    align-items: flex-start;
    padding: 25px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
    cursor: pointer;
}

.exp-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.show-more-btn {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray);
    border-bottom: 1px solid var(--gray);
    transition: var(--transition);
    white-space: nowrap;
}

.exp-card:hover .show-more-btn {
    color: var(--white);
    border-color: var(--white);
    opacity: 0.8;
}

.exp-detail ul {
    margin: 12px 0 0 0;
    padding: 0;
    list-style: none;
    line-height: 2;
    font-size: 13px;
    color: var(--gray);
}

.exp-detail ul li {
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.exp-detail ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    opacity: 0.5;
}

.exp-card:hover .exp-detail ul {
    color: rgba(255,255,255,0.75);
}

.exp-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.exp-detail.open {
    max-height: 1200px;
    opacity: 1;
    margin-top: 12px;
}

.exp-detail p {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.7;
    border-left: 3px solid #ddd;
    padding-left: 12px;
}

.exp-card:hover .exp-detail p {
    color: rgba(255,255,255,0.75);
    border-color: rgba(255,255,255,0.3);
}

.exp-card.expanded .show-more-btn::after {
    content: '';
}



/* Projects (Dribbble 交错风格) */
.case-grid { 
    display: flex; 
    flex-direction: column; 
    gap: 120px; 
}

.case-item { 
    display: grid; 
    grid-template-columns: 1.2fr 1fr; 
    gap: 80px; 
    align-items: center; 
}

.case-item.inverse { 
    grid-template-columns: 1fr 1.2fr; 
}

.case-image { 
    width: 100%; 
    border-radius: 32px; 
    overflow: hidden; 
    box-shadow: 0 30px 60px rgba(0,0,0,0.1); 
    transition: var(--transition); 
}
.case-image img { 
    width: 100%; 
    display: block; 
    transition: 0.6s ease; 
}

.case-item:hover .case-image { 
    transform: translateY(-10px); 
}
.case-item:hover .case-image img { 
    transform: scale(1.05); 
}

.project-category { background: #000; color: #fff; padding: 6px 16px; border-radius: 50px; font-size: 11px; font-weight: 700; margin-bottom: 10px; display: inline-block; letter-spacing: 1px; margin-right: 6px; }
.project-category.oral-badge { background: #1a1a2e; border: 1.5px solid #fff; }
.case-content h3 { font-size: 42px; font-weight: 900; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; }
.case-content p { color: var(--gray); font-size: 18px; line-height: 1.6; margin-bottom: 30px; }
.project-date { font-size: 13px !important; color: #aaa !important; font-weight: 600; margin-top: -12px !important; margin-bottom: 20px !important; letter-spacing: 0.5px; }

.see-details-btn { 
    background: none; border: none; border-bottom: 2px solid #000; font-size: 16px; font-weight: 800; 
    padding: 5px 0; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 8px; transition: var(--transition); 
}
.see-details-btn:hover { opacity: 0.5; }
.see-details-btn span { transition: 0.3s; }
.see-details-btn:hover span { transform: translate(3px, -3px); }

/* Contact & Footer */
.contact-list-container { max-width: 500px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; align-items: center; gap: 15px; justify-content: center; }
.contact-item i { font-size: 22px; width: 25px; text-align: center; }
.contact-item a, .contact-item span { font-size: 18px; color: var(--black); text-decoration: none; font-weight: 500; }

.footer-bar { background: #000; color: #fff; padding: 20px 0; position: fixed; bottom: 0; width: 100%; z-index: 1000; }
.marquee { white-space: nowrap; overflow: hidden; font-size: 12px; font-weight: 900; animation: marquee 20s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    border-radius: 24px;
    padding: 0;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.modal.open, .modal-overlay.open {
    display: block;
}
.modal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.modal-container { padding: 50px; position: relative; }
.close-modal { position: absolute; top: 20px; right: 20px; background: #eee; border: none; padding: 8px 15px; border-radius: 50px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 13px; }
.close-modal:hover { background: #000; color: #fff; }

/* =============================================
   TABLET (≤ 992px)
   ============================================= */
@media (max-width: 992px) {
    .hero, .case-item, .case-item.inverse, .exp-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    .hero-left {
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.07);
        padding: 60px 8%;
    }
    .hero-right { padding: 48px 8%; align-items: center; }
    .hero-tags, .cta-row, .case-content { align-items: center; justify-content: center; }
    .open-badge { margin: 0 auto; }
    .description { text-align: center; }
    .case-item.inverse .case-content { order: 2; }
    .case-item.inverse .case-image { order: 1; }
    .skills-category { flex-direction: column; align-items: center; text-align: center; }
    .skills-tags { justify-content: center; }
    .exp-right { align-items: center; }
}

/* =============================================
   MOBILE (≤ 640px) — full overhaul
   ============================================= */
@media (max-width: 640px) {

    /* --- Global spacing --- */
    body { padding-bottom: 60px; }
    section { padding: 60px 5%; }

    /* --- Header / Nav --- */
    header { padding: 12px 4%; }
    nav ul {
        gap: 0;
        justify-content: space-between;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    nav ul::-webkit-scrollbar { display: none; }
    nav ul li a {
        font-size: 11px;
        padding: 4px 8px;
        white-space: nowrap;
    }
    nav ul li a span { display: none; }

    /* --- Hero --- */
    .hero { min-height: unset; }
    .hero-left {
        padding: 48px 6% 36px;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.07);
        text-align: center;
        align-items: center;
    }
    h1 {
        font-size: 42px;
        letter-spacing: -2px;
        margin-bottom: 12px;
    }
    .hero-greeting { font-size: 16px; }
    .subtitle { font-size: 15px; }
    .description { font-size: 15px; max-width: 100%; }
    .cta-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        margin-top: 24px;
    }
    .cta-btn-text { font-size: 15px; }
    .hero-right {
        padding: 32px 6%;
        align-items: center;
        gap: 18px;
    }
    .hero-tag { font-size: 12px; padding: 6px 14px; }
    .hero-tags-label { font-size: 12px; }
    .open-badge { font-size: 13px; }

    /* --- Section headers --- */
    .section-header h2 { font-size: 26px; letter-spacing: -0.5px; }
    .section-header:not(.resume-header) h2 { margin-bottom: 36px; }

    /* --- About --- */
    .about-section p { font-size: 14px; line-height: 1.75; }
    .about-strengths ul li { font-size: 14px; }

    /* --- Skills --- */
    .skills-tags-container { gap: 28px; }
    .skills-category {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .skills-category-label {
        font-size: 12px;
        min-width: unset;
        padding-top: 0;
    }
    .skills-tags { justify-content: flex-start; gap: 8px; }
    .skill-tag { font-size: 12px; padding: 6px 14px; }

    /* --- Resume / Experience --- */
    .exp-grid { gap: 36px; }
    .resume-dl-row { margin: -20px auto 24px; }
    .resume-dl-btn { font-size: 14px; }
    .exp-card {
        flex-wrap: wrap;
        padding: 16px 12px;
        gap: 6px;
    }
    .exp-num { font-size: 14px; width: 28px; }
    .exp-info h3 { font-size: 14px; }
    .exp-info p { font-size: 13px; }
    .exp-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px dashed #eee;
    }
    .exp-duration { font-size: 11px; }
    .show-more-btn { font-size: 11px; }
    .exp-detail ul li { font-size: 12px; }
    .exp-detail p { font-size: 12px; }

    /* --- Projects --- */
    .case-grid { gap: 60px; }
    .case-item,
    .case-item.inverse {
        gap: 24px;
        grid-template-columns: 1fr !important;
    }
    /* Always image on top, content below on mobile */
    .case-item .case-image,
    .case-item.inverse .case-image { order: 1 !important; }
    .case-item .case-content,
    .case-item.inverse .case-content { order: 2 !important; }
    .case-image { border-radius: 20px; }
    .case-content { text-align: left; }
    .case-content h3 { font-size: 24px; letter-spacing: -0.5px; margin-bottom: 12px; }
    .case-content p { font-size: 15px; margin-bottom: 20px; }
    .project-category { font-size: 10px; padding: 5px 12px; margin-bottom: 8px; }
    .see-details-btn { font-size: 14px; }

    /* --- Contact --- */
    .contact-list-container { gap: 14px; }
    .contact-item i { font-size: 18px; }
    .contact-item a,
    .contact-item span { font-size: 14px; word-break: break-all; }

    /* --- Footer marquee --- */
    .footer-bar { padding: 14px 0; }
    .marquee { font-size: 10px; }

    /* --- Modal --- */
    .modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }
    .modal-container { padding: 32px 20px 24px; }
    .close-modal { top: 14px; right: 14px; font-size: 12px; }

    /* --- Gradient blob --- */
    .gradient-bg { width: 350px; height: 350px; }
}
