@import 'variables.css';

/* -------------------------------------------------------------------------- */
/*                                    Reset                                   */
/* -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

ul {
    list-style: none;
}

/* -------------------------------------------------------------------------- */
/*                                 Typography                                 */
/* -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.section-eyebrow {
    color: var(--accent-highlight);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-size: 2rem;
    text-align: left;
    margin-bottom: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    display: block;
    width: 100%;
    padding-left: 1rem;
    border-left: 4px solid var(--accent-primary);
    line-height: 1.2;
}

/* Optional: Add a subtle underline or gradient if desired, but keeping it clean for now 
   based on the 'Experiences' look which was just text. 
   If 'Experiences' had specific inline styles, we are formalizing them here. 
   Experiences had: text-align: center; margin-bottom: 4rem; font-size: 3rem;
*/

/* -------------------------------------------------------------------------- */
/*                                   Layout                                   */
/* -------------------------------------------------------------------------- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

section {
    padding: var(--spacing-xl) 0;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

/* Custom 2x2 Grid for About Page */
.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    /* Larger gap for premium feel */
}

@media (min-width: 768px) {
    .grid-2x2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.section-hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 6rem;
}

/* -------------------------------------------------------------------------- */
/*                                 Components                                 */
/* -------------------------------------------------------------------------- */

/* Header & Nav */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: var(--glass-bg);
    border-bottom: var(--glass-border);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    /* letter-spacing: 0.05em; */
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    opacity: 0.7;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--text-primary);
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-base);
}

.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Cards */
.card {
    background: var(--surface-color);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.3);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: var(--spacing-md);
}

/* Glass Card Premium */
.card-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.card-glass:hover {
    transform: translateY(-10px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.01));
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px -10px rgba(99, 102, 241, 0.3);
}

.card-glass h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

/* Add a glowing accent at the top */
.card-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 0 0 10px 10px;
    opacity: 0.7;
    transition: all 0.4s ease;
}

.card-glass:hover::after {
    width: 80%;
    opacity: 1;
    box-shadow: 0 0 15px var(--accent-primary);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    backdrop-filter: blur(8px);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--surface-color);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color var(--transition-base);
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-primary);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* -------------------------------------------------------------------------- */
/*                            Experiences Timeline                            */
/* -------------------------------------------------------------------------- */
.timeline {
    position: relative;
    width: 100%;
    /* Removed max-width: 1000px to align with the main grid */
    padding: 2rem 0;
}

/* Vertical connecting line */
.timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    /* Aligns with center of 40px marker (approx) */
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), rgba(255, 255, 255, 0.1));
    border-radius: 4px;
    opacity: 0.6;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    padding-left: 70px;
    /* Space for marker + gap */
}

/* Dot/Marker on the line */
.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--surface-color);
    /* Matches page bg */
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.1);
    border-color: var(--accent-highlight);
    box-shadow: 0 0 20px var(--accent-highlight);
}

.timeline-marker img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    padding: 2px;
}

/* Glass Card for the Content */
.experience-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.experience-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
    border-color: var(--accent-secondary);
    transform: translateX(5px) translateY(-5px);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}

/* Glow effect on hover */
.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.experience-card:hover::before {
    opacity: 1;
}

