
.contact-link,
.contact-link:link,
.contact-link:visited,
.contact-link:hover,
.contact-link:focus,
.contact-link:active,
.contact-link-js-open-gallery-mobile,
.contact-link-js-open-gallery-mobile:link,
.contact-link-js-open-gallery-mobile:visited,
.contact-link-js-open-gallery-mobile:hover,
.contact-link-js-open-gallery-mobile:focus,
.contact-link-js-open-gallery-mobile:active,
.contact-link-js-open-gallery,
.contact-link-js-open-gallery:link,
.contact-link-js-open-gallery:visited,
.contact-link-js-open-gallery:hover,
.contact-link-js-open-gallery:focus,
.contact-link-js-open-gallery:active {
  color: black;
  text-decoration: underline; /* or none if you prefer */
}

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,400&display=swap');

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

body {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 12px;
    color: black;
    background-color: white;
    line-height: 1.2;
}


.portfolio-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    height: 100vh;
    background-color: white;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-content {
    align-self: stretch;
}

.designer-name {
    margin-bottom: 20px;
    line-height: 1.375;
    font-size: 12px;
    font-weight: normal;
}

.designer-description {
    line-height: 1.375;
    font-size: 12px;
}

.sidebar-contact {
    align-self: stretch;
}

.contact-links {
    line-height: 1.375;
    text-decoration: underline;
    font-size: 12px;
}

.contact-spacer {
    margin-bottom: 8px;
}

.contact-link {
    display: block;
    color: black;
    text-decoration: underline;
}

/* Main Content */
.main-content {
    padding: 40px;
    margin-left: 275px;
    min-height: 70vh;
    width: calc(100% - 275px);
}

/* Project Grid Base Styles */
.project-grid {
    display: grid;
    gap: 32px;
}

.project-card {
    position: relative;
    transition: transform 0.3s ease;
    cursor: pointer;
    color:#d6d6d6;
}

.project-card:hover {
    transform: scale(1.02);
}

.project-image {
    object-fit: cover;
    overflow: hidden;
    width: 100%;
}

.project-title {
    margin-top: 12px;
    font-size: 12px;
    color: black;
    font-weight: normal;
}

/* Specific Grid Layouts */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.second-grid {
    margin-top: 80px;
    display: grid;
    grid-template-columns: 1fr 2fr;
}

.third-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    margin-top: 80px;
}

.fourth-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    margin-top: 80px;
}

.fifth-grid {
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    gap: 48px;
    margin-top: 80px;
}

.sixth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-top: 80px;
}

/* Modal Styles */

/* Modal container */
.modal-content {
    background-color: white;
    padding: 2rem 1rem 2rem 2rem;
    border-radius: 12px;
    max-width: 800px;
    margin: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    color: #333;
}

/* Modal Title */
.modal-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: black;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Keep the project title visible at the top of the modal while scrolling */
.modal-scroll-container { /* parent scroll container already has overflow-y:auto */
  position: relative; /* ensures sticky anchors correctly */
}

.modal-title {
  position: sticky;
  top: 0;
  z-index: 3;
  background: white;         /* cover content underneath while scrolling */
  padding: 0 0 12px 0;           /* breathing room */
  border-bottom: 1px solid rgba(0,0,0,.08);
  /* optional: subtle separation */
  padding-right: 40px;
}


@keyframes modalFadeZoom {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow: hidden; /* Prevent background scroll from affecting modal layout */
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 2px;
    width: 100%;
    max-width: 60vw;         
  max-height: 90vh;       

    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);

    opacity: 0;
    transform: translateY(30px) scale(0.85);
    animation: modalFadeZoom 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.modal-scroll-container {
    overflow-y: auto;
    padding: 0px 12px 0px 0px;

    flex-grow: 1;
    width: 100%;
}

.modal-scroll-container::-webkit-scrollbar {
    width: 6px; /* Narrow scrollbar */
}

.modal-scroll-container::-webkit-scrollbar-track {
    background: transparent; /* Or a subtle color */
}

.modal-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2); /* Light gray thumb */
    border-radius: 4px;
}

.modal-scroll-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.modal-scroll-container {
    scrollbar-width: thin;              /* Firefox */
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}


.modal-image,
.modal-video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    object-fit: contain;
}

.modal-placeholder {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    object-fit: contain;
}

