/* Global styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'TT Commons Demibold', sans-serif;
    color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure the body takes at least the full viewport height */
}

body, input, textarea, select, button {
    font-family: 'TT Commons', sans-serif;
}

h1, h2, h3, h4, h5, h6, .contact-button, .submit-button {
    font-family: 'TT Commons Demibold', sans-serif;
}

/* Video background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-background video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Color overlay */
.color-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(88, 80, 236, 0.9);
    z-index: -1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}

.logo img {
    width: 300px; /* Default size for desktop */
    /* height: auto; */
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-button {
    border: none;
    border-radius: var(--Corner-Radius-x-small, 8px);
    background: transparent;
    color: #FFF;
    display: inline-flex;
    padding: 10px 12px; /* Slightly decreased padding */
    align-items: center;
    font-family: 'TT Commons Demibold', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: var(--Corner-Radius-x-small, 8px);
    transition: all 0.3s ease;
}

.contact-button:hover::before {
    border-color: #FFF;
    animation: drawBorder 0.5s linear forwards;
}

@keyframes drawBorder {
    0% {
        border-top-color: #FFF;
        border-right-color: transparent;
        border-bottom-color: transparent;
        border-left-color: transparent;
    }
    25% {
        border-top-color: #FFF;
        border-right-color: #FFF;
        border-bottom-color: transparent;
        border-left-color: transparent;
    }
    50% {
        border-top-color: #FFF;
        border-right-color: #FFF;
        border-bottom-color: #FFF;
        border-left-color: transparent;
    }
    75% {
        border-top-color: #FFF;
        border-right-color: #FFF;
        border-bottom-color: #FFF;
        border-left-color: #FFF;
    }
    100% {
        border-color: #FFF;
    }
}

.contact-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.meeting-button {
    border: none;
    border-radius: var(--Corner-Radius-x-small, 8px);
    background: #FFF;
    color: #4B5563;
    box-shadow: 0px 4px 4px 0px rgba(55, 65, 81, 0.30), 0px -4px 8px 0px rgba(88, 80, 236, 0.35) inset;
    display: inline-flex;
    padding: 15px 17px;
    align-items: center;
    font-family: 'TT Commons Demibold', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.meeting-button:hover {
    transform: scale(1.05);
}

/* Main content */
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1; /* Allow main to grow and take available space */
    padding: 2rem 0; /* Add some vertical padding */
}

.orb {
    width: 40vmin;
    height: 40vmin;
    max-width: 400px;
    max-height: 400px;
    min-width: 200px;
    min-height: 200px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.orb:hover {
    transform: scale(1.05);
}

.typewriter-container {
    position: fixed; /* Change from absolute to fixed */
    bottom: 20%; /* Position from bottom instead of top */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 20px;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100; /* Ensure it's above other elements */
    text-align: center;
    width: 100%;
}

.typewriter-text {
    font-family: 'JetBrains Mono', monospace;
    display: inline;
    font-weight: 700;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #ffffff;
    margin-left: 2px;
    animation: blink 0.7s infinite;
    animation-play-state: paused;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Footer */
footer {
    padding: 2rem;
}

.portfolio-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.portfolio-links a {
    font-family: 'TT Commons Medium', sans-serif;
    color: #ffffff;
    text-decoration: none;
    margin: 0 2rem; /* Increased horizontal margin */
    position: relative;
    font-size: 3rem; /* Approximately 48px */
    transition: font-size 0.3s ease;
    /* text-transform: lowercase; Make text lowercase */
    padding-bottom: 0.5rem; /* Add space below the text */
}

.portfolio-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px; /* Increased thickness of the underline */
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.portfolio-links a:hover::after {
    width: 100%;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

/* Media query for small screens */
@media screen and (max-width: 768px) {

    .mobile-only {
        display: flex;
    }

    .desktop-only {
        display: none;
    }

    body {
        overflow-y: auto; /* Allow vertical scrolling on mobile if needed */
    }

    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem;
    }


    .logo img {
        width: 90vw; /* Make logo responsive to screen width */
        /* max-width: 300px; Set a maximum width */
        height: auto;
    }

    .header-buttons {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .contact-button, .meeting-button {
        width: 100%;
        max-width: 70vw;
        /* display: flex;
        flex-grow: 1;
        flex-direction: row;
        justify-content: center; */
        padding: 12px 15px;
        font-size: 1.25rem;
    }

    .contact-button {
        background: rgba(255, 255, 255, 0.1); /* Light background to make buttons visible */
        border: 1px solid rgba(255, 255, 255, 0.3); /* Add a subtle border */
    }

    .contact-button .icon,
    .meeting-button .icon {
        position: static;
        transform: none;
        opacity: 1;
        margin-right: 0.5rem;
        font-size: 1.2rem;
    }

    .contact-button .text,
    .meeting-button .text {
        opacity: 1;
        display: inline; /* Ensure text is visible */
    }

    .contact-button:hover .icon,
    .meeting-button:hover .icon,
    .contact-button:hover .text,
    .meeting-button:hover .text {
        transform: none;
        opacity: 1;
    }

    .contact-button:nth-child(2) {
        margin-right: 0;
    }

    /* Remove hover effects for mobile */
    .contact-button:hover::before,
    .contact-button:hover,
    .meeting-button:hover {
        transform: none;
        background: inherit;
        border-color: inherit;
        animation: none;
    }

    /* Move portfolio links under the logo */
    .portfolio-links {
        position: static;
        margin-top: 0.5rem;
        font-size: 0.9rem;
    }

    .portfolio-links a {
        display: inline;
        margin: 0 0.5rem;
    }
/* 
    .portfolio-links a::after {
        content: '•';
        margin-left: 0.5rem;
    } */

    .portfolio-links a:last-child::after {
        content: '';
    }

    /* Center align main content */
    main {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem 0;
    }

    footer {
        padding: 2rem;
    }

    .portfolio-links {
        flex-direction: row;
        justify-content: center;
    }

    .portfolio-links a {
        margin: 5px 15px;
        font-size: 1rem; /* Slightly smaller font size for mobile */
        padding-bottom: 0.3rem; /* Adjusted space below text for mobile */
    }

    .portfolio-links a::after {
        height: 3px; /* Slightly thinner underline for mobile */
    }

    /* Center align typewriter container */
    .typewriter-container {
        display: none;
    }

    /* footer {
        bottom: 20px; 
    } */

    main {
        /* height: calc(100vh - 220px);  */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .logo img {
        width: 100%; /* Increased from 150px to 165px (10% increase) */
    }

    .header-buttons {
        flex-direction: column;
        gap: 0.25rem; /* Further decrease gap for mobile */
    }
}

/* Media query for very small screens */
@media screen and (max-width: 480px) {
    .portfolio-links a {
        font-size: 1.5rem; /* Even smaller font size for very small screens */
        padding-bottom: 0.2rem; /* Further adjusted space below text for very small screens */
    }

    .portfolio-links a::after {
        height: 2px; /* Even thinner underline for very small screens */
    }
}

/* Section pages styles */
.section-pages {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Changed to transparent */
    transition: bottom 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 10;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 20px 20px 0; /* Add padding to create margin effect */
}

.section-page {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    color: #4B5563; /* Dark text color for contrast */
    padding: 3rem 3rem 5rem; /* Reduced top padding */
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    border-radius: 0; /* Remove border radius */
    height: calc(100% - 30px); /* Adjust height to account for top margin */
    overflow-y: auto;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15); /* Add subtle shadow */
    transform: translateY(30px);
}

.section-page.active {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(88, 80, 236, 0.1);
    flex-wrap: wrap; /* Add this line to allow wrapping on smaller screens */
}

.section-header h2 {
    margin-right: 1rem; /* Add some right margin to the heading */
    margin-bottom: 1rem; /* Add some bottom margin for when it wraps */
}

/* Adjust the close button for better mobile layout */
.close-section.contact-button {
    margin-left: auto; /* Push the button to the right */
}

/* Media query for small screens */
@media screen and (max-width: 768px) {
    .section-pages {
        padding: 10px 10px 0; /* Smaller padding for mobile */
    }

    .section-page {
        padding: 3rem 1.5rem;
        height: calc(100% - 10px); /* Adjust height for smaller top margin */
    }

    .close-section {
        top: 20px;
        right: 20px;
    }

    .section-content {
        width: 95%; /* Make it even wider on small screens */
        padding: 15px; /* Reduce padding on small screens */
    }

    .section-header {
        flex-direction: column; /* Stack the heading and button vertically on small screens */
        align-items: flex-start; /* Align items to the start on small screens */
    }

    .close-section.contact-button {
        margin-left: 0; /* Reset the left margin on small screens */
        margin-top: 1rem; /* Add some top margin on small screens */
    }
}

.section-page h2 {
    font-size: 3rem;
    margin: 0;
    color: #5850EC;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-page p {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    color: #4B5563;
}

.section-page p:first-of-type {
    font-size: 1.4rem;
    font-weight: 500;
    color: #5850EC;
    margin-bottom: 2rem;
}

.work-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.close-section {
    background: #FFF;
    color: #4B5563; /* Changed to match the main index dark gray */
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-family: 'TT Commons Demibold', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0px 4px 4px 0px rgba(55, 65, 81, 0.30), 0px -4px 8px 0px rgba(55, 65, 81, 0.15) inset;
}

.close-section:hover {
    transform: scale(1.05);
    box-shadow: 0px 6px 8px 0px rgba(55, 65, 81, 0.40), 0px -4px 8px 0px rgba(55, 65, 81, 0.25) inset;
}

/* Adjust the orb transition to account for the new layout */
.orb.transitioning {
    position: fixed;
    top: calc(50% + 10px); /* Adjusted to account for top margin */
    left: 50%;
    transform: translate(-50%, -50%) scale(20);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.5s ease;
    z-index: 9;
}

/* Media query for small screens */
@media screen and (max-width: 768px) {
    .section-pages {
        padding: 10px 10px 0; /* Smaller padding for mobile */
    }

    .section-page {
        padding: 3rem 1.5rem;
        height: calc(100% - 10px); /* Adjust height for smaller top margin */
    }

    .close-section {
        top: 20px;
        right: 20px;
    }
}

.client-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.client-logo {
    width: 120px;
    height: 60px;
    margin: 1.5rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
    filter: grayscale(100%) opacity(0.7);
}

.client-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.logo-gm { background-image: url('path/to/gm-logo.png'); }
.logo-nike { background-image: url('path/to/nike-logo.png'); }
.logo-apple { background-image: url('path/to/apple-logo.png'); }
.logo-samsung { background-image: url('path/to/samsung-logo.png'); }
.logo-walmart { background-image: url('path/to/walmart-logo.png'); }
.logo-uber { background-image: url('path/to/uber-logo.png'); }
.logo-grindr { background-image: url('path/to/grindr-logo.png'); }
.logo-comcast { background-image: url('path/to/comcast-logo.png'); }

.orb-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 9;
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out, border-radius 0.5s ease-out;
}

.section-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.section-content {
    position: relative;
    max-width: 800px;
    width: 90%; /* Add this line to ensure it takes up most of the width on smaller screens */
    margin: 50px auto;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.section-page.active .section-content {
    opacity: 1;
    transform: translateY(0);
}

/* Contact form styles */
.contact-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    color: #4B5563;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: none;
    border-bottom: 2px solid rgba(88, 80, 236, 0.3);
    background-color: rgba(255, 255, 255, 0.5);
    color: #4B5563;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group label {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #5850EC;
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #5850EC;
    background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -10px; /* Reduced from -15px */
    font-size: 0.9rem; /* Slightly increased from 0.85rem */
    color: #5850EC;
    opacity: 1;
    font-weight: bold;
}

/* Remove the labelFloat animation */
@keyframes labelFloat {
    0% { transform: translateY(0); opacity: 0.7; }
    100% { transform: translateY(-25px); opacity: 1; }
}

.form-group input:focus + label,
.form-group textarea:focus + label {
    animation: none; /* Remove the animation */
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

/* Checkbox styles */
.checkbox-group {
    margin-bottom: 2rem;
}

.checkbox-group > label {
    display: block;
    margin-bottom: 1rem;
    color: #5850EC;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.checkbox-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.checkbox-container label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #4B5563;
    cursor: pointer;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container label:hover {
    background-color: rgba(88, 80, 236, 0.1);
}

.checkbox-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #5850EC;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked {
    background-color: #5850EC;
}

.checkbox-container input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

/* Media query for small screens */
@media screen and (max-width: 600px) {
    .checkbox-container {
        grid-template-columns: 1fr;
    }
}

.submit-button {
    border: none;
    border-radius: var(--Corner-Radius-x-small, 8px);
    background: #5850EC;
    color: #FFFFFF;
    box-shadow: 0px 4px 4px 0px rgba(55, 65, 81, 0.30), 0px -4px 8px 0px rgba(88, 80, 236, 0.35) inset;
    display: inline-flex;
    padding: 15px 17px;
    align-items: center;
    font-family: 'TT Commons Demibold', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.submit-button:hover {
    transform: scale(1.05);
    background-color: #4B45C6;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    animation: shake 0.3s;
    border-bottom-color: #ff6b6b;
}

.form-group input:valid:not(:placeholder-shown),
.form-group select:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-bottom-color: #51cf66;
}

.close-section.contact-button {
    background: #FFF;
    color: #4B5563;
    border: none;
    border-radius: var(--Corner-Radius-x-small, 8px);
    box-shadow: 0px 4px 4px 0px rgba(55, 65, 81, 0.30), 0px -4px 8px 0px rgba(88, 80, 236, 0.35) inset;
    display: inline-flex;
    padding: 12px 15px;
    align-items: center;
    font-family: 'TT Commons Demibold', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-section.contact-button:hover {
    transform: scale(1.05);
}

/* Media query for small screens */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .header-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-button, .meeting-button {
        width: 100%;
        justify-content: center;
    }
}

.contact-button,
.meeting-button {
    /* ... (other styles remain unchanged) ... */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.contact-button:nth-child(2) {
    margin-right: 0.75rem; /* Add space to the right of the email button */
}

.contact-button .icon,
.meeting-button .icon {
    position: absolute;
    top: 45%; /* Changed from 50% to 45% to move it up slightly */
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.contact-button:hover .icon,
.meeting-button:hover .icon {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.contact-button:hover .text,
.meeting-button:hover .text {
    opacity: 0;
}

.contact-button .text,
.meeting-button .text {
    transition: opacity 0.3s ease;
}

/* Update icon colors for better visibility */
.contact-button .icon {
    --fa-primary-color: #ffffff;
    --fa-secondary-color: #d1d5db; /* Light gray for secondary color */
}

.meeting-button .icon {
    --fa-primary-color: #788191;
    --fa-secondary-color: #afb3bb; /* Keeping the original colors for the calendar icon */
}

.contact-button:hover .icon {
    color: #ffffff; /* This ensures the icon is white on hover for contact buttons */
}

.meeting-button:hover .icon {
    color: inherit; /* This keeps the original color on hover for the meeting button */
}

/* Media query for small screens */
@media screen and (max-width: 768px) {
    /* ... (other styles remain unchanged) ... */

    .contact-button:nth-child(2) {
        margin-right: 0; /* Remove extra space on mobile */
    }
}

/* Update the logo styles */
.logo h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2.5rem; /* Adjust this value as needed */
    color: #FFFFFF; /* Changed to white */
    margin: 0;
}