:root {
    --text-main: #222222;
    --text-muted: #444444; 
    --border-color: #2c2c2c; 

     /* Highlighter */   
    --hl-pink: rgba(255, 182, 193, 0.7);
    --hl-blue: rgba(173, 216, 230, 0.7);
    --hl-yellow: rgba(255, 255, 153, 0.8);
    --hl-green: rgba(152, 251, 152, 0.7);
    
    /* Tape */
    --tape-pink: rgba(255, 182, 193, 0.4);
    --tape-blue: rgba(173, 216, 230, 0.4);
    --tape-yellow: rgba(255, 235, 130, 0.4);
    --tape-green: rgba(152, 251, 152, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

/* Background */
body {
    font-family: 'Quicksand', sans-serif;
    color: var(--text-main);
    background-color: #fdfdfd;

    background-image: 
        linear-gradient(90deg, transparent 129px, rgba(255,100,100,0.3) 129px, rgba(255,100,100,0.3) 131px, transparent 131px),
        linear-gradient(rgba(100,150,255,0.15) 1px, transparent 1px);
    background-size: 100% 100%, 100% 42px; /* 32px 为横线间距 */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 0px;
}

/* Frame */
.hand-drawn {
    border: 2px solid var(--border-color);
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    background: #ffffff;
    box-shadow: 4px 5px 0px rgba(0,0,0,0.08); /* 淡淡的素描投影 */
}

/* Tape Style */
.tape {
    position: absolute;
    width: 90px;
    height: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 10;
}

/* Highlighter Style */
.highlight {
    position: relative;
    display: inline-block;
    z-index: 1;
}
.highlight::after {
    content: '';
    position: absolute;
    left: -5px;
    right: -5px;
    bottom: 12%;
    height: 40%;
    z-index: -1;
    border-radius: 4px 8px 6px 4px;
    transform: rotate(-1deg);
}
.hl-pink::after { background: var(--hl-pink); }
.hl-blue::after { background: var(--hl-blue); }
.hl-yellow::after { background: var(--hl-yellow); transform: rotate(1deg); }
.hl-green::after { background: var(--hl-green); }

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 250px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(253, 253, 253, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: 2.5px dashed var(--border-color);
}

.nav-logo {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--text-main);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 700;
    transition: all 0.2s;
}

.nav-links a:hover {
    transform: translateY(-2px) rotate(-3deg);
}

.nav-links a:not(.nav-btn-download) {
    position: relative;
    z-index: 1;
}

.nav-links a:not(.nav-btn-download)::after {
    content: '';
    position: absolute;
    left: -3px;
    right: -3px;
    bottom: 15%;
    height: 35%;
    z-index: -1;
    border-radius: 3px 5px 4px 3px;
    transform: rotate(-1deg) scaleX(0); 
    transform-origin: left; 
    transition: transform 0.25s ease-out;
}

.nav-links a:not(.nav-btn-download):hover::after {
    transform: rotate(-1deg) scaleX(1);
}

.nav-links a[href="#about"]::after { background: var(--hl-pink); }
.nav-links a[href="#projects"]::after { background: var(--hl-yellow); }
.nav-links a[href="#contact"]::after { background: var(--hl-green); }

.nav-btn-download {
    padding: 6px 18px;
    text-decoration: none;
    color: var(--text-main) !important;
    transition: all 0.3s;
    position: relative;
}
.nav-btn-download:hover {
    transform: scale(1.05) rotate(2deg);
}
.nav-btn-download .tape {
    top: -8px; left: 50%; transform: translateX(-50%) rotate(-4deg); width: 60px; height: 18px; background: var(--tape-blue);
}

/* General Layout */
section {
    min-height: 100vh;
    padding: 120px 250px 100px 250px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Main Title */
.section-header {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
    width: 100%;
}

.section-header h2 {
    font-family: 'Caveat', cursive;
    font-size: 4.5rem;
    color: var(--text-main);
    font-weight: 700;
}

/* Hero Section */
#hero {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-family: 'Caveat', cursive;
    font-size: clamp(4.5rem, 9vw, 7.5rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 1.8vw, 1.3rem);
    color: var(--text-muted);
    font-weight: 600;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 60px;
    align-items: start;
}

.about-left {
    position: sticky;
    top: 200px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Profile Image */
.pic-wrapper {
    position: relative;
    width: 65%;
    max-width: 240px;
    padding: 10px;
    background: #fff;
    transform: rotate(-2deg);
}

.pic-wrapper .tape-1 { top: -10px; left: -15px; transform: rotate(-45deg); background: var(--tape-yellow); }
.pic-wrapper .tape-2 { bottom: -10px; right: -15px; transform: rotate(-35deg); background: var(--tape-yellow); }

.profile-pic {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 4px;
}

.short-bio {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.6;
    width: 90%;
    margin-top: 10px;
}

.about-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

h3 {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
    display: inline-block;
    border-bottom: 2px solid #333;
    padding-bottom: 1px;
}

/* Links */
.social-links {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.2s;
}

.social-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.social-link:hover {
    transform: translateY(-3px) rotate(2deg);
    background: rgba(0,0,0,0.05);
}

/* Core Skills */
.skills-category {
    margin-bottom: 25px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    padding: 4px 12px;
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--text-main);
    transition: all 0.2s;
    cursor: pointer;
}

.skill-tag:hover {
    transform: translateY(-3px) rotate(-3deg) scale(1.05);
    background: #f0f0f0;
}

.level-title {
    font-size: 1.1rem; 
    font-weight: 600;  
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
}

.level-title span:first-child {
    flex: 1; 
    position: relative;
    padding-left: 16px;
}

.level-title span:first-child::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--text-main);
}

