:root {
    --bg-color: #0b0716;
    --text-primary: #e6edf3;
    --text-secondary: #a39cbc;
    --accent: #8b5cf6; 
    --accent-hover: #7c3aed;
    --glass-bg: rgba(18, 11, 34, 0.75);
    --glass-border: rgba(139, 92, 246, 0.2);
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
}

body {
    line-height: 1.6;
    overflow-x: hidden;
}

h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -1px; }
h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 2rem; color: #fff; }
h3 { font-size: 1.5rem; font-weight: 400; color: var(--text-secondary); margin-bottom: 1.5rem; }
.highlight { color: var(--accent); }

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}
.nav-brand { display: flex; align-items: center; }

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    vertical-align: middle;
}
.nav-logo { height: 40px; width: auto; object-fit: contain; cursor: pointer; }
.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    transition: var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.lang-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    margin-left: 2rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-main);
    transition: var(--transition);
}
.lang-btn:hover { background: var(--accent); color: #fff; }

.section {
    padding: 6rem 5% 3rem;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Dual Hover Hero Images Overlay Mechanics */
.hero-hover-container {
    position: absolute;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    z-index: 0;
    background: var(--bg-color); /* solid backdrop so darkened images blend smoothly */
}

.hero-hover-img {
    position: absolute;
    top: 0; height: 100%;
    background-size: cover;
    background-position: center;
    transition: filter 0.8s ease-in-out;
    filter: blur(8px) brightness(0.25); /* Replaces overlay darkness, inherently dark */
}

/* Image 1 overlaps Image 2 by sitting on top with 60% width */
.hero-hover-img.img-left {
    left: 0; width: 60%;
    z-index: 2;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

.hero-hover-img.img-right {
    right: 0; width: 60%;
    z-index: 1; /* Always physically behind image 1 */
}

/* Smooth blur turn-off with distinct brightness values */
.hero-hover-img.img-left:hover {
    filter: blur(0px) brightness(0.7); /* Mid-level brightness for hover1 */
}

.hero-hover-img.img-right:hover {
    filter: blur(2px) brightness(0.15); /* Soft, very dark for hover2, without z-index jumps */
}

/* Hero Content */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 90vh;
    overflow: hidden;
}

/* Hero grid layout to accommodate text on left, and optional profile pic on right */
.hero-inner-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 3rem;
    align-items: center;
    z-index: 4;
    pointer-events: none; /* Let hover pass through background */
}
.hero-content {
    pointer-events: auto;
}
.hero-aside-profile {
    display: flex;
    justify-content: flex-end;
    pointer-events: auto;
}
.hero-profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.39); pointer-events: auto;}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--glass-border); margin-left: 1rem; pointer-events: auto;}
.btn-secondary:hover { background: rgba(255,255,255,0.05); border-color: var(--accent); }

/* Project Tabs Filters */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.filter-btn {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 600;
    transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}
.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.4);
}
.project-img-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #111;
}
.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Perfect for both UI and square logos */
    transition: transform 0.5s ease;
}
.project-card:hover .project-img-wrapper img {
    transform: scale(1.05);
}
.project-info {
    padding: 1.2rem;
    flex-grow: 1;
}
.project-tag { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 0.4rem; display: block; }
.project-title { font-size: 1.2rem; margin-bottom: 0.5rem; color: #fff; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 2rem 0; 
}
.modal-overlay.hidden { opacity: 0; pointer-events: none; }
.modal-content {
    background: #0f0a1c;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    max-width: 900px;
    width: 95%;
    height: 95vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}
.modal-overlay.hidden .modal-content { transform: translateY(20px); }
.close-modal {
    position: absolute;
    top: 1rem; right: 1.5rem;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10;
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
}
.close-modal:hover { color: var(--accent); background: rgba(0,0,0,0.8); }
.modal-overview {
    padding: 2.5rem;
    padding-right: 5rem; /* space for close btn */
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.8;
}
.modal-overview p { color: var(--text-secondary); }
.modal-figma-img { width: 100%; height: auto; display: block; }

/* Custom HTML Content inside Modal */
.modal-html-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}
.modal-html-content.hidden {
    display: none;
}
.modal-html-content img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}
.serez-section {
    padding: 4rem 2rem;
    text-align: center;
    background: #0f0a1c;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.serez-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 800;
}
.serez-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* About Section */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.about-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 16px;
}
.about-timeline { margin-top: 2rem; }

/* Timeline Scroll Effect */
.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
    border-left: 4px solid rgba(234, 88, 12, 0.2); 
    transition: all 0.5s ease;
    opacity: 0.4;
    transform: translateX(-15px);
}

/* Graphic solid circle node at the start of the bar */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px; /* Centered perfectly over the 4px border (border center is -2, circle radius is 5) */
    top: 0px; /* Sits exactly at the top edge of the line */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(234, 88, 12, 0.4); /* Filled solid all the time, soft when inactive */
    border: none;
    transition: all 0.5s ease;
}

