/* CSS Variables for Light/Dark Theme */
:root {
    /* Light theme variables */
    --bg-primary: #f4f4f4;
    --bg-secondary: #333;
    --bg-footer: #333;
    --text-primary: #333;
    --text-secondary: white;
    --link-color: #1976d2;
    --link-hover: #1565c0;
    --header-bg: #333;
    --profile-bg: transparent;
    --bio-bg: transparent;
}

[data-theme="dark"] {
    /* Dark theme variables */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-footer: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --link-color: #64b5f6;
    --link-hover: #90caf9;
    --header-bg: #2d2d2d;
    --profile-bg: rgba(45, 45, 45, 0.1);
    --bio-bg: rgba(45, 45, 45, 0.1);
}

/* Reset some default styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Remove underline from all links and prevent visited color changes */
a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.3s ease;
}

/* Ensure all link states use consistent colors */
a:link,
a:visited {
    color: var(--link-color);
}

a:hover,
a:active {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Body and layout */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 0 20px;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header styles */
header {
    background-color: var(--header-bg);
    color: var(--text-secondary);
    padding: 20px;
    text-align: center;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme toggle button */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-toggle:hover {
    background-color: var(--text-secondary);
    color: var(--header-bg);
}

.theme-toggle .icon {
    font-size: 16px;
}

/* About section */
.about {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    margin-left: 20px;
    height: calc(100vh - 160px);
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Profile section - Left side */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 300px;
    margin-left: 20px;
    background-color: var(--profile-bg);
    padding: 15px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    height: fit-content;
}

.profile-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid var(--bg-secondary);
    transition: border-color 0.3s ease;
}

.profile-info {
    text-align: center;
}

.profile-info h2 {
    margin-top: 10px;
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.profile-info p {
    margin: 5px 0;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Profile info links inherit global link styles */

/* Bio section - Right side */
.bio {
    flex: 1;
    background-color: var(--bio-bg);
    border-radius: 10px;
    padding: 15px;
    margin-right: 20px;
    transition: background-color 0.3s ease;
    height: fit-content;
    max-height: 100%;
    overflow-y: auto;
}

.bio h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.bio p {
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

footer {
    background-color: var(--bg-footer);
    color: var(--text-secondary);
    text-align: center;
    padding: 10px 0;
    position: fixed;
    width: calc(100% - 40px);
    bottom: 20px;
    left: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .about {
        flex-direction: column;
        text-align: center;
    }

    .profile {
        margin-bottom: 20px;
    }

    .bio {
        padding: 20px;
    }

    .theme-toggle {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px auto;
        display: inline-flex;
    }
}

/* Email container styles for alignment */
.email-container {
    display: block;
    margin-left: 0;
    text-align: left;
    margin-top: 5px;
}

.email-container a {
    display: inline;
    margin-left: 0;
    text-indent: 0;
    line-height: 1.4;
}
