:root {
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --container-width: 640px;
    --bg-body: #111111;
    --text-main: #f3f3f3;
    --text-muted: #a3a3a3;
    --border-subtle: #262626;
    --link-hover: #ffffff;
    --bg-selection: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-body: #ffffff;
    --text-main: #111111;
    --text-muted: #555555;
    --border-subtle: #eaeaea;
    --link-hover: #000000;
    --bg-selection: rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    display: flex;
    justify-content: center;
    padding: 100px 24px 0;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    display: flex;
    flex-direction: column;
    gap: 56px;
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container>* {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.theme-toggle-btn {
    animation-delay: 0.1s;
}

.header-section {
    animation-delay: 0.2s;
}

.links-row {
    animation-delay: 0.3s;
}

.project-item {
    animation-delay: 0.4s;
}

.footer-section {
    animation-delay: 0.5s;
}

.theme-toggle-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    color: var(--text-main);
    background-color: var(--border-subtle);
}

h1 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: -6px;
}

p {
    color: var(--text-muted);
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.header-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bio-text strong {
    color: var(--text-main);
    font-weight: 600;
}

.links-row {
    display: flex;
    gap: 20px;
    font-size: 16px;
}

.link-item {
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.link-item:hover {
    color: var(--link-hover);
    text-decoration: none;
    transform: translateY(-2px);
}

.project-item {
    margin-top: 32px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.project-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.project-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover .project-logo {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 8px 16px var(--bg-selection);
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-title-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.project-title-group h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.project-title-group span {
    font-size: 14px;
    color: var(--text-muted);
}

.project-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--text-main);
    color: var(--bg-body);
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.download-btn:hover {
    opacity: 0.9;
    color: var(--bg-body);
    text-decoration: none;
    transform: translateY(-1px);
}

.project-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    /* Reduced gap from 12px to 8px to bring it closer */
    flex-shrink: 0;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.2s, background-color 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
}

.guide-link:hover {
    color: var(--text-main);
    background-color: var(--bg-selection);
    text-decoration: none;
}

.footer-section {
    padding-top: 24px;
    padding-bottom: 24px;
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-section p {
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .theme-toggle-btn {
        top: -80px;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 20px;
    }

    .links-row {
        flex-wrap: wrap;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .project-info {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .project-actions {
        width: 100%;
        align-items: center;
        gap: 16px;
    }

    .download-btn {
        width: 100%;
    }
}