:root {
    --bg-color: #09090b;
    --card-bg: #0f0f12;
    --border-color: #27272a;
    --text-title: #fafafa;
    --text-desc: #a1a1aa;
    --accent-color: #fafafa;
    --critical-color: #EF233C;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Responsive Spacing */
    --container-padding: clamp(1rem, 5vw, 3rem);
    --section-gap: clamp(1rem, 4vw, 2rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-desc);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}


.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.background-glow::before,
.background-glow::after {
    content: '';
    position: absolute;
    width: clamp(300px, 60vw, 600px);
    height: clamp(300px, 60vw, 600px);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float 20s infinite alternate;
}

.background-glow::before {
    background: radial-gradient(circle, #EF233C, transparent);
    top: -10%;
    right: -5%;
    animation-delay: -5s;
}

.background-glow::after {
    background: radial-gradient(circle, #4F46E5, transparent);
    bottom: -10%;
    left: -5%;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}


.container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--container-padding) 1.5rem clamp(4rem, 10vw, 8rem) 1.5rem;
}

.header {
    text-align: center;
    margin-bottom: clamp(2rem, 8vw, 5rem);
    position: sticky;
    top: 0.5rem;
    background-color: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.header.scrolled {
    top: 0;
    border-radius: 0 0 20px 20px;
    background-color: rgba(9, 9, 11, 0.9);
    border-color: var(--border-color);
    padding: 0.5rem 1rem;
}

.title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.75rem, 8vw, 3.25rem);
    font-weight: 800;
    color: var(--text-title);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.subtitle {
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    color: var(--text-desc);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: left;
    margin: clamp(2rem, 6vw, 4rem) 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subtitle::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-color), transparent);
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 24px 0 24px;
    padding: clamp(1.25rem, 5vw, 2rem);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    border-color: #3f3f46;
    background-color: rgba(15, 15, 18, 0.8);
}

.card:active {
    transform: scale(0.98);
    background-color: rgba(20, 20, 23, 0.9);
}


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

.icon {
    width: 32px;
    height: 32px;
    background-color: var(--accent-color);
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
    opacity: 0.8;
}

#theory .icon {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1-0.5-5z"/><path d="M8 7h6"/><path d="M8 11h8"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1-0.5-5z"/><path d="M8 7h6"/><path d="M8 11h8"/></svg>');
}

#practical .icon {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20"/><path d="M2 12h20"/><path d="m15 15 5 5"/><path d="m4 4 5 5"/><path d="m15 9 5-5"/><path d="m4 20 5-5"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20"/><path d="M2 12h20"/><path d="m15 15 5 5"/><path d="m4 4 5 5"/><path d="m15 9 5-5"/><path d="m4 20 5-5"/></svg>');
}

#skill .icon {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"/><path d="M5 3v4"/><path d="M19 17v4"/><path d="M3 5h4"/><path d="M17 19h4"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"/><path d="M5 3v4"/><path d="M19 17v4"/><path d="M3 5h4"/><path d="M17 19h4"/></svg>');
}

#additional .icon {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>');
}

.card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1rem, 3vw, 1.1rem);
    font-weight: 600;
    color: var(--text-title);
    letter-spacing: 0.01em;
}


.subject-list {
    list-style: none;
}

.subject-list li {
    display: flex;
    align-items: flex-start;
    padding: 0.875rem 0;
    border-top: 1px solid rgba(39, 39, 42, 0.4);
}

.subject-list li:first-child {
    border-top: none;
}

.id {
    font-family: 'Inter', monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: var(--text-desc);
    margin-right: 1rem;
    min-width: 2.5rem;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    opacity: 0.7;
}

.name {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    word-break: break-word;
}

.content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.6rem;
    background: rgba(239, 35, 60, 0.1);
    color: var(--critical-color);
    border: 1px solid rgba(239, 35, 60, 0.2);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    width: fit-content;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.critical .name {
    color: var(--text-title);
    font-weight: 500;
}

.footer {
    margin-top: clamp(4rem, 10vw, 8rem);
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
}

.updated {
    color: #3f3f46;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Specific Mobile Enhancements */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .header {
        padding: 0.75rem 1rem;
        margin-bottom: 2rem;
    }

    .subject-list li {
        flex-direction: column;
        gap: 0.25rem;
    }

    .id {
        margin-right: 0;
        margin-bottom: 0.25rem;
        font-size: 0.75rem;
    }

    .content {
        width: 100%;
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    /* Make theory card span full width if needed */
    #theory {
        grid-column: 1 / -1;
    }
}

/* Ultra-wide support */
@media (min-width: 1200px) {
    .container {
        max-width: 1000px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

