@import url(reset.css);

/* Body styles */
html{
    scroll-behavior: smooth;
}










/* 样式化导航菜单 */
header nav ul {
    list-style: none; /* 移除默认列表样式 */
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* 垂直排列 */
    gap: 10px; /* 按钮之间的间距 */
}

header nav li {
    margin: 0;
    text-align: center; /* 文字居中 */
}

header nav a {
    text-decoration: none; /* 移除下划线 */
    color: white; /* 按钮文字颜色 */
    background-color: #442b15; /* 按钮背景色 */
    padding: 10px 20px; /* 按钮内边距 */
    border-radius: 5px; /* 圆角 */
    transition: background-color 0.3s, transform 0.2s; /* 动画效果 */
    display: inline-block;
    font-size: 1rem; /* 调整字体大小 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 按钮阴影 */
}

header nav a:hover {
    background-color: #6cb4a5; /* 鼠标悬停时背景色 */
    color: #442b15; /* 鼠标悬停时文字颜色 */
    transform: translateY(-2px); /* 悬停时微微上移 */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); /* 加深阴影 */
}

header nav a:active {
    transform: translateY(0); /* 点击时回到原位 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 阴影恢复 */
}



















body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    color: #442b15;
    background-color: #e9d4af;
}



/* Fixed header on the left */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: #6cb4a5;
    color: white;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    margin: 0 0 20px;
    text-align: center;
}

/* Style switcher button container */
#style-switcher {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#style-switcher button {
    background-color: #dd9b4b;
    color: #a74713;
    border: none;
    padding: 10px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    width: 100%;
    transition: 0.3s ease;
}

#style-switcher button:hover {
    background-color: white;
    color: #49d4af;
}

footer {
    text-align: center;
    color: white;
    font-size: 0.9rem;
    margin-top: auto;
    position: absolute;
    bottom:0;
    background-color: #442b15;
}

/* Main content */
main {
    margin-left: 250px;
    position: relative;
    width:100%

}

section {
    margin-bottom: 40px;
    padding: 20px;
    width: 100%;
}


section:nth-child(odd){

    background-color: #dd9b4b;
}

section h1{
    font-size: 5rem;
    margin-bottom: 10px;
    color:  #442b15;
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #c0502e;
    width: 500px;
}
section h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #a74713;
    width: 500px;
}





section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 10px 0;
}

section img {
    max-width: 100%;
    height: auto; /* 保持图片比例 */
    display: block;
    margin: 20px 0;
    border: 4px solid #a74713;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}




/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        width: 220px;
    }

    main {
        margin-left: 240px;
    }

    header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        width: 180px;
        padding: 10px;
    }

    main {
        margin-left: 200px;
        padding: 10px;
    }

    header h1 {
        font-size: 1.2rem;
    }

    #style-switcher button {
        font-size: 0.9rem;
    }
}


.image-container {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    gap: 10px;       /* 图片间距 */
    justify-content: space-between; /* 两列对齐 */
}

.image-container img {
    flex: 0 0 calc(50% - 20px); /* 每张图片占据一半宽度（减去间隙） */
    box-sizing: border-box; /* 包括内边距和边框在宽度计算中 */
}








.scroll-down {
    position: fixed;

    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    animation: bounce 1.5s infinite; 

}

.scroll-down p {
    margin: 0;
    font-size: 20px;
    color: #d18e50;

    
}

.arrow {
    margin-top: 10px;
    margin-left: 20px; 
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 20px solid #d18e50; /* 创建朝下的箭头 */
    animation: bounce 1.5s infinite; /* 添加跳动效果 */
}

/* Arrow animation箭头动画 */
@keyframes bounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(10px); }
    100% { transform: translateY(0); }
}




.sketch {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 每行两张图片 */
    gap: 20px; /* 图片间距 */
    padding: 20px;
}

.image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-title {
    margin: 10px 0;
    text-align: center;
}



/* Dropdown style */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    font-size: 1em;
    cursor: pointer;
    padding: 8px;
    width: 100%;
    text-align: left;
}

.dropdown-content {
    display: none;
    list-style: none;
    padding-left: 20px;
}

.dropdown-content li {
    margin: 4px 0;
}

.dropdown.open .dropdown-content {
    display: block;
}


/* 用于 Project / Semester1 统一视觉风格 */
.content-section {
    padding: 40px;
    background-color: #f5f5f5;
}

.content-section h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.content-box {
    background-color: #ffffff;
    border-left: 8px solid #4caf50; /* 绿色侧边条，可自定义 */
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.content-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.content-box h3 {
    margin-top: 0;
}


.collapsible-header {
    background: none;
    border: none;
    font-size: 1.2em;
    text-align: left;
    padding: 0;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
}

.collapsible-body {
    margin-top: 10px;
    display: block;
}
