/* --- VARIABLES & GLOBAL STYLES --- */
:root {
    --bg-color: #F4F1ED;
    --frame-color: #252422;
    --text-color: #252422;
    --text-muted: #5e5c5a;
    --accent-color: #C0A9A8;
    --border-color: #e0dbd6;
    --card-bg-color: #ffffff;
    --font-family: 'Manrope', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--frame-color);
    font-family: var(--font-family);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- MAIN LAYOUT & WRAPPERS --- */
.page-wrapper { padding: 1rem; min-height: 100vh; display: flex; }
.main-container {
    flex-grow: 1;
    background-color: var(--bg-color);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.content-wrapper {
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
}
.noise-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)"/></svg>');
    opacity: 0.04; z-index: 100; pointer-events: none;
}
.section-container { padding: 6rem 3rem; }
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 4rem;
}

/* --- HEADER, HERO, MARQUEE (UNCHANGED) --- */
/* (Code from previous step is fine, included here for completeness) */
.header { display: flex; justify-content: space-between; align-items: center; padding: 2rem 3rem; z-index: 50; border-bottom: 1px solid var(--border-color); }
.logo { font-size: 1.5rem; font-weight: 800; text-decoration: none; color: var(--text-color); }
.main-nav { display: flex; align-items: center; gap: 2rem; }
.nav-link { text-decoration: none; color: var(--text-muted); font-weight: 600; transition: color 0.3s ease; }
.nav-link:hover { color: var(--text-color); }
.nav-button { background-color: var(--frame-color); color: var(--bg-color); padding: 0.8rem 1.5rem; border-radius: 50px; text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; transition: transform 0.3s ease; }
.nav-button:hover { transform: scale(1.05); }
#hero { min-height: 70vh; display: flex; align-items: center; padding: 3rem; }
.hero-content { display: grid; grid-template-columns: 3fr 2fr; align-items: center; gap: 2rem; width: 100%; }
.hero-title { font-size: clamp(3rem, 7vw, 6.5rem); font-weight: 800; line-height: 1.1; text-transform: uppercase; }
.hero-title .line { display: flex; align-items: center; gap: 1.5rem; overflow: hidden; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1); }
body.loaded .hero-title .line > span { transform: translateY(0); }
body.loaded .hero-title .line:nth-child(2) > span { transition-delay: 0.15s; }
.icon-wavy-arrow, .icon-asterisk { font-size: 0.7em; font-weight: 400; }
.icon-asterisk { display: inline-block; background-color: var(--accent-color); color: var(--accent-color); border-radius: 50%; width: 0.8em; height: 0.8em; font-size: 0.8em; }
.hero-right { align-self: end; padding-bottom: 2rem; }
.hero-description { color: var(--text-muted); font-size: 1rem; line-height: 1.6; margin-bottom: 2rem; max-width: 400px; }
.explore-link { color: var(--text-muted); text-decoration: none; font-weight: 600; transition: color 0.3s ease; }
.explore-link:hover { color: var(--text-color); }
.explore-link i { margin-left: 0.5rem; }
.marquee { width: 100%; padding: 1.5rem 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); overflow: hidden; position: relative; background: var(--bg-color); }
.marquee-track { display: flex; gap: 2rem; white-space: nowrap; will-change: transform; animation: scroll 30s linear infinite; font-weight: 600; text-transform: uppercase; }
.marquee-track .dot { color: var(--accent-color); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- ABOUT SECTION (UNCHANGED) --- */
.about-content { display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; align-items: center; }
.about-image img { width: 100%; border-radius: 12px; max-width: 350px; aspect-ratio: 1/1; object-fit: cover; }
.about-text h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.about-text p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; max-width: 600px; }

/* --- PROJECTS SPOTLIGHT CAROUSEL (NEW) --- */
.projects-carousel-container {
    position: relative;
    height: 70vh;
    min-height: 600px;
    perspective: 1500px;
    cursor: grab;
}
.projects-carousel-track {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    transform-style: preserve-3d;
}
.project-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    margin: auto;
    width: 65%;
    height: 90%;
    background-color: var(--card-bg-color);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.05);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.6s ease,
                filter 0.6s ease;
    will-change: transform, opacity, filter;
}
.project-slide.is-active {
    opacity: 1;
    z-index: 10;
    filter: blur(0px);
}
.project-slide:not(.is-active) {
    opacity: 0.5;
    filter: blur(2px);
}
.project-slide-content { display: grid; grid-template-columns: 55% 45%; height: 100%; overflow: hidden; }
.project-image { width: 82%; height: 100%; overflow: hidden; border-radius: 15px 0 0 15px; }
.project-image1 { width: 82%; height: 100%; overflow: hidden; border-radius: 15px 0 0 15px; }
.project-image2 { width: 100%; height: 100%; overflow: hidden; border-radius: 15px 0 0 15px; }
.project-image3 { width: 100%; height: 100%; overflow: hidden; border-radius: 15px 0 0 15px; }
.project-image img { width: 100%; height: 100%; object-fit: cover; }
.project-image1 img { width: 100%; height: 100%; object-fit: cover; }
.project-image2 img { width: 100%; height: 100%; object-fit: cover; }
.project-image3 img { width: 100%; height: 100%; object-fit: cover; }
.project-info { padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.project-info h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.project-info p { color: var(--text-muted); line-height: 1.6; margin-bottom: 2rem; }
.project-tech-stack { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-tech-stack span { background-color: #f0f0f0; padding: 0.4rem 0.8rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; }
.carousel-nav {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 20;
}
.carousel-nav .carousel-button {
    background-color: var(--card-bg-color); border: 1px solid var(--border-color);
    padding: 0.7rem 1.5rem; border-radius: 50px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; gap: 0.5rem; transition: all 0.3s ease;
}
.carousel-nav .carousel-button:hover { background: var(--frame-color); color: var(--bg-color); }
.carousel-nav .carousel-button:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- SKILLS GRID (NEW SIMPLE GRID) --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.skill-item {
    background: var(--card-bg-color); border: 1px solid var(--border-color);
    border-radius: 12px; display: flex; align-items: center;
    padding: 1.5rem; gap: 1rem; transition: all 0.3s ease;
}
.skill-item:hover { transform: translateY(-8px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--text-color); }
.skill-item i { font-size: 2.5rem; color: var(--text-color); width: 40px; text-align: center; }
.skill-item span { font-weight: 600; font-size: 1.1rem; }

/* --- CONTACT & FOOTER (UNCHANGED) --- */
#contact { text-align: center; }
.contact-description { max-width: 500px; margin: 0 auto 2rem; color: var(--text-muted); font-size: 1.1rem; }
.contact-button { display: inline-block; background: var(--frame-color); color: var(--bg-color); padding: 1rem 2.5rem; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 1.1rem; transition: transform 0.3s ease; margin-bottom: 3rem; }
.contact-button:hover { transform: scale(1.05); }
.social-links { display: flex; justify-content: center; gap: 2rem; }
.social-links a { font-size: 1.5rem; color: var(--text-muted); transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: var(--text-color); transform: translateY(-5px); }
.footer { padding: 2rem 3rem; border-top: 1px solid var(--border-color); text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .section-container { padding: 4rem 2rem; }
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-title .line { justify-content: center; }
    .hero-right { align-self: center; padding-bottom: 0; margin-top: 2rem; }
    .hero-description { margin-left: auto; margin-right: auto; }
    .about-content { grid-template-columns: 1fr; text-align: center; }
    .about-image { margin: 0 auto 2rem; }
    .project-slide { width: 85%; }
    .project-slide-content { grid-template-columns: 1fr; }
    .project-image { height: 250px; border-radius: 15px 15px 0 0; }
    .project-info { padding: 2rem; }
}

@media (max-width: 768px) {
    .page-wrapper { padding: 0.5rem; }
    .header { flex-direction: column; gap: 1.5rem; padding: 1.5rem; }
    #hero { min-height: auto; padding: 3rem 1.5rem; }
    .projects-carousel-container { perspective: none; height: 80vh; }
    .project-slide { width: 90%; }
    /* Simplify transforms for mobile */
    .project-slide:not(.is-active) { transform: scale(0.85); }
}