:root {
    --color-bg: #FFFFFF;
    --color-bg-light: #F8F9FA;
    --color-text: #2D3142;
    --color-text-light: #6C757D;
    --color-primary: #1A1A1D;
    --color-accent: #5b5959;
    --color-border: #E5E7EB;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

/* Layout utilities */
.container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.section-heading {
    margin-bottom: 4rem;
}

.section-heading h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.underline {
    width: 60px;
    height: 4px;
    background-color: gray;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #3f3f45;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-border);
    color: var(--color-text);
    margin-left: 1rem;
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 0);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links li a {
    font-weight: 500;
    color: var(--color-text-light);
    font-size: 0.95rem;
    position: relative;
}

.nav-links li a:not(.nav-btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

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

.nav-links li a:hover {
    color: var(--color-primary);
}

.nav-btn {
    background-color: var(--color-primary);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
}

.nav-btn:hover {
    background-color: #3f3f45;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-primary);
}

/* Sidenav */
.sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1001;
    top: 0;
    right: 0;
    background-color: var(--color-primary);
    overflow-x: hidden;
    transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding-top: 60px;
}

.sidenav.open {
    width: 100%;
    max-width: 400px;
}

.sidenav a {
    padding: 1rem 2rem;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
}

.sidenav a:hover {
    color: white;
}

.sidenav .closebtn {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 2.5rem;
    padding: 0;
}

/* Hero Section */
.hero {
    padding-top: 7rem;
    padding-bottom: 2rem;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    font-family: var(--font-body);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    max-width: 90%;
    font-style: italic;
    border-left: 3px solid var(--color-border);
    padding-left: 1.5rem;
}

.hero-buttons {
    display: flex;
    align-items: center;
}

.image-wrapper {
    position: relative;
    border-radius: 30px;
    max-width: 400px;
    margin: 0 auto;
}

.image-bg-shape {
    position: absolute;
    top: -20px;
    right: -20px;
    bottom: -20px;
    left: 20px;
    background-color: #f7f5f5;
    border-radius: 30px;
    z-index: -1;
}

.image-wrapper img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-height: 70vh;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/5;
}

/* About */
.about-content {
    max-width: 800px;
}

.lead-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-text-light);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skill-group h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    background-color: var(--color-bg-light);
    color: var(--color-text);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

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

.card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-border);
}

.project-image-placeholder {
    width: 100%;
    height: 220px;
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    padding: 10px;
}

.project-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.project-image-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-bg-light);
    color: var(--color-accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover .card-icon {
    background-color: var(--color-accent);
    color: white;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Contact */
.contact.section {
    padding-top: 2rem;
    padding-bottom: 7rem;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background-color: var(--color-primary);
    color: white;
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.contact-card h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.contact-card p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-inline: auto;
}

.contact-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 3rem;
    max-width: fit-content;
    margin: 0 auto 2rem auto;
    text-align: left;
}

@media (max-width: 600px) {
    .contact-details {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-item:hover {
    color: #bdb1b1;
}

/* Contact Form Modal Overlay */
.contact-form-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-form-wrapper.modal-active {
    display: flex;
    animation: fadeInModal 0.3s forwards;
}

.modal-content-box {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 650px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.contact-form-wrapper.modal-active .modal-content-box {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    line-height: 1;
}

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

@keyframes fadeInModal {
    to {
        opacity: 1;
    }
}

.form-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: #10B981;
    /* Green success */
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2000;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

.h-100 {
    height: 100%;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.input-group input,
.input-group textarea {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    background: white;
}

.input-group textarea {
    resize: none;
    flex-grow: 1;
    min-height: 120px;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--color-text);
}

.form-footer {
    display: flex;
    justify-content: flex-end;
}

.submit-btn {
    background-color: var(--color-primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: #3f3f46;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.social-icon:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    position: relative;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer .footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.scroll-top {
    position: absolute;
    top: -75px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 75px;
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: 150px 150px 0 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 12px;
    color: var(--color-text-light);
    font-size: 2.2rem;
    cursor: pointer;
    transition: var(--transition);
}


.scroll-top i {
    transition: var(--transition);
}

.scroll-top:hover i {
    transform: translateY(-4px);
}

/* Responsive */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero {
        height: auto;
        padding-bottom: 5rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-desc {
        max-width: 100%;
        margin-inline: auto;
        border-left: none;
        border-top: 3px solid var(--color-border);
        padding-top: 1.5rem;
        padding-left: 0;
    }

    .hero-buttons {
        justify-content: center;
    }

    .image-bg-shape {
        top: -10px;
        right: -10px;
        left: 10px;
        bottom: -10px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }

    .hero {
        padding-top: 6.5rem;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .contact-card {
        padding: 2.5rem 1.2rem;
    }

    .contact-card h2 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-outline {
        margin-left: 0;
    }

    .scroll-top {
        width: 100px;
        height: 50px;
        top: -50px;
        border-radius: 100px 100px 0 0;
        font-size: 1.5rem;
        padding-bottom: 8px;
    }
}

/* Scroll Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-modal.active .image-modal-content {
    transform: scale(1);
}

.close-image-modal {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
    z-index: 2001;
}

.close-image-modal:hover,
.close-image-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.project-image-placeholder img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-image-placeholder img:hover {
    transform: scale(1.05);
}