:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #ecf0f1;
    --text-color: #34495e;
    --accent-color: #e74c3c;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

.logo span {
    color: var(--secondary-color);
}

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

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.slider, .slide {
    width: 100%;
    height: 100%;
}

.slide {
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 改为 contain 以确保整个图片都显示 */
    object-position: center; /* 保持图片居中 */
    background-color: #f0f0f0; /* 添加背景色，以防图片不能完全填充容器 */
}

.slide-content {
    position: absolute;
    bottom: 20%; /* 将内容移到底部 */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.7); /* 增加背景透明度 */
    padding: 1rem;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
}

.slide-content h2 {
    font-size: 1.5rem; /* 减小标题大小 */
    margin-bottom: 0.5rem;
}

.slide-content p {
    font-size: 1rem; /* 减小段落文字大小 */
}

cta-button {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Slick slider customization */
.slick-dots {
    bottom: 20px;
}

.slick-dots li button:before {
    font-size: 12px;
    color: white;
}

.slick-dots li.slick-active button:before {
    color: var(--secondary-color);
}

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
}

.about-content, .project-grid, .blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.profile-image {
    width: 100%;
    border-radius: 10px;
}

.project-card, .blog-post {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover, .blog-post:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3, .blog-post h3 {
    padding: 1rem;
    margin: 0;
    color: var(--primary-color);
}

.project-card p, .blog-post p {
    padding: 0 1rem 1rem;
    margin: 0;
}

.project-link, .read-more {
    display: block;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.project-link:hover, .read-more:hover {
    background-color: var(--secondary-color);
}

.contact form {
    display: grid;
    gap: 1rem;
}

.contact input, .contact textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact button:hover {
    background-color: var(--secondary-color);
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.project-icon {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.project-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 在文件末尾添加以下样式 */
.java-notes {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.java-notes h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
}

#content {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#content h1, #content h2, #content h3 {
    color: var(--primary-color);
}

#content code {
    background-color: #f0f0f0;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

#content pre {
    background-color: #f0f0f0;
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
}