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

html {
    overscroll-behavior-y: none;
}

:root {
    --bg-color: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --card-bg: #1a1a1a;
    --border-color: #2a2a2a;
    --hover-bg: #252525;
}

/* Light theme variables */
:root[data-theme="light"] {
    --bg-color: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --hover-bg: #f0f0f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
    overscroll-behavior-y: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

nav .nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    order: 1;
}

nav h1 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    order: 2;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--text-primary);
}

nav a.active {
    color: var(--text-primary);
    font-weight: 500;
}

nav .social-links {
    display: flex;
    gap: 0.75rem;
    order: 3;
}

nav .social-links a {
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    border-radius: 5px;
    font-size: 0.8rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.4rem;
    transition: all 0.3s;
}

nav .social-links a:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

nav .social-links a svg {
    flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle {
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    border-radius: 5px;
    font-size: 0.8rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.2rem 0.4rem;
    transition: all 0.3s;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.theme-toggle svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.theme-toggle svg path,
.theme-toggle svg circle {
    stroke: currentColor;
    fill: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    background: var(--text-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.5rem;
}

.hero-social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-social a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-social a:hover {
    color: var(--text-primary);
}

.hero-social a svg {
    flex-shrink: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sections */
section {
    position: relative;
    z-index: 1;
    padding: 5rem 0;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    background-color: var(--hover-bg);
    border-color: var(--text-primary);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-logo {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 12px;
    object-fit: contain;
    background-color: #ffffff;
    flex-shrink: 0;
    padding: 8px;
    box-sizing: border-box;
}

.card-title-group h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.card-title-group .date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.card-title-project {
    display: flex;
    align-items: center;
    flex: 1;
}

.card-title-project h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-bullets {
    list-style: none;
    margin-bottom: 1rem;
}

.card-bullets li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.card-bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-primary);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

/* Footer */
footer {
    position: relative;
    z-index: 100;
    background-color: var(--bg-color);
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

footer p {
    color: var(--text-secondary);
    margin: 0;
}

footer .footer-social {
    display: flex;
    gap: 0.75rem;
}

footer .footer-social a {
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    border-radius: 5px;
    font-size: 0.8rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.4rem;
    transition: all 0.3s;
}

footer .footer-social a:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

footer .footer-social a svg {
    flex-shrink: 0;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
    transform: translateX(-50%) scale(1.1);
}

.scroll-to-top:not(:hover) {
    transform: translateX(-50%);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1000px) {
    .scroll-to-top {
        display: none !important;
    }

    /* Navigation */
    nav {
        padding: 0.75rem 0;
    }

    nav .container {
        padding: 0 1rem;
        flex-wrap: nowrap;
    }

    nav h1 {
        font-size: 0.9rem;
        flex: 1;
    }

    nav ul {
        display: none;
    }

    nav .social-links {
        gap: 0.5rem;
    }

    nav .social-links a {
        font-size: 0.75rem;
        padding: 0.15rem 0.3rem;
    }

    nav .social-links a span {
        display: none;
    }

    /* Hero Section */
    .hero {
        padding: 5rem 1rem 2rem;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-content h1 {
        margin-top: 0;
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.1rem;
    }

    .hero-social {
        gap: 0.75rem;
    }

    .hero-social a {
        font-size: 0.85rem;
    }

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Sections */
    section {
        padding: 2.5rem 0;
    }

    section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* Cards */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .card-header {
        gap: 0.75rem;
    }

    .card-logo {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }

    .card-title-group h3 {
        font-size: 1rem;
    }

    .card-title-project h3 {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.9rem;
    }

    .card-bullets li {
        font-size: 0.85rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0;
        text-align: left;
    }

    footer .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    footer p {
        font-size: 0.9rem;
        order: 1;
        margin-right: auto;
    }

    footer .footer-social {
        order: 2;
        gap: 0.5rem;
    }

    footer .footer-social a {
        font-size: 0.75rem;
        padding: 0.15rem 0.3rem;
    }

    footer .footer-social a span {
        display: none;
    }
}
