/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Variables */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --accent-color: #4f46e5;
    --hover-color: #4338ca;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    
    /* Transition Speed */
    --transition-speed: 0.3s;
}

.dark-theme {
    /* Dark Theme Variables */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #f8f9fa;
    --text-secondary: #cccccc;
    --accent-color: #6366f1;
    --hover-color: #818cf8;
    --border-color: #2d2d2d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-bg: #252525;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, 
                color var(--transition-speed) ease;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}

#theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

#theme-toggle-btn:hover {
    transform: rotate(15deg);
}

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

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

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

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-top: 1.5rem;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--accent-color);
    padding: 3px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease;
}

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

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-name a, .profile-name a:visited, .profile-name a:active, .profile-name a:hover {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

.profile-bio {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    font-size: 1rem;
}

/* Links Container */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.links-section {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform var(--transition-speed) ease, 
                box-shadow var(--transition-speed) ease;
}

.links-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    color: var(--text-primary);
}

/* Link Cards */
.link-card {
    display: block;
    text-decoration: none;
    padding: 1rem;
    border-radius: 12px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: transform var(--transition-speed) ease, 
                box-shadow var(--transition-speed) ease, 
                background-color var(--transition-speed) ease;
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
}

.link-card.appear {
    opacity: 1;
    transform: translateY(0);
}

.link-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 5px 15px var(--shadow-color);
    background-color: rgba(79, 70, 229, 0.1);
}

.link-card:last-child {
    margin-bottom: 0;
}

/* Row Links (Full Width) */
.row-link {
    width: 100%;
    padding: 1rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.row-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--accent-color);
    transition: width var(--transition-speed) ease;
}

.row-link:hover::before {
    width: 10px;
}

.row-link[data-platform="website"]::before {
    background-color: #2563eb;
}

.row-link[data-platform="github"]::before {
    background-color: #333333;
}

.row-link[data-platform="linkedin"]::before {
    background-color: #0077B5;
}

.row-link[data-platform="tryhackme"]::before {
    background-color: #c11c1c;
}

.row-link[data-platform="instagram"]::before {
    background-color: #E1306C;
}

.row-link[data-platform="gmail"]::before {
    background-color: #EA4335;
}

.row-link[data-platform="spotify"]::before {
    background-color: #1DB954;
}

.row-link[data-platform="youtube"]::before {
    background-color: #FF0000;
}

.row-link[data-platform="twitter"]::before {
    background-color: #1DA1F2;
}

.dark-theme .row-link[data-platform="github"]::before {
    background-color: #f0f6fc;
}

/* Links List */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Business and Project Links */
.link-content {
    display: flex;
    align-items: center;
}

.link-icon {
    min-width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: white;
    font-size: 1.5rem;
    transition: transform var(--transition-speed) ease, 
                background-color var(--transition-speed) ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.row-link:hover .link-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Platform-specific icon backgrounds */
.row-link[data-platform="website"] .link-icon {
    background-color: #2563eb;
}

.row-link[data-platform="github"] .link-icon {
    background-color: #333333;
}

.row-link[data-platform="linkedin"] .link-icon {
    background-color: #0077B5;
}

.row-link[data-platform="tryhackme"] .link-icon {
    background-color: #c11c1c;
}

.row-link[data-platform="instagram"] .link-icon {
    background-color: #E1306C;
}

.row-link[data-platform="gmail"] .link-icon {
    background-color: #EA4335;
}

.row-link[data-platform="spotify"] .link-icon {
    background-color: #1DB954;
}

.row-link[data-platform="youtube"] .link-icon {
    background-color: #FF0000;
}

.row-link[data-platform="twitter"] .link-icon {
    background-color: #1DA1F2;
}

.dark-theme .row-link[data-platform="github"] .link-icon {
    background-color: #444444;
}

.link-details {
    flex: 1;
    transition: transform var(--transition-speed) ease;
}

.row-link:hover .link-details {
    transform: translateX(5px);
}

.link-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.link-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    text-align: center;
    padding-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
    
    .profile-bio {
        font-size: 0.9rem;
    }
    
    .link-icon {
        min-width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-right: 1rem;
    }
    
    .link-details h3 {
        font-size: 1.1rem;
    }
    
    .link-details p {
        font-size: 0.85rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile, .links-section, footer {
    animation: fadeInUp 0.8s ease forwards;
}

.profile {
    animation-delay: 0.1s;
}

.links-section:nth-child(1) {
    animation-delay: 0.3s;
}

footer {
    animation-delay: 0.5s;
}

/* Link card animation - staggered appearance */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.link-card {
    animation: slideInRight 0.5s ease forwards;
    animation-delay: calc(0.1s * var(--item-index, 0));
    opacity: 0;
}