/* General Styles */
:root {
    --primary-color: #2d2d2d; /* Dark gray for headers and text */
    --secondary-color: #f7f7f7; /* Light gray for backgrounds */
    --accent-color: #00c4b4; /* Teal-green for links and accents */
    --highlight-color: #ff4d4f; /* Red for CTAs and hover effects */
    --text-color: #4a4a4a; /* Medium gray for body text */
    --white: #ffffff; /* White for cards and headers */
    --glass-background: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3 {
    color: var(--primary-color);
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

section {
    padding: 5rem 1rem;
    text-align: center;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--highlight-color);
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.hamburger ion-icon {
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
}

.nav-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 80%;
    max-width: 300px;
    background: var(--white);
    padding-top: 5rem;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    padding-right: 0;
    margin-right: 0;
}

.nav-menu.open {
    transform: translateX(0);
    display: block;
}

.nav-menu ul {
    list-style: none;
    padding: 0;
}

.nav-menu ul li {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.nav-menu ul li a {
    font-size: 1.2rem;
    color: var(--primary-color);
    display: block;
    transition: color 0.3s;
}

.nav-menu ul li a:hover {
    color: var(--accent-color);
}

.works-dropdown-toggle {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.works-dropdown-menu {
    display: none;
    background: var(--white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 200px;
    z-index: 10;
    padding: 0.5rem 0;
}

.works-dropdown-menu.show {
    display: block;
}

.works-dropdown-menu li {
    padding: 0;
    border-bottom: none;
}

.works-dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    color: var(--primary-color);
    transition: background 0.3s, color 0.3s;
}

.works-dropdown-menu li a:hover {
    background: var(--secondary-color);
    color: var(--highlight-color);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-color);
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid var(--white);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-section h2 {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 2rem;
}

/* About Section */
.about-section {
    background: var(--white);
    padding: 5rem 0;
}

.about-carousel-container {
    overflow: hidden;
    position: relative;
    width: 90%;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.about-carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.about-page {
    min-width: 100%;
    padding: 1rem;
    text-align: center;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dot {
    height: 12px;
    width: 12px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--accent-color);
}

.cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--highlight-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.3s;
}

.cta-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Skills Section */
.skills-section {
    background: var(--secondary-color);
}

.skills-tagline {
    font-size: 1rem;
    color: var(--text-color);
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-style: italic;
    opacity: 0.8;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 120px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.skill-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.skill-card.flipped .skill-card-inner {
    transform: rotateY(180deg);
}

.skill-card-front,
.skill-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    border-radius: 12px;
}

.skill-card-front {
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
}

.skill-card-back {
    background-color: var(--primary-color);
    color: var(--white);
    transform: rotateY(180deg);
    font-size: 1.2rem;
}

/* Tools Section */
.tools-section {
    background: var(--white);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.tool-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tool-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

/* Works Section */
.works-section {
    background: var(--secondary-color);
    padding: 5rem 1rem;
}

.works-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.works-tab {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.works-tab.active,
.works-tab:hover {
    background: var(--accent-color);
    color: var(--white);
}

.works-gallery-container {
    max-width: 800px;
    margin: 0 auto;
    height: 350px; /* Fixed height to prevent layout shift */
    overflow: hidden;
    position: relative;
}

.works-gallery-grid {
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-item {
    flex: 0 0 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: center;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.gallery-item.active {
    opacity: 1;
    transform: translateX(0);
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    display: none;
}

.hidden {
    display: none;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox-modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    overflow: auto;
}

.modal-content img {
    width: auto;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-caption {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--highlight-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s;
}

.close-modal:hover {
    background: var(--accent-color);
}

/* Gallery Navigation Arrows */
.gallery-prev, .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.gallery-prev:hover, .gallery-next:hover {
    background: var(--accent-color);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

@media (max-width: 767px) {
    .gallery-prev, .gallery-next {
        display: none; /* Hide arrows on mobile if swipe is preferred */
    }
}

/* Why Hire Me Section */
.hire-me-section {
    background: var(--white);
}

.hire-me-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    text-align: center;
}

/* Testimonials Section */
.testimonials-section {
    background: var(--secondary-color);
}

.testimonials-carousel-container {
    overflow: hidden;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonials-carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.testimonial-card {
    min-width: 100%;
    padding: 2rem;
    margin: 0 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;
    box-sizing: border-box;
}

.glassmorphism-card {
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.client-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.client-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
}

.client-name {
    font-weight: bold;
    color: var(--primary-color);
}

.testimonial-text {
    font-style: italic;
}

.video-card {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary-color);
    position: relative;
}

.video-thumbnail-link {
    display: block;
    position: relative;
    width: 100%;
    max-width: 300px;
}

.video-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--white);
    cursor: pointer;
    transition: transform 0.3s;
}

.play-icon:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Free Resources Section */
.resources-section {
    background: var(--secondary-color);
}

.resources-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.resource-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.resource-item h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.resource-item p {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.read-more-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--highlight-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.3s;
}

.read-more-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Resource Landing Page */
.resource-landing {
    padding: 5rem 1rem;
    background: var(--secondary-color);
}

.resource-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resource-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.resource-featured-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    margin: 1rem auto;
    display: block;
}

.resource-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.resource-body p {
    margin-bottom: 1rem;
}

.back-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--highlight-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.3s;
}

.back-button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Contact Section */
.fs-form {
    display: grid;
    row-gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.fs-field {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
}

.fs-label {
    color: var(--primary-color);
    font-family: var(--font-family-display);
    font-size: 1rem;
    line-height: 1.25rem;
}

.fs-description {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.25rem;
}

.fs-button-group {
    display: flex;
    flex-direction: row-reverse;
    column-gap: 1.5rem;
}

.fs-button {
    background-color: var(--highlight-color);
    border-radius: 9999px;
    color: var(--white);
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.5rem;
    padding: 0.75rem 2rem;
    transition: background 0.3s;
}

.fs-button:hover {
    background-color: var(--accent-color);
}

.fs-input,
.fs-textarea {
    border-radius: 8px;
    box-shadow: 0 0 0 1px var(--primary-color);
    padding: 0.75rem;
    font-size: 1rem;
}

.fs-textarea {
    resize: vertical;
    min-height: 100px;
}

.fs-input:focus,
.fs-textarea:focus {
    box-shadow: 0 0 0 2px var(--accent-color);
    outline: none;
}

.form-message {
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
}

.form-message.success {
    color: green;
}

.form-message.error {
    color: red;
}

/* Footer */
footer {
    background: #00c4b4;
    color: var(--white);
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.social-icons ion-icon {
    color: var(--white);
    transition: color 0.3s;
}

.social-icons ion-icon:hover {
    color: var(--accent-color);
}

/* Tablet & Desktop Styles */
@media (min-width: 768px) {
    header {
        padding: 1.5rem 2rem;
    }

    .hamburger {
        display: none;
    }

    .nav-menu {
        position: static;
        display: block;
        height: auto;
        width: auto;
        box-shadow: none;
        transform: translateX(0);
        background: transparent;
        padding-top: 0;
        padding-right: 3rem;
        margin-right: 12rem;
    }

    .nav-menu ul {
        display: flex;
        gap: 1.5rem;
        align-items: center;
    }

    .nav-menu ul li {
        border-bottom: none;
        padding: 0;
    }

    .nav-menu ul li a {
        font-size: 1rem;
    }

    .works-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        padding: 0.5rem 0;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .works-dropdown-menu.show {
        opacity: 1;
        visibility: visible;
    }

    .works-dropdown-menu li a {
        padding: 0.75rem 1.5rem;
    }

    .skills-grid {
        max-width: 900px;
    }

    .tools-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .resources-grid {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
    }

    .resource-item {
        flex: 1 1 45%;
        max-width: 400px;
    }
}
