/* Main variables and themes */
:root {
    /* Light theme (default) */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --tag-bg: #e9effb;
    --tag-text: #2563eb;
    --border-color: #e9ecef;
    --header-bg: #3498db;
    --header-text: #ffffff;
    --footer-bg: #212529;
    --footer-text: #f8f9fa;
}

/* Dark theme */
.dark-theme {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #242424;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --tag-bg: #2d3748;
    --tag-text: #60a5fa;
    --border-color: #2d3748;
    --header-bg: #0f172a;
    --header-text: #ffffff;
    --footer-bg: #0f172a;
    --footer-text: #e9ecef;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s, color 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

/* Containers and common elements */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
}

.primary-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.secondary-btn:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Headings */
.section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    position: relative;
    color: var(--text-primary);
    text-align: center;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 3px;
    background-color: var(--accent-color);
}

/* Site header */
.site-header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 3rem 0 2rem;
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1rem;
}

.profile-image-container {
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.profile-image-container:hover {
    transform: scale(1.05);
}

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

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.site-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.contact-info a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s;
}

.contact-info a:hover {
    color: white;
}

.theme-toggle {
    position: absolute;
    right: 0;
    top: 0;
    background: transparent;
    border: none;
    color: var(--header-text);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle .fa-moon {
    display: inline-block;
}

.theme-toggle .fa-sun {
    display: none;
}

.dark-theme .theme-toggle .fa-moon {
    display: none;
}

.dark-theme .theme-toggle .fa-sun {
    display: inline-block;
}

/* Main content */
.site-main {
    padding: 3rem 0;
}

/* Bio section */
.bio-section {
    margin-bottom: 3rem;
}

.bio-text {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Tech stack section */
.tech-stack-section {
    margin-bottom: 3rem;
    text-align: center;
}

.toggle-tech-stack {
    margin-bottom: 1.5rem;
    display: inline-block;
}

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
}

.tech-stack-grid.expanded {
    max-height: 1000px;
    opacity: 1;
    margin-top: 2rem;
}

.tech-category {
    background-color: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.tech-category h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tech-item {
    background-color: var(--tag-bg);
    color: var(--tag-text);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.tech-item:hover {
    transform: translateY(-2px);
}

/* Links section */
.links-section {
    margin-bottom: 3rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.links-grid .btn {
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.links-grid .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 0;
    margin-top: 2rem;
}

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

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--footer-text);
    font-size: 1.25rem;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.8;
}

.social-links a:hover {
    transform: translateY(-3px);
    opacity: 1;
}

/* Media queries for responsiveness */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }
    
    .site-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .profile-image-container {
        width: 150px;
        height: 150px;
        margin-bottom: 1rem;
    }
    
    .bio-text {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-category {
        padding: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}