:root {
    --bg-gradient-light: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --card-bg-light: rgba(255, 255, 255, 0.95);
    --card-bg-dark: rgba(30, 30, 46, 0.95);
    --text-primary-light: #2d3748;
    --text-primary-dark: #e2e8f0;
    --text-secondary-light: #4a5568;
    --text-secondary-dark: #cbd5e0;
    --accent-light: #667eea;
    --accent-dark: #81c784;
    --border-light: rgba(255, 255, 255, 0.2);
    --border-dark: rgba(255, 255, 255, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary-light);
    overflow-x: hidden;
    overflow-y: auto;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark {
    background: var(--bg-gradient-dark);
    color: var(--text-primary-dark);
}

.wip-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(45deg, #e53e3e, #dd6b20);
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.ribbon-text {
    display: inline-block;
    animation: bounce 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-2px); }
}

.availability-banner {
    position: fixed;
    top: 40px;
    left: 0;
    right: 0;
    background: linear-gradient(45deg, #2d7d7d, #2c5aa0);
    color: white;
    text-align: center;
    padding: 6px 0;
    font-size: 0.85rem;
    font-weight: 400;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.5s ease-out;
}

.availability-text {
    display: inline-block;
    animation: shimmer 3s infinite;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.container {
    text-align: center;
    padding: 1rem;
    max-width: 900px;
    width: 100%;
    position: relative;
    margin-top: 80px; /* Account for fixed banners */
    margin-bottom: 2rem; /* Add bottom margin for scrolling */
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 200;
}

.theme-btn {
    background: var(--card-bg-light);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-light);
}

body.dark .theme-btn {
    background: var(--card-bg-dark);
    border: 1px solid var(--border-dark);
    box-shadow: 0 4px 12px var(--shadow-dark);
}

body.dark .theme-btn:hover {
    box-shadow: 0 6px 20px var(--shadow-dark);
}

.theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.content {
    background: var(--card-bg-light);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 40px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

body.dark .content {
    background: var(--card-bg-dark);
    box-shadow: 0 20px 40px var(--shadow-dark);
    border: 1px solid var(--border-dark);
}

.main-title {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 2rem;
    color: var(--text-primary-light);
    transition: color 0.3s ease;
}

body.dark .main-title {
    color: var(--text-primary-dark);
}

.typing-text {
    color: var(--accent-light);
    font-weight: 600;
    min-height: 1.2em;
    height: 1.2em;
    display: inline-block;
    transition: color 0.3s ease;
    vertical-align: top;
}

body.dark .typing-text {
    color: var(--accent-dark);
}

.cursor {
    animation: blink 1s infinite;
    color: var(--accent-light);
    font-weight: 300;
    transition: color 0.3s ease;
}

body.dark .cursor {
    color: var(--accent-dark);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.github-section {
    margin-top: 2rem;
}

.github-section p {
    font-size: 1.1rem;
    color: var(--text-secondary-light);
    font-weight: 300;
    transition: color 0.3s ease;
}

body.dark .github-section p {
    color: var(--text-secondary-dark);
}

.github-link {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.github-link:hover {
    border-bottom-color: var(--accent-light);
    transform: translateY(-1px);
}

body.dark .github-link {
    color: var(--accent-dark);
}

body.dark .github-link:hover {
    border-bottom-color: var(--accent-dark);
}

.contact-section {
    margin-top: 1.5rem;
}

.contact-section p {
    font-size: 1rem;
    color: var(--text-secondary-light);
    font-weight: 300;
    transition: color 0.3s ease;
}

body.dark .contact-section p {
    color: var(--text-secondary-dark);
}

.contact-text {
    color: var(--accent-light);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    user-select: none;
}

.contact-text:hover {
    border-bottom-color: var(--accent-light);
    transform: translateY(-1px);
}

body.dark .contact-text {
    color: var(--accent-dark);
}

body.dark .contact-text:hover {
    border-bottom-color: var(--accent-dark);
}

.username-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

body.dark .username-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.username-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary-light);
    margin-bottom: 1rem;
    text-align: center;
    transition: color 0.3s ease;
}

body.dark .username-title {
    color: var(--text-primary-dark);
}

.username-explanation {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary-light);
    text-align: center;
    font-weight: 300;
    transition: color 0.3s ease;
}

body.dark .username-explanation {
    color: var(--text-secondary-dark);
}

.skills-section {
    margin-top: 3rem;
}

.skills-title {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-primary-light);
    margin-bottom: 2rem;
    text-align: center;
    transition: color 0.3s ease;
}

