/* Charles-Andr�a Gravier Morin - Personal Website Styles */
/* "Noir sur Blanc" Design Philosophy */

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

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

body {
    font-family: Georgia, Cambria, "Times New Roman", serif;
    font-size: 1.125rem; /* text-lg equivalent */
    line-height: 1.625; /* leading-relaxed */
    color: #0c0a09; /* Deep charcoal black */
    background-color: #fafaf9; /* Warm stone-50 */
    min-height: 100vh;
    font-weight: 400;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 550px;
    pointer-events: none;
    z-index: 1;
    background-image: url('mountain-background.svg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: bottom;
    opacity: 1;
}

/* Subtle geometric academic patterns */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
    background-image: 
        /* Subtle grid pattern like graph paper */
        linear-gradient(rgba(12,10,9,0.008) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12,10,9,0.008) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
}

/* Container and Layout */
.container {
    max-width: 672px; /* 2xl equivalent */
    margin: 0 auto;
    padding: 4rem 2rem; /* px-8 py-16 equivalent */
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

/* Fixed Logo */
.logo {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    background: white;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    color: #0c0a09;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
}

.logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Typography Hierarchy */
h1 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 400;
    text-align: center;
    margin-bottom: 4rem; /* mb-16 */
    letter-spacing: 0.025em;
    color: #0c0a09;
}

h2 {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 400;
    margin-bottom: 2rem;
    margin-top: 6rem; /* mt-24 */
    color: #0c0a09;
}

h2:first-of-type {
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 400;
    margin-bottom: 1.5rem;
    margin-top: 3rem;
    color: #0c0a09;
}

p {
    margin-bottom: 2rem; /* space-y-8 equivalent */
    color: #0c0a09;
    line-height: 1.625;
}

/* Language Selector - Toggle Style */
.language-selector {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    background: white;
    border-radius: 0.75rem;
    padding: 0.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-family: Georgia, Cambria, "Times New Roman", serif;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    z-index: 2;
}

.lang-btn:hover {
    color: #374151;
}

.lang-btn.active {
    background: transparent !important;
    border: 1px solid #0c0a09 !important;
    color: #0c0a09 !important;
    font-weight: 500;
}

.lang-btn:not(.active) {
    background: transparent;
    border: 1px solid transparent;
    color: #6b7280;
    font-weight: 400;
}

/* Links */
a {
    color: #374151;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: #0c0a09;
    text-decoration-thickness: 2px;
}

/* Content Sections */
.content {
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease-in-out;
}

.content.active {
    opacity: 1;
    display: block;
}

/* Section Spacing */
.section {
    margin-bottom: 2rem;
}

.section + .section {
    margin-top: 2rem;
}

/* Lists */
ul {
    margin-bottom: 2rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.625;
}

/* Contact Information */
.contact-info {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 1rem;
    text-align: center;
}

.contact-info a {
    color: #6b7280;
}

.contact-info a:hover {
    color: #0c0a09;
}

/* Projects and Work Items */
.work-item {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f3f4f6;
}

.work-item:last-child {
    border-bottom: none;
    margin-bottom: 2rem;
}

.work-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #0c0a09;
    margin-bottom: 0.5rem;
}

.work-meta {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.work-description {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    h1 {
        font-size: 1.875rem; /* text-3xl */
        margin-bottom: 2rem;
    }
    
    h2 {
        font-size: 1.5rem; /* text-2xl */
        margin-top: 3rem;
    }
    
    .logo {
        top: 1rem;
        left: 1rem;
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.875rem;
    }
    
    .language-selector {
        top: 1rem;
        right: 1rem;
        padding: 0.2rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Print Styles */
@media print {
    .logo,
    .language-selector {
        display: none;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .work-item {
        page-break-inside: avoid;
    }
}

/* Smooth scrolling and animations */
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}

/* Focus styles for accessibility */
.logo:focus,
.lang-btn:focus,
a:focus {
    outline: 2px solid #0c0a09;
    outline-offset: 2px;
}

/* Selection styles */
::selection {
    background: #0c0a09;
    color: #fafaf9;
}