/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #f7f9fb;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    min-height: 100vh;
}

/* Fixed Navigation */
.fixed-navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.fixed-navigation.visible {
    transform: translateY(0);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-logo:hover {
    color: #4a90e2;
}

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

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #4a90e2;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4a90e2;
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

@media (max-width: 1200px) {
    .nav-container {
        padding: 16px 60px;
    }

    .nav-links {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 12px 20px;
        flex-direction: column;
        gap: 12px;
    }

    .nav-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        font-size: 13px;
    }
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 60px 80px;
}

@media (max-width: 1200px) {
    .container {
        padding: 40px 60px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }
}

/* Section styling - flat layout */
.section {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 60px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .section {
        margin-bottom: 40px;
    }
}

/* Root section special styling */
.root-section {
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 32px;
}

.logo-container {
    margin-bottom: 20px;
}

.fractal-tree {
    display: inline-block;
    margin-bottom: 12px;
}

.fractal-tree img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.statement {
    font-size: 16px;
    font-style: italic;
    font-weight: 300;
    color: #555;
    margin: 0;
}

/* Typography */
h2 {
    font-size: 24px;
    font-weight: 600;
    color: #222;
    margin-bottom: 24px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h3 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    margin-top: 0;
}

/* Content layout */
.content {
    margin-top: 0;
}

.field {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    line-height: 1.8;
}

.label {
    font-weight: 500;
    color: #333;
    min-width: 160px;
    margin-right: 20px;
}

.value {
    color: #666;
    flex: 1;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Project Card */
.project-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.project-icon {
    font-size: 64px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.project-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.project-content p {
    color: #666;
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
}

/* Tech Tags */
.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tech-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 400;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

/* Project Links */
.project-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-links a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 400;
    padding: 6px 12px;
    background: rgba(74, 144, 226, 0.08);
    border-radius: 4px;
    border: 1px solid rgba(74, 144, 226, 0.15);
    transition: all 0.2s ease;
    font-size: 13px;
}

.project-links a:hover {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.3);
}

/* Portfolio Card */
.portfolio-card {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    max-width: 400px;
    height: 800px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.live2d-iframe {
    width: 800px;
    height: 1500px;
    border: none;
    background: #ffffff;
    position: absolute;
    left: -300px;
    top: -100px;
}

@media (max-width: 768px) {
    .portfolio-card {
        max-width: 300px;
        height: 600px;
    }

    .live2d-iframe {
        width: 600px;
        height: 1125px;
        left: -225px;
        top: -75px;
    }
}

/* Link Categories */
.link-category {
    margin-bottom: 32px;
}

.link-category:last-child {
    margin-bottom: 0;
}

.link-category h3 {
    font-size: 16px;
    font-weight: 500;
    color: #555;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Links */
.links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.links a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 400;
    padding: 8px 16px;
    background: rgba(74, 144, 226, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(74, 144, 226, 0.15);
    transition: all 0.2s ease;
    font-size: 14px;
}

.links a:hover {
    background: rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.3);
}

/* Groups section special styling */
.section:nth-last-child(2) .content p {
    color: #666;
    line-height: 1.8;
}

/* Responsive design */
@media (max-width: 600px) {
    .field {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .label {
        min-width: auto;
        margin-bottom: 6px;
        margin-right: 0;
        font-weight: 600;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    h3 {
        font-size: 16px;
    }

    .link-category {
        margin-bottom: 24px;
    }

    .link-category h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .links {
        flex-direction: column;
        gap: 12px;
    }

    .links a {
        text-align: center;
    }
    
    .fractal-tree img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 400px) {
    body {
        font-size: 13px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    .statement {
        font-size: 14px;
    }
    
    .section {
        padding: 16px;
    }
}

