/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f9f9f9;
    color: #333;
    min-width: 100%;
}

.site-wrapper {
    width: 100%;
    min-width: 100%;
    position: relative;
    padding-top: 0; /* No padding needed for sticky header */
}

/* Header styles */
#main-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #f9f9f9;
    z-index: 9999;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.logo {
    margin-right: auto;
    padding-left: 0;
    display: flex;
    align-items: center;
}

.small-logo {
    height: 40px;
    margin-right: 12px;
    vertical-align: middle;
}

.logo h1 {
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #000000;
}

nav {
    margin-left: auto;
    padding-right: 0;
    display: flex;
    justify-content: flex-end;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 60px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul li a:hover {
    color: #777;
}

.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Portfolio item styles - position relative needed for animations */
.portfolio-item {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Portfolio item hover effect */
.portfolio-item.hovered {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 1s linear;
    pointer-events: none;
    width: 100px;
    height: 100px;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Page transition */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    perspective: 1000px;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* duplicate .container rule removed (was max-width: 500px) */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Additional header styles - these apply to headers other than #main-header */
header:not(#main-header) {
    padding: 20px 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    z-index: 100;
}

.logo h1 {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    gap: 3rem;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

nav ul li a:hover {
    color: #666;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Removed login and cart styles */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Portfolio grid styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 220px);
    gap: 40px;
    width: 100%;
    margin: 40px auto 50px auto;
    padding: 0;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    overflow: visible;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    height: 220px;
    width: 220px;
    cursor: pointer; /* Use pointer cursor */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-style: preserve-3d;
    will-change: transform;
    /* Prevent browser overlays */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border-radius: 50%;
    box-shadow: none;
    margin: 0;
}

.portfolio-item:hover {
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.portfolio-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
    border-radius: 50%;
}

.portfolio-item:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

.portfolio-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 50%;
}

.image-item:hover .portfolio-image {
    filter: brightness(0.3);
    border-radius: 50%;
}

/* Portfolio item title */
.portfolio-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 5;
    width: 85%;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    padding: 10px;
}

.portfolio-item:hover .portfolio-content::before {
    opacity: 1;
    border-radius: 50%;
}

.portfolio-item:hover .portfolio-title {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Portfolio videos styles */
.portfolio-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.video-item:hover .portfolio-video {
    transform: scale(1.05);
}

/* Special handling for video with poster */
.static-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.hover-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.portfolio-item[data-media-type="video-with-poster"]:hover .static-poster {
    opacity: 0;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: none; /* Hide play button completely */
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.play-button-overlay span {
    color: white;
    font-size: 24px;
}

.portfolio-item[data-media-type="video-with-poster"]:hover .play-button-overlay {
    opacity: 1;
}

/* Modal styles for full video playback */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    padding: 10px;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.modal-close:hover {
    color: #f0f0f0;
    transform: scale(1.1);
}

.modal-video {
    width: 100%;
    max-height: 90vh;
    display: block;
    background-color: #000;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
}

.portfolio-item:hover .portfolio-content {
transform: scale(1);
}

/* Add smooth transitions for menu toggle */
.menu-toggle.active span:nth-child(1) {
transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Removed text content styles */

/* Portfolio content sections */
.portfolio-content-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px auto;
    padding: 0;
}

.portfolio-detail-section {
    display: none;
    padding: 40px 30px;
    margin: 40px auto;
    background-color: #f9f9f9;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    max-width: 1000px;
}

.close-section {
position: absolute;
top: 15px;
right: 15px;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #333;
color: white;
border: none;
font-size: 24px;
line-height: 1;
cursor: pointer;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.close-section:hover {
background-color: #555;
transform: scale(1.1);
}

.portfolio-detail-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.portfolio-detail-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.portfolio-detail-content {
    font-size: 1rem;
    line-height: 1.6;
}

/* Media grid for portfolio detail sections */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Media gallery styles */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Web App gallery specific styles */
.webapp-gallery .webapp-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.webapp-gallery .webapp-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.webapp-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.webapp-link:after {
    content: '\f08e'; /* External link icon */
    font-family: 'FontAwesome';
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.webapp-link:hover:after {
    opacity: 1;
}

.media-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.media-content {
    width: 100%;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: #f0f0f0;
}

.media-caption {
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
}

.video-item .media-content {
    object-fit: contain;
    background-color: #000;
    aspect-ratio: 16 / 9;
}

/* Responsive adjustments for media grid */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .media-caption {
        font-size: 0.7rem;
        padding: 5px;
    }
}

.placeholder-content {
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Contact section styles */
.contact-section#work {
    padding: 20px 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 80vh;
    overflow: visible;
}

.contact-section {
    padding: 2rem;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #fafafa;
}

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

.contact-section h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 1px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: transparent;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #333;
}

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

.submit-btn {
    align-self: flex-start;
    padding: 1rem 2rem;
    background-color: #333;
    color: white;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.form-status {
    margin-top: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-status.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.form-status.error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid #F44336;
}

/* Contact buttons styles */
.contact-buttons {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 200px;
}

.contact-btn i {
    margin-right: 10px;
    font-size: 20px;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.email-btn:hover {
    background-color: #2c3e50;
}

.linkedin-btn {
    background-color: #0077b5;
}

.linkedin-btn:hover {
    background-color: #0069a6;
}

/* Footer styles */
footer {
    background-color: #fff;
    padding: 2rem;
    text-align: center;
    margin-top: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive styles */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-item {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .nav-right {
        gap: 1rem;
    }
}

/* Lightbox Modal styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.lightbox-modal.active {
    opacity: 1;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2001;
}

.lightbox-media {
    display: none;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    z-index: 2001;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.lightbox-close {
    position: fixed;
    top: 100px; /* Moved down to avoid being covered by the navbar */
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2002;
    transition: color 0.3s ease;
    background-color: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.lightbox-close:hover {
    color: #bbb;
}

/* Responsive styles */
@media screen and (max-width: 1400px) {
    .container {
        width: 95%;
        max-width: 1200px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 200px);
        gap: 35px;
    }
    
    .portfolio-item {
        height: 200px;
        width: 200px;
    }
}

/* ===== Responsive layout ===== */

/* Tablet */
@media screen and (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, minmax(0, 180px));
        gap: 30px;
    }
    .portfolio-item {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    nav ul li { margin-left: 30px; }
}

/* Small tablets / large phones */
@media screen and (max-width: 768px) {
    .header-inner { padding: 0 16px; }
    #main-header { height: 64px; }
    .small-logo { height: 32px; margin-right: 8px; }
    .logo h1 { font-size: 14px; letter-spacing: 1px; }

    nav { display: flex; }
    nav ul { gap: 1rem; }
    nav ul li { margin-left: 0; }
    nav ul li a { font-size: 0.8rem; letter-spacing: 0.5px; }

    .container { width: 100%; padding: 0 16px; }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        margin: 24px auto 32px;
        max-width: 480px;
    }
    .portfolio-item {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
    .portfolio-title { font-size: 0.95rem; }

    .portfolio-detail-section {
        padding: 24px 16px;
        margin: 24px 0;
        border-radius: 10px;
    }
    .portfolio-detail-section h2 { font-size: 1.4rem; }

    .contact-section { padding: 1.5rem 1rem; }
    .contact-section h2 { font-size: 1.6rem; margin-bottom: 1.5rem; }
    .contact-buttons { gap: 12px; }
    .contact-btn {
        width: 100%;
        min-width: 0;
        padding: 14px 20px;
        font-size: 16px;
    }

    .lightbox-close { top: 16px; right: 16px; width: 48px; height: 48px; font-size: 36px; }
}

/* Small phones */
@media screen and (max-width: 480px) {
    .logo h1 { font-size: 12px; }
    .small-logo { height: 28px; }
    nav ul { gap: 0.75rem; }
    nav ul li a { font-size: 0.75rem; }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        max-width: 100%;
    }
    .portfolio-title { font-size: 0.8rem; }

    footer { padding: 1.25rem 1rem; font-size: 0.85rem; }
}

/* Prevent horizontal overflow anywhere */
html, body { overflow-x: hidden; max-width: 100%; }
img, video { max-width: 100%; }

/* Removed mobile-specific layout */

/* Removed mobile-specific layout */