.level-title .date {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 15px; 
    white-space: nowrap;
}

.level-details {
    list-style-type: none; 
    margin-left: 16px;
    color: #666666; 
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 30px; 
}

.level-details li {
    margin-bottom: 6px;
    line-height: 1.5; 
}

.level-details li:first-child {
    font-weight: 600;
    color: #444444;
    margin-bottom: 8px; 
}

/* Resume Download */
.btn-download {
    display: inline-block;
    padding: 16px 36px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    align-self: flex-start;
    transition: all 0.2s;
    margin-top: 10px;
    transform: rotate(-1deg);
    cursor: pointer;
}

.btn-download:hover {
    transform: translate(2px, 2px) rotate(0deg);
    box-shadow: 1px 2px 0px rgba(0,0,0,0.1); 
    background: #000000;  
    color: #ffffff; 
}

.btn-download:active {
    transform: translate(4px, 4px) rotate(0deg);
    box-shadow: none; 
    background: #000000;  
    color: #ffffff; 
}


/* Projects Section */
#projects {
    gap: 40px;
}

.project-card {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 40px;
    align-items: center;
    padding: 45px;
    transition: all 0.3s;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 6px 8px 0px rgba(0,0,0,0.08);
}

.project-card .tape {
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
}
.project-card:nth-child(even) .tape { background: var(--tape-green); transform: translateX(-50%) rotate(2deg); }
.project-card:nth-child(odd) .tape { background: var(--tape-green); }

.project-card:nth-child(even) {
    grid-template-columns: 4fr 6fr;
}
.project-card:nth-child(even) .project-img-wrapper {
    order: 2;
}
.project-card:nth-child(even) .project-info {
    order: 1;
}

.project-img-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border: 2px solid var(--border-color);
    border-radius: 8px 25px 5px 15px / 15px 5px 25px 8px; /* 轻微手绘圆角 */
}

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

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

.project-date {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

.project-title {
    font-family: 'Caveat', cursive;
    font-size: 2.8rem;
    margin-bottom: 10px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

.project-desc {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 600;
}

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

.project-tag {
    font-size: 0.85rem;
    color: var(--text-main);
    padding: 4px 12px;
    font-weight: 600;
}

/* Contact Section */
#contact {
    min-height: auto;
    padding-bottom: 150px;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    flex: 1;
    padding: 30px;
    transition: all 0.3s;
    position: relative;
}

.contact-item .tape {
    top: -12px;
    background: var(--tape-blue);
    transform: rotate(-2deg);
}

.contact-item:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 4px 6px 0px rgba(0,0,0,0.06);
}

.contact-item svg {
    width: 40px;
    height: 40px;
    fill: var(--text-main);
}

.contact-item p {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1200px) {
    section, .navbar { padding-left: 5%; padding-right: 5%; }
    .short-bio { width: 100%; }
}
@media (max-width: 768px) {
    .navbar { border-bottom-style: solid; }
    .about-content, .project-card, .project-card:nth-child(even) { grid-template-columns: 1fr; gap: 30px; }
    .about-left { position: relative; top: 0; align-items: center; text-align: center; }
    .pic-wrapper { margin-bottom: 20px; }
    .project-card:nth-child(even) .project-img-wrapper,
    .project-card:nth-child(even) .project-info { order: unset; }
    .contact-content { flex-direction: column; align-items: stretch; }
    .contact-item { flex-direction: row; text-align: left; }
    .contact-item .tape { left: 10px; top: -5px; }
}
@media (max-width: 768px) {
    .project-top-links { margin-top: 110px; gap: 15px; }
    .project-top-links .btn-download { font-size: 1rem; padding: 10px 20px; }
}


/* Poject Details */
.nav-links a.dropdown-toggle {
            font-size: 1.2rem;
        }

.nav-links a.dropdown-toggle::after { 
    display: none !important; 
}

.nav-links a.dropdown-toggle:hover {
    transform: none !important;
}

.nav-links a.color-pink::after { background: var(--hl-pink); }
.nav-links a.color-yellow::after { background: var(--hl-yellow); }
.nav-links a.color-green::after { background: var(--hl-green); }
.nav-links a.color-blue::after { background: var(--hl-blue); }
    
.dropdown {
position: relative;
cursor: pointer;
}

.dropdown-menu {
position: absolute;
top: 150%; 
right: 0; 
width: 250px;
padding: 20px;
display: flex;
flex-direction: column;
align-items: flex-start; /* 让菜单文字靠左，这样荧光笔不会因为拉伸太长 */
gap: 15px; /* 项目文字上下的间距 */
            
/* 默认隐藏菜单 */
opacity: 0;
visibility: hidden;
transform: translateY(15px);
transition: all 0.3s ease;
z-index: 1000;
}

/* 鼠标悬停在 Projects ▾ 时，菜单平滑浮现 */
.dropdown:hover .dropdown-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}

.project-top-links {
margin-top: 140px; 
margin-bottom: 50px;
display: flex;
justify-content: center;
gap: 50px;
flex-wrap: wrap;
padding: 0 20px;
}

.project-top-links .btn-download {
display: flex;
align-items: center;
gap: 10px;
margin-top: 0;
padding: 12px 30px;
}

.project-top-links .btn-download svg {
width: 24px;
height: 24px;
fill: currentColor;
}

.project-images {
width: 100%;
max-width: 1200px;
margin: 0 auto 100px auto; 
font-size: 0;      
background-color: transparent; 
}

.project-images img {
width: 100%;
display: block;    
margin: 0;
padding: 0;
border: none;
}