/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

/* Custom Properties */
:root {
    --mint-lightest: #ddfff7;
    --mint-light: #99ffe6;
    --mint: #43dbd1;
    --coral-light: #ff7070;
    --coral: #ff9385;
    --coral-lightest: #ffa69e;
    --teal-dark: #005f6b;
    
    --color-primary: var(--teal-dark);
    --color-accent: var(--coral);
    --color-text: var(--teal-dark);
    --color-text-light: #666;
    --color-bg: var(--mint-lightest);
    --color-white: #ffffff;
    --color-selection: var(--mint);
    --bg-pattern: linear-gradient(135deg, var(--mint-lightest) 0%, var(--mint-light) 100%);
    --bg-pattern-size: 20px 20px;
    
    --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    
    --container-max: 700px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

/* Dark Mode */
html[data-theme="dark"] {
    --color-primary: var(--mint-light);
    --color-accent: var(--coral-lightest);
    --color-text: #E5E5E5;
    --color-text-light: #B0B0B0;
    --color-bg: var(--teal-dark);
    --color-white: #1A1A1A;
    --color-selection: var(--mint);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --bg-pattern: linear-gradient(135deg, var(--teal-dark) 0%, #003840 100%);
    --bg-pattern-size: 20px 20px;
}

/* System preference dark mode (only when no explicit theme is set) */
@media (prefers-color-scheme: dark) {
    html:not([data-theme]) {
        --color-primary: var(--mint-light);
        --color-accent: var(--coral-lightest);
        --color-text: #E5E5E5;
        --color-text-light: #B0B0B0;
        --color-bg: var(--teal-dark);
        --color-white: #1A1A1A;
        --color-selection: var(--mint);
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        --bg-pattern: linear-gradient(135deg, var(--teal-dark) 0%, #003840 100%);
        --bg-pattern-size: 20px 20px;
    }
}

/* Base Styles */
body {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--bg-pattern);
    min-height: 100vh;
}

::selection {
    background-color: var(--color-selection);
    color: var(--color-white);
}

/* Typography */
h1, h2, h3 {
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h2 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--color-accent);
    font-weight: 300;
}

h3 {
    font-size: 1.25rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
    margin-bottom: var(--spacing-md);
}

em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
}

p {
    margin-bottom: var(--spacing-md);
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover, a:focus {
    color: var(--color-text-light);
    outline: none;
}

/* Layout */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    padding: var(--spacing-lg) 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 a {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text);
    font-size: 1rem;
    transition: var(--transition);
}

nav h1 a:hover {
    opacity: 0.6;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--mint);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    box-shadow: 0 4px 15px rgba(67, 219, 209, 0.3);
}

.theme-toggle:hover {
    background: var(--mint-light);
    transform: scale(1.05);
}

.theme-toggle-icon {
    font-size: 1.25rem;
    transition: var(--transition);
    display: inline-block;
}

/* Hide moon, show sun in dark mode */
html[data-theme="dark"] .theme-toggle-icon {
    font-size: 0;
}

html[data-theme="dark"] .theme-toggle-icon::before {
    content: '☀️';
    font-size: 1.25rem;
    display: inline-block;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg) 0;
}

.profile-section {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-xl);
    max-width: 600px;
    width: 100%;
}

.profile-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--mint);
    box-shadow: 0 8px 25px rgba(67, 219, 209, 0.3);
}

.profile-content {
    width: 100%;
}

.profile-content h1 {
    font-family: 'Italiana', serif;
    font-size: 4rem;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.profile-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--coral);
    margin-bottom: var(--spacing-xs);
    letter-spacing: 1px;
}

.profile-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
    text-transform: none;
    letter-spacing: 0.5px;
    line-height: 1.5;
}

.email-link {
    font-family: 'Montserrat', sans-serif;
    display: inline-block;
    margin-top: var(--spacing-md);
    padding: 16px 32px;
    background: var(--coral);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 147, 133, 0.3);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.email-link:hover {
    background: var(--coral-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 147, 133, 0.4);
    color: white;
}

/* Footer */
footer {
    padding: var(--spacing-lg) 0;
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .profile-section {
        padding: var(--spacing-xl);
    }
    
    .profile-image img {
        width: 200px;
        height: 200px;
    }
    
    .profile-content h1 {
        font-size: 3rem;
    }
    
    .profile-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .profile-section {
        padding: var(--spacing-lg);
    }
    
    .profile-content h1 {
        font-size: 2.5rem;
    }
    
    .profile-content h2 {
        font-size: 1.4rem;
    }
    
    .profile-content h3 {
        font-size: 1.1rem;
    }
}