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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 1rem;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* Profile Section */
.profile-container {
    text-align: center;
    padding: 2rem;
    margin-top: 60px;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.social-links {
    margin: 1rem 0;
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 0.5rem;
    color: #333;
}

.social-links a:hover {
    color: #E1306C;
}

.social-links a .fa-instagram:hover {
    background: -webkit-linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Interests Section */
.interests {
    margin: 2rem 0;
    text-align: center;
}

.interests ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.interests li {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: #555;
}

.interests h2 {
    color: #333;
    margin-bottom: 1rem;
}

/* Essays Section */
#essays {
    padding: 4rem 2rem;
    background-color: #fff;
}

#essays h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    font-size: 2rem;
}

.essays-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.essay-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.essay-card:hover {
    transform: translateY(-5px);
}

.essay-card h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.essay-content {
    text-align: left;
    line-height: 1.8;
}

.essay-content p {
    margin-bottom: 1.5rem;
    color: #444;
    font-size: 1.1rem;
}

.essay-content p:last-child {
    margin-bottom: 1rem;
}

.essay-date {
    text-align: right;
    color: #666;
    font-style: italic;
    margin-top: 1rem;
}

/* Essay Detail Page Styles */
.essay-detail {
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 0 20px;
}

.essay-detail h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.essay-detail .essay-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.essay-detail .essay-date {
    text-align: right;
    color: #666;
    font-style: italic;
}

/* Technical Essay Formatting */
.essay-detail .essay-content h2 {
    color: #333;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.essay-detail .essay-content a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.essay-detail .essay-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.essay-detail .essay-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
    list-style-type: disc;
}

.essay-detail .essay-content li {
    margin-bottom: 0.5rem;
    color: #444;
    line-height: 1.6;
}

.essay-detail .essay-content blockquote {
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 4px solid #007bff;
    color: #666;
    font-style: italic;
}

.essay-detail .essay-content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.essay-detail .essay-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

/* Projects Section */
#projects {
    padding: 4rem 2rem;
    background-color: #f8f9fa;
}

#projects h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    font-size: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

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

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.25rem;
    color: #333;
}

.project-card p {
    padding: 0 1.5rem;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.project-tech {
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    background: #e9ecef;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #495057;
}

.btn {
    display: inline-block;
    margin: 1rem 1.5rem 1.5rem;
    padding: 0.5rem 1.5rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

/* Resume Section */
#resume {
    padding: 4rem 2rem;
    background-color: #fff;
}

#resume h2 {
    text-align: center;
    color: #333;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.resume-container {
    max-width: 800px;
    margin: 0 auto;
}

.experience-item {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.experience-item h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.experience-item .company {
    font-weight: bold;
    color: #666;
    margin-bottom: 0.3rem;
}

.experience-item .date {
    color: #888;
    margin-bottom: 1rem;
    font-style: italic;
}

.experience-item ul {
    padding-left: 20px;
}

.experience-item li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* Project Detail Pages */
.project-detail {
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 0 20px;
    text-align: center;
}

.project-detail img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.project-content {
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.project-content h2 {
    text-align: center;
    color: #333;
    margin: 1.5rem 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
}

.project-content ul {
    width: 80%;
    margin: 1rem auto;
    list-style-type: disc;
    padding: 0 0 0 40px;
    text-align: left;
    max-width: 600px;
}

.project-content li {
    margin-bottom: 0.5rem;
    padding: 0;
    text-align: left;
    width: 100%;
}

.project-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    text-align: center;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
}

.project-content p.description {
    text-align: left;
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #f5f5f5;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-container {
        padding: 1rem;
    }

    .project-detail {
        margin-top: 60px;
        padding: 0 15px;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .project-links {
        flex-direction: column;
        align-items: center;
    }

    .essay-card {
        padding: 1.5rem;
    }
}