/* Marc Chenard */

:root {
    --bg-color: #121212;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-color: #64ffda;
    --card-bg: #1e1e1e;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --transition-speed: 0.6s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover { opacity: 0.7; }

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(18, 18, 18, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.nav-logo { font-weight: bold; font-size: 1.5rem; letter-spacing: 2px; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-primary); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* Hero & Parallax */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%; /* Extra height for parallax movement */
    left: 0;
    width: 100%;
    height: 140%;
    background-image: radial-gradient(circle at 50% 50%, #2a2a2a 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: -1;
    transform: translateY(0);
    /* Will be updated by JS */
}

.hero-content { text-align: center; }
.hero-content h1 { font-size: 4rem; margin-bottom: 1rem; }
.hero-content p { font-size: 1.5rem; color: var(--text-secondary); }

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

.profile-img-wrapper {
    position: relative;
}

.profile-img {
    width: 100%;
    height: 400px;
    object-fit: cover;        /* keeps your photo nicely cropped */
    object-position: center top; /* adjust if you want face centered */
    display: block;
    border: 1px solid var(--text-secondary);
}

/* Projects Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

.project-card:hover {
    border-color: #333;
}

.morph-container {
    height: 60px;
    width: 60px;
    margin-bottom: 1rem;
}

.morph-shape {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    transition: all 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.links {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Accordion */
.accordion-wrapper { margin-top: 2rem; border-top: 1px solid #333; }
.accordion-item { border-bottom: 1px solid #333; }

.accordion-header {
    width: 100%;
    padding: 1.5rem 0;
    background: none;
    border: none;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-family: inherit;
    transition: color 0.3s;
}

.accordion-header:hover {
    color: var(--accent-color);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.inner-content { padding-bottom: 1.5rem; color: var(--text-secondary); }

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid #333;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-submit {
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: #000;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
}

/* ANIMATION CLASSES 
   These follow the user's logic: Active class triggers the 'To' state.
   Default CSS is the 'From' state.
*/

/* 1. Fade In (Slide Up) */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Scale Up */
.scale-up {
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scale-up.active {
    opacity: 1;
    transform: scale(1);
}

/* 3. Shape Morph (Square -> Circle + Rotate) */
.morph {
    border-radius: 0;
    transform: rotate(0deg);
}

.morph.active {
    border-radius: 50%;
    transform: rotate(180deg);
}

/* Had to add this to make it mobile friendly */
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
        justify-content: center;
    }
}
