/* =========================================
   1. DESIGN SYSTEM & VARS
   ========================================= */
:root {
    /* Colors */
    --bg-dark: #0a0a0a;
    --bg-card: #18181b;
    --primary: #ff6a00;
    --primary-hover: #ff8c00;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.4) 100%);
    --glass-bg: rgba(10, 10, 10, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Raleway', sans-serif;

    /* Spacing */
    --container-padding: 2rem;
    --section-spacing: 120px;

    /* Animation */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================
   2. RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

img {
    max-width: 100%;
    display: block;
}

section {
    min-height: 100vh;
    padding: var(--section-spacing) var(--container-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* =========================================
   3. NAVIGATION (Glassmorphism)
   ========================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    /* Adjusted for logo/menu */
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: var(--transition-fast);
}

.nav.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    padding: 1rem 2rem;
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav a {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    opacity: 0.8;
}

.nav a:hover,
.nav a.active {
    opacity: 1;
    color: var(--primary);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-fast);
}

.nav a:hover::after {
    width: 100%;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.home {
    background-image: url('https://i.pinimg.com/1200x/50/6d/80/506d800bb90cb4850e42844c7ad4781a.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    align-items: flex-start;
    /* Align text to left */
    justify-content: center;
}

/* Dark overlay for readability */
.home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-left: 4%;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s var(--transition-smooth) forwards;
}

.content h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.firstname {
    font-weight: 800;
    color: var(--text-main);
}

.lastname {
    font-weight: 300;
    color: var(--primary);
    /* Highlight last name */
}

.activity {
    display: block;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
}

/* Buttons */
.buttons {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--bg-dark);
}

/* Socials - redesigned */
.socials-side {
    position: fixed;
    left: 2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 100;
}

.socials-side a {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.socials-side a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Increased spacing around icons */
.socials-side a {
    margin: 10px 0;
}

.socials-side::after {
    content: '';
    width: 1px;
    height: 60px;
    background: var(--text-muted);
    margin: 1rem auto 0;
    display: block;
}

/* =========================================
   5. RESPONSIVE UTILITIES
   ========================================= */
@media (max-width: 768px) {
    .nav {
        padding: 1.5rem;
        justify-content: space-between;
    }

    .portfolio {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition-smooth);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .content {
        margin-left: 0;
        text-align: center;
        padding: 0 1rem;
    }

    .activity {
        border-left: none;
        border-bottom: 2px solid var(--primary);
        padding-left: 0;
        padding-bottom: 1rem;
        display: inline-block;
    }

    .buttons {
        justify-content: center;
    }

    .socials-side {
        display: none;
        /* Hide side socials on mobile */
    }
}

/* =========================================
   6. ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   7. ABOUT SECTION
   ========================================= */
.about {
    background-color: var(--bg-card);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    gap: 4rem;
    align-items: center;
    padding-left: 6%;
    padding-right: 6%;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.skill-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.skill-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-card h3 i {
    color: var(--primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: 0.2s;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

@media (max-width: 900px) {
    .about {
        grid-template-columns: 1fr;
        text-align: left;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* =========================================
   8. PORTFOLIO SECTION (Grid)
   ========================================= */
.portfolio {
    background-color: var(--bg-dark);
    padding-left: 6%;
    padding-right: 6%;
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.project-image {
    height: 250px;
    width: 100%;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.project-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    background: rgba(255, 106, 0, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Connect List inside card */
.project-details {
    list-style: none;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.project-details li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    padding-left: 1.2rem;
    position: relative;
}

.project-details li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
}


/* =========================================
   9. CONTACT & FOOTER
   ========================================= */
.rendezvous {
    background: var(--bg-card);
    align-items: center;
    position: relative;
}

/* Background Decoration */
.rendezvous::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    opacity: 0.05;
    filter: blur(100px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
}

.calendly-wrapper {
    width: 100%;
    max-width: 1000px;
    background: rgba(10, 10, 10, 0.5);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 2;
    min-height: 750px;
    /* Ensure height for widget */
    display: flex;
    flex-direction: column;
}

#calendly-inline-widget {
    width: 100%;
    height: 700px;
    flex-grow: 1;
}

footer {
    padding: 2rem;
    text-align: center;
    background: var(--bg-dark);
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

footer p span {
    color: var(--primary);
}

/* =========================================
   10. MODAL
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    overflow-y: hidden;
    /* Prevent body scroll inheritance */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-card);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.4s var(--transition-smooth);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary);
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
}

.modal-img {
    height: 100%;
    min-height: 300px;
}

.modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-text {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.modal-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-img {
        max-height: 250px;
    }

    .modal-text {
        padding: 1.5rem;
    }
}