.timeline-item.active {
    opacity: 1;
    border-left-color: #ea580c;
    transform: translateX(0);
}

.timeline-item.active::before {
    background: #f97316; /* Bright solid fill when active */
    box-shadow: 0 0 10px #ea580c;
    transform: scale(1.3);
}

.timeline-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.5s ease, font-size 0.5s ease;
}
.timeline-item.active .timeline-date {
    color: #ea580c; 
    font-size: 1.2rem;
}

.timeline-year {
    position: absolute;
    top: -25px;
    left: -22px; /* Center perfectly over the node */
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-secondary);
    transition: all 0.5s ease;
}
.timeline-item.active .timeline-year {
    color: #ea580c;
    transform: scale(1.15);
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .bento-grid {
        grid-template-columns: 1.2fr 1.5fr 1fr;
        grid-template-rows: auto auto;
    }
    .bento-tall {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }
    .bento-wide {
        grid-column: 2 / 4;
        grid-row: 1 / 2;
    }
    .bento-grid > div:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }
    .bento-grid > div:nth-child(4) {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
    }
}

.bento-wrapper {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bento-item {
    background: #0b0716;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 2.5rem;
    border-left: 2px solid var(--accent); /* Much thinner left bar */
    position: relative;
    overflow: hidden;
    height: 100%; /* Important to fill grid area evenly */
}

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

/* Floating Space Animation */
@keyframes floatInSpace {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-12px); }
}

.float-delay-1 { animation: floatInSpace 6s ease-in-out infinite alternate; }
.float-delay-2 { animation: floatInSpace 7s ease-in-out 1s infinite alternate; }
.float-delay-3 { animation: floatInSpace 5.5s ease-in-out 0.5s infinite alternate; }
.float-delay-4 { animation: floatInSpace 6.5s ease-in-out 1.5s infinite alternate; }

.bento-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    color: var(--accent);
}

.bento-header i {
    width: 20px; height: 20px;
}

.bento-header h5 {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
}

.bento-content.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}

/* Inside the cards */
.card-skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    gap: 1rem;
    cursor: default;
    transition: all 0.3s ease;
}

.skill-name {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 130px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.skill-name i {
    width: 20px; height: 20px;
    transition: all 0.3s ease;
}

.skill-logo {
    width: 20px; height: 20px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.card-skill-item:hover .skill-logo, .card-skill-item:hover svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.4));
}

.proficiency-badge {
    font-size: 0.70rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.proficiency-badge.expert { background: #ea580c; color: #ffffff; border: 1px solid #ea580c; box-shadow: 0 0 10px rgba(234, 88, 12, 0.4); }
.proficiency-badge.advanced { background: transparent; color: #ea580c; border: 1px solid rgba(234, 88, 12, 0.5); }
.proficiency-badge.native { background: transparent; color: #ec4899; border: 1px solid rgba(236, 72, 153, 0.5); }
.proficiency-badge.fluent { background: transparent; color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.5); }
.proficiency-badge.strategy { background: transparent; color: #10b981; border: 1px solid rgba(16, 185, 129, 0.5); }
.proficiency-badge.visionary { background: transparent; color: #a259ff; border: 1px solid rgba(162, 89, 255, 0.5); }

/* Filter for dark plain logos */
.bright-logo {
    filter: brightness(2) contrast(1.5);
}
/* Titles Centered */
.text-center { text-align: center; }
.my-passions h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
    letter-spacing: 1px;
}

/* Contact Info Layout */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}
.profile-img-container {
    width: 225px; /* 50% larger than previous 150px! */
    height: 225px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
    transition: transform 0.3s ease;
}
.profile-img-container:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
}
.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.contact-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: center;
    background: var(--glass-bg);
    padding: 3rem;
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}
.map-container {
    width: 100%;
    max-width: 800px;
    height: 300px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-container iframe { 
    width: 100%; 
    height: 100%; 
    border: none;
    display: block;
}

footer { text-align: center; padding: 2rem; border-top: 1px solid var(--glass-border); color: var(--text-secondary); }

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .contact-details { grid-template-columns: 1fr; }
    .hero-inner-wrapper { 
        grid-template-columns: 1fr; 
        text-align: center;
    }
    .hero-aside-profile {
        justify-content: center;
        order: -1; /* Puts image above text on mobile */
    }
}
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .menu-toggle { display: block; }
    .nav-links { 
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(11, 7, 22, 0.95);
        backdrop-filter: blur(10px);
        padding: 2rem 0;
        gap: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
    }
    .nav-links.nav-open { display: flex; }
    .hero-actions { display: flex; flex-direction: column; gap: 1rem; }
    .btn-secondary { margin-left: 0; }
    .hero-hover-img.img-left { width: 100%; clip-path: none; height: 50%; }
    .hero-hover-img.img-right { width: 100%; top: 50%; height: 50%; }
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.serez-iframe {
    width: 100%;
    border: none;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: block;
}
