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

:root {
    /* Dark theme colors (now default) */
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #333333;
    --card-bg: #2d2d2d;
    --accent-color: #bf2700;
    --hover-color: #a02200;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    /* Light theme colors */
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --card-bg: #f8f9fa;
    --accent-color: #bf2700;
    --hover-color: #a02200;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Garamond font for headings and nav-logo */
h1, h2, h3, h4, h5, h6, .nav-logo span {
    font-family: 'EB Garamond', 'Times New Roman', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
}

.external-icon {
    font-size: 0.8rem;
    margin-left: 4px;
    opacity: 0.7;
}

.nav-link:hover .external-icon {
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.theme-toggle:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

[data-theme="dark"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero-section {
    padding: 120px 0 80px;
    text-align: center;
}

.profile-card {
    max-width: 600px;
    margin: 0 auto 60px;
}

.profile-image {
    margin-bottom: 30px;
}

.profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.profile-card h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.bio-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.bio-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* Sections */
.section {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-color);
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.link-button {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.link-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.link-button .icon {
    font-size: 1.5rem;
}

/* Specific link button colors */
.mastodon:hover { border-color: #6364ff; }
.bluesky:hover { border-color: #00a8e8; }
.linkedin:hover { border-color: #0077b5; }
.pixelfed:hover { border-color: #e91e63; }
.writefreely:hover { border-color: #5bc0de; }
.bookwyrm:hover { border-color: #8b4513; }

/* Text Grid Styles */
.text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 700px;
    margin: 0 auto;
}

.text-button {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.text-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.text-button .icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.text-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.text-content strong {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.text-content small {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

/* Specific hover colors */
.text-button.german:hover { 
    border-color: #ffce00; 
}

.text-button.english:hover { 
    border-color: #00aced; 
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .text-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .text-button {
        padding: 20px 25px;
    }
    
    .text-content strong {
        font-size: 1.1rem;
    }
    
    .text-content small {
        font-size: 0.9rem;
    }
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.project-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 25px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-align: center;
}

.project-button:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.project-button .icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.project-button small {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Footer */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .profile-card h1 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .profile-image img {
        width: 150px;
        height: 150px;
    }
    
    .profile-card h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .link-button {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .project-button {
        padding: 25px 20px;
    }
    
    .nav-logo span {
        font-size: 1.2rem;
    }
    
    .nav-logo img {
        height: 30px;
    }
}
