/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text-color: #e0e0e0;
    --bg-color: #0a0a0a;
    --gray-text: #999;
    --border-color: #2a2a2a;
    --hover-color: #fff;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* Shader Canvas Background */
#shader-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(8px) brightness(0.5);
    opacity: 0.6;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 60px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--text-color);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--gray-text);
    font-weight: 400;
    margin-bottom: 30px;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    color: var(--text-color);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

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

.social-links svg {
    width: 24px;
    height: 24px;
}

/* Section Navigation */
.section-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.section-nav-item {
    background: transparent;
    border: none;
    color: var(--gray-text);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s ease;
    font-weight: 500;
}

.section-nav-item:hover {
    color: var(--text-color);
}

.section-nav-item.active {
    color: var(--text-color);
}

.section-divider {
    color: var(--border-color);
    font-size: 1.2rem;
}

/* Section Content */
.section-content {
    display: block;
}

/* About Section */
.about-section {
    margin-bottom: 80px;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 20px 40px 20px;
}

.about-content h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: var(--text-color);
    text-align: center;
}

.about-text {
    margin-bottom: 50px;
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
}

.skills-section {
    margin-top: 40px;
}

.skills-section h3 {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: var(--text-color);
    text-align: center;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.expertise-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.expertise-item h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.expertise-item p {
    font-size: 0.9rem;
    color: var(--gray-text);
    line-height: 1.5;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.skill-category h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 15px;
}

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

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Blog Section */
.blog-section {
    margin-bottom: 80px;
}

.blog-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 20px 40px 20px;
}

.blog-content h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 40px;
    color: var(--text-color);
    text-align: center;
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.blog-post {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: left;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-post:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--text-color);
    transform: translateY(-2px);
}

.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-post h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}

.blog-post-date {
    color: var(--gray-text);
    font-size: 0.9rem;
}

.blog-post-excerpt {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--gray-text);
}

/* Projects Container */
.projects-container {
    margin-bottom: 80px;
}

/* Project Navigation Row */
.project-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.project-nav-item {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.project-nav-item::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    padding: 2px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-nav-item:hover::before,
.project-nav-item.active::before {
    opacity: 1;
}

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

.project-nav-item.active {
    transform: translateY(-5px);
}

.project-nav-thumbnail {
    width: 50%;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 5px auto;
}

.project-nav-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-nav-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
}

/* Project Detail Section */
.project-detail {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    min-height: 500px;
}

.project-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.project-detail-media {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.project-gif {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.project-gif img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    background: rgba(0, 0, 0, 0.5);
}

.project-gif video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-gif iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    outline: none;
}

.project-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.project-image-item {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
}

.project-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-media {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.project-detail-info {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.project-detail-info .project-title {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.project-detail-info .project-year {
    font-size: 1rem;
    color: var(--gray-text);
    margin-bottom: 20px;
}

.project-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--gray-text);
    margin-bottom: 25px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tech-tag {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-color);
    transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.contact-section h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: var(--text-color);
}

.email-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: opacity 0.2s ease;
}

.email-link:hover {
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 30px 15px;
    }
    
    .header h1 {
        font-size: 2.8rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    .project-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .project-nav-item {
        padding: 8px;
    }
    
    .project-nav-item h4 {
        font-size: 0.85rem;
    }
    
    .project-detail {
        padding: 25px;
    }
    
    .project-detail-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-images {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-links {
        gap: 15px;
    }
    
    .social-links svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .project-nav {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-nav-item {
        padding: 6px;
    }
    
    .project-nav-item h4 {
        font-size: 0.8rem;
    }
    
    .social-links svg {
        width: 24px;
        height: 24px;
    }
    
    .project-detail {
        padding: 20px;
    }
    
    .project-links {
        flex-direction: column;
    }
}
