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

:root {
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --background: #ffffff;
    --border: #e5e5e5;
    --link-color: #0066cc;
}

[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --background: #1a1a1a;
    --border: #333333;
    --link-color: #4da6ff;
}

/* Base Styles */
html, body {
    height: 100%;
    overflow: hidden;
}

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

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.theme-toggle:hover {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

.theme-toggle:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.theme-icon {
    display: block;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-icon {
    transform: rotate(180deg);
}

/* Main Content */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
    flex: 1;
    overflow-y: auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.profile-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #000000;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .profile-image {
    background: #ffffff;
    color: #000000;
}

.profile-image::before {
    content: 'RJ';
}

.hero-content {
    max-width: 100%;
}

.hero-name {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero-title {
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Section Styles */
.section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.section:last-of-type {
    border-bottom: none;
}

.section-header {
    margin-bottom: 0.75rem;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

.section-content {
    max-width: 100%;
}

.section-content p {
    font-size: clamp(0.875rem, 1.5vw, 0.9375rem);
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.section-content p:last-of-type {
    margin-bottom: 0;
}

.text-link {
    color: var(--link-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.text-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Contact Section */
.contact-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.contact-link {
    font-size: 0.9375rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 400;
    display: inline-block;
    background: var(--background);
}

.contact-link:hover {
    border-color: var(--text-primary);
    background: var(--text-primary);
    color: var(--background);
}

/* Footer */
.footer {
    padding: 1rem 0 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}

.footer-content {
    max-width: 100%;
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .main-content {
        padding: 2rem 1.5rem 1.5rem;
    }

    .hero {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .profile-image {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .section {
        padding: 1.25rem 0;
    }

    .contact-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .contact-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        top: 0.75rem;
        right: 0.75rem;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .main-content {
        padding: 1.5rem 1rem 1rem;
    }

    .hero {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .profile-image {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .section {
        padding: 1rem 0;
    }
}

/* Focus styles for accessibility */
a:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background: var(--text-primary);
    color: var(--background);
}

::-moz-selection {
    background: var(--text-primary);
    color: var(--background);
}

/* Custom scrollbar for main content */
.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