.modal-text {
    font-size: 12px;
    color: #000000;
    margin-bottom: 20px;
    margin-top: 20px;
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 4px;
    font-size: 16px;
    color: black;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}



/* Contact Footer */
.contact-footer {
    display: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    line-height: 1.375;
}

.footer-link {
    color: black;
    text-decoration: underline;
}


/* Tablet Styles */
@media (max-width: 768px) {
    .sidebar{
        position: relative;
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        border-right: none;
    }

    .contact-link-js-open-gallery{
        display:none;
    }

    .sidebar-contact {
        display: none;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

     /* Make ALL grids one column */
    .main-grid,
    .second-grid,
    .third-grid,
    .fourth-grid,
    .sixth-grid
    .fifth-grid {
        grid-template-columns: 1fr;
    }

    .tablet-footer {
        display: block;
        position: sticky;
        bottom: 0;
        left: 0;
        z-index: 10;
        padding: 20px;
        width: 100%;
        background-color: white;
        border-top: 1px solid rgba(0, 0, 0, 0.1);

    .modal-content {
        background-color: white;
        border-radius: 2px;
        width: 100%;
        max-width: 100vw;
    }

    .modal-overlay{
        padding: 8px;
    }
}
}

/* Mobile Styles */
@media (max-width: 768px) {
    .sidebar {
        position: fixed; /* ← Changed from fixed */
        top: 0;
        left: 0;
        width: 100%;
        padding: 20px;
        background-color: white;
        z-index: 999; /* Keep it on top if needed */
    }

    .contact-link-js-open-gallery{
        display:none;
    }


    .main-content {
        margin-top: 100px; /* ← Add enough margin to push content below header */
        margin-bottom: 20px; /* Space for footer */
        padding:20px;
    }

    .spacer {
    width: 0px;
    }

    .sidebar-contact {
        display: none;
    }


    .main-grid,
    .second-grid,
    .third-grid,
    .fourth-grid,
    .fifth-grid,
    .sixth-grid{
        grid-template-columns: 1fr;
        margin-top: 32px;
    }

    .fifth-grid {
        margin-bottom: 40px;
    }


    .tablet-footer {
        display: none;
    }

    .mobile-footer {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 10;
        padding: 20px;
        width: 100%;
        background-color: white;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .project-image {
        object-fit: contain;
        height: auto;
    }
    .modal-content {
        background-color: white;
        border-radius: 2px;
        width: 100%;
        max-width: 100vw;
    }
    .modal-overlay{
        padding: 8px;
    }
}


/* Gallery grid inside modal */

.modal-content-gallery{
    background-color: white;
    border-radius: 4px;
    width: 100%;
    max-width: 100vw;
    height: 95vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);

    opacity: 0;
    transform: translateY(30px) scale(0.85);
    animation: modalFadeZoom 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;

    background-color: white;
    padding: 2rem 1rem 2rem 2rem;
    margin: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    color: #333;
}

/* Masonry-style gallery (columns) */
.gallery-grid {
  column-count: 3;          /* desktop */
  column-gap: 8px;
}

.gallery-item {
  break-inside: avoid;      /* keep tiles intact across columns */
  margin-bottom: 8px;
  display: inline-block;    /* needed so margins apply inside columns */
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: auto;             /* let images keep natural aspect ratio */
  display: block;
  object-fit: cover;        /* just in case, but height is auto now */
  border: 1px solid rgba(0,0,0,.06);
  /*transition: transform .2s ease;*/
}

/*.gallery-item img:hover {
  transform: scale(3);
}

/* narrower screens */
@media (max-width: 1024px) {
  .gallery-grid { column-count: 2; }
}
@media (max-width: 600px) {
  .gallery-grid { column-count: 1; }
}


/* ===== CSS-only spinner + overlay + fade-in ===== */
.spinner-wrap { position: relative; display: block; width: 100%; }
.spinner-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  background: rgba(0,0,0,0.03); /* optional skeleton tint */
}

img.fade-in { display:block; width:100%; height:auto; opacity:0; transition:opacity .35s ease; }
img.is-loaded { opacity:1; }

/* your spinner */
.loader {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
}
.loader::after,
.loader::before {
  content: '';
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFF;
  position: absolute;
  left: 0;
  top: 0;
  animation: animloader 2s linear infinite;
}
.loader::after { animation-delay: 1s; }

@keyframes animloader {
  0%   { transform: scale(0); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