body.dark .skills-title {
    color: var(--text-primary-dark);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-card {
    perspective: 1000px;
    height: 280px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.skill-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-shadow: 0 8px 25px var(--shadow-light);
    transition: all 0.3s ease;
}

body.dark .card-front,
body.dark .card-back {
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.card-front {
    background: var(--card-bg-light);
    border: 1px solid var(--border-light);
}

body.dark .card-front {
    background: var(--card-bg-dark);
    border: 1px solid var(--border-dark);
}

.card-back {
    background: linear-gradient(135deg, var(--accent-light), #5a67d8);
    color: white;
    transform: rotateY(180deg);
}

body.dark .card-back {
    background: linear-gradient(135deg, var(--accent-dark), #68d391);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.skill-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary-light);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

body.dark .skill-title {
    color: var(--text-primary-dark);
}

.skill-subtitle {
    font-size: 1rem;
    color: var(--text-secondary-light);
    font-weight: 300;
    transition: color 0.3s ease;
}

body.dark .skill-subtitle {
    color: var(--text-secondary-dark);
}

.card-content {
    text-align: left;
    width: 100%;
}

.card-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    margin-top: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.card-content h4:first-child {
    margin-top: 0;
}

.card-content p {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive design */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
    
    .content {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .container {
        padding: 1rem;
        margin-top: 70px; /* Adjust for mobile banners */
    }
    
    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .theme-btn {
        width: 45px;
        height: 45px;
    }
    
    .github-section p {
        font-size: 1rem;
    }
    
    .username-section {
        padding: 1.2rem;
        margin-top: 1.5rem;
    }
    
    .username-title {
        font-size: 1.2rem;
    }
    
    .username-explanation {
        font-size: 0.95rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-card {
        height: 260px;
    }
    
    .skills-title {
        font-size: 1.6rem;
    }
    
    .wip-ribbon {
        font-size: 0.8rem;
        padding: 6px 0;
    }
    
    .availability-banner {
        font-size: 0.75rem;
        padding: 5px 0;
        top: 35px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.6rem;
        line-height: 1.4;
    }
    
    .content {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
        border-radius: 15px;
    }
    
    .container {
        padding: 0.5rem;
        margin-top: 65px; /* Adjust for small mobile banners */
    }
    
    .theme-btn {
        width: 40px;
        height: 40px;
    }
    
    .theme-icon {
        font-size: 1rem;
    }
    
    .github-section p {
        font-size: 0.95rem;
    }
    
    .username-section {
        padding: 1rem;
        margin-top: 1.2rem;
    }
    
    .username-title {
        font-size: 1.1rem;
    }
    
    .username-explanation {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .skills-grid {
        gap: 1rem;
    }
    
    .skill-card {
        height: 240px;
    }
    
    .skills-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .skill-icon {
        font-size: 2.5rem;
    }
    
    .skill-title {
        font-size: 1.2rem;
    }
    
    .card-content h4 {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
        margin-top: 0.6rem;
    }
    
    .card-content p {
        font-size: 0.75rem;
        line-height: 1.2;
        margin-bottom: 0.2rem;
    }
    
    .wip-ribbon {
        font-size: 0.75rem;
        padding: 5px 0;
    }
    
    .availability-banner {
        font-size: 0.7rem;
        padding: 4px 0;
        top: 32px;
    }
}

@media (max-width: 360px) {
    .main-title {
        font-size: 1.4rem;
    }
    
    .content {
        padding: 1.2rem 0.8rem;
    }
    
    .container {
        margin-top: 60px; /* Adjust for very small mobile banners */
    }
    
    .github-section p {
        font-size: 0.9rem;
    }
    
    .username-section {
        padding: 0.8rem;
        margin-top: 1rem;
    }
    
    .username-title {
        font-size: 1rem;
    }
    
    .username-explanation {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .skills-grid {
        gap: 0.8rem;
    }
    
    .skill-card {
        height: 220px;
    }
    
    .skills-title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }
    
    .skill-icon {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .skill-title {
        font-size: 1.1rem;
    }
    
    .card-content h4 {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
        margin-top: 0.5rem;
    }
    
    .card-content p {
        font-size: 0.7rem;
        line-height: 1.2;
        margin-bottom: 0.2rem;
    }
    
    .wip-ribbon {
        font-size: 0.7rem;
        padding: 4px 0;
    }
    
    .availability-banner {
        font-size: 0.65rem;
        padding: 3px 0;
        top: 30px;
    }
}