/* Typography inside card */
.exp-date {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--accent-highlight);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.exp-role {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.exp-company {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Sub-details (Projects/Bullets) */
.exp-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

.exp-project h5 {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.exp-project p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/*                              Scroll Indicator                              */
/* -------------------------------------------------------------------------- */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity var(--transition-base);
    animation: scroll-bounce 2s infinite;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator span {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 999px;
    position: relative;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.scroll-wheel {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background: var(--accent-highlight);
    border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
}

/* -------------------------------------------------------------------------- */
/*                        Portfolio Redesign (Editorial)                      */
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/*                           Editorial Stack (Redesign)                       */
/* -------------------------------------------------------------------------- */

.editorial-stack {
    display: flex;
    flex-direction: column;
    gap: 8rem;
    /* Increased gap for breathing room */
    padding: 2rem 0;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.project-split {
    display: flex;
    align-items: center;
    /* Vertically center */
    justify-content: space-between;
    gap: 6rem;
    position: relative;
    width: 100%;
    min-height: 60vh;
    /* Ensure each project takes up significant screen real estate */
}

/* Base Split Logic: 50/50 starting point */
.project-content {
    flex: 1;
    z-index: 2;
    /* Text above visuals if they overlap */
    min-width: 300px;
    /* Prevent text from being squashed */
}

.project-visual {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Alternating Layout */
.project-split:nth-child(even) {
    flex-direction: row-reverse;
}

/* Content Side */
.project-content {
    flex: 1;
    max-width: 500px;
    z-index: 2;
}

.project-role {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--accent-highlight);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 600;
}

.project-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
    line-height: 1.5;
}

/* Impact Badges Row */
.impact-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.impact-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    border-radius: 4px;
    cursor: default;
    pointer-events: none;
}

.impact-badge i {
    color: var(--accent-highlight);
    font-size: 0.9rem;
    opacity: 0.8;
}

.impact-badge span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* Visual Side */
.project-visual {
    flex: 1.2;
    /* Takes slightly more space than text */
    position: relative;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.floating-mockup {
    width: 100%;
    max-width: 650px;
    border-radius: 12px;
    /* Create a deep, premium shadow */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transition: transform 0.5s ease;
    animation: float-y 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
    background: #1a1a1a;
    /* Placeholder for image loading */
    overflow: hidden;
}

.floating-mockup img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.7s ease;
}

.project-visual:hover .floating-mockup {
    transform: scale(1.02);
}

.project-visual:hover .floating-mockup img {
    transform: scale(1.05);
}

/* Glow Effect behind mockup */
.project-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    /* Use local variable if set, otherwise fallback to primary accent */
    background: var(--project-glow, var(--accent-primary));
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
    border-radius: 50%;
    transition: opacity 0.5s ease;
}

.project-split:hover .project-visual::before {
    opacity: 0.25;
}

/* Mobile Responsiveness */
@media (max-width: 968px) {
    .project-split {
        flex-direction: column-reverse;
        padding: 4rem 0;
        gap: 3rem;
        text-align: center;
    }

    .project-split:nth-child(even) {
        flex-direction: column-reverse;
    }

    .project-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .project-title {
        font-size: 2.2rem;
    }

    .impact-row {
        justify-content: center;
    }

    .floating-mockup {
        max-width: 100%;
    }
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* -------------------------------------------------------------------------- */
/*                        Asymmetrical Layout Modifiers                       */
/* -------------------------------------------------------------------------- */

/* 1. Cinematic (Wide Dashboard) 
   Image dominates (65%), Text is compact.
*/
.layout-cinematic .project-visual {
    flex: 1.8;
}

.layout-cinematic .project-content {
    flex: 1;
}

.layout-cinematic .floating-mockup {
    max-width: 800px;
    height: 400px;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.layout-cinematic .floating-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. Portrait (Mobile App)
   Text dominates (60%) with Huge Typography. Image is tall/thin (35%).
*/
.layout-portrait .project-visual {
    flex: 0.8;
    /* Takes less horizontal space */
}

.layout-portrait .project-content {
    flex: 1.2;
}

.layout-portrait .project-title {
    font-size: 4.5rem;
    /* Massive headline */
    letter-spacing: -0.03em;
}

.layout-portrait .floating-mockup {
    max-width: 380px;
    height: 520px;
    aspect-ratio: 9/19;
    border-radius: 40px;
    overflow: hidden;
}

.layout-portrait .floating-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3. Macro (Detail/System)
   Balanced 50/50 but with a Square focus.
*/
.layout-macro .project-visual {
    flex: 1;
}

.layout-macro .project-content {
    flex: 1;
}

.layout-macro .floating-mockup {
    max-width: 500px;
    height: 420px;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.layout-macro .floating-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Overrides: Reset everything to stacked */
@media (max-width: 968px) {

    .layout-cinematic .project-visual,
    .layout-portrait .project-visual,
    .layout-macro .project-visual {
        flex: auto;
        width: 100%;
    }

    .layout-portrait .project-title {
        font-size: 2.5rem;
        /* Reset giant text */
    }

    .layout-cinematic .floating-mockup,
    .layout-portrait .floating-mockup,
    .layout-macro .floating-mockup {
        max-width: 100%;
        aspect-ratio: auto;
    }
}