/* =============================================
   Portfolio - Custom Styles
   High-End Architecture Magazine Aesthetic
============================================= */

/* Fonts */
@font-face {
    font-family: 'Monument Extended';
    src: url("fonts/MonumentExtended-Ultrabold.otf") format('opentype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Founders Grotesk';
    src: url("fonts/FoundersGrotesk-Bold.otf") format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Editors Note';
    src: url("fonts/Editor'sNote-HairlineItalic.ttf") format('truetype');
    font-weight: 100;
    font-style: italic;
}

@font-face {
    font-family: 'Editors Note';
    src: url("fonts/Editor'sNote-ExtralightItalic.ttf") format('truetype');
    font-weight: 200;
    font-style: italic;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #222;
    color: #fff;
}

/* =============================================
   Fade-in Animation System
============================================= */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay Variants */
.fade-delay-1 {
    transition-delay: 0.15s;
}

.fade-delay-2 {
    transition-delay: 0.3s;
}

.fade-delay-3 {
    transition-delay: 0.45s;
}

/* =============================================
   Hero Section
============================================= */

/* Hide scrollbar for hero swipe on mobile */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Scroll Indicator Animation */
.scroll-line {
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
    }
    50% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* =============================================
   Navigation
============================================= */

/* Hamburger Menu Animation */
#menu-toggle.active .hamburger-line:first-child {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active .hamburger-line:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* Mobile Menu Full Screen */
#mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

#mobile-menu.open {
    display: flex;
}

/* Hide menu on desktop */
@media (min-width: 768px) {
    #mobile-menu {
        display: none !important;
    }
}

/* Ensure no scroll when menu open */
body:has(#mobile-menu.open) {
    overflow: hidden;
}

/* Nav Link Hover Effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #222;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Nav Highlight - Hover Only */
.nav-pill {
    padding: 0.15em 0.45em;
}

.nav-pill:hover {
    background-color: #222222;
    color: #ffffff !important;
}

/* Mobile Link Hover */
.mobile-link {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease, transform 0.2s ease;
}

.mobile-link:hover {
    transform: translateX(5px);
}

/* =============================================
   Project Cards
============================================= */

/* Image Overlay on Hover */
article a .aspect-\[4\/3\] {
    position: relative;
}

article a .aspect-\[4\/3\]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
}

article:hover a .aspect-\[4\/3\]::after {
    opacity: 1;
}

/* =============================================
   Typography Refinements
============================================= */

h1, h2, h3 {
    letter-spacing: -0.02em;
}

/* Highlighter Effect */
.highlight {
    background-color: #222222;
    color: white;
    padding: 0.05em 0.2em;
}

/* =============================================
   Loading Animation (Optional)
============================================= */

.page-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-line {
    width: 60px;
    height: 1px;
    background: #e5e5e5;
    position: relative;
    overflow: hidden;
}

.loader-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 30%;
    background: #222;
    animation: loaderMove 1s ease-in-out infinite;
}

@keyframes loaderMove {
    0% { left: -30%; }
    100% { left: 100%; }
}

/* =============================================
   Responsive Adjustments
============================================= */

@media (max-width: 768px) {
    .fade-in {
        transform: translateY(20px);
    }

    .fade-delay-1,
    .fade-delay-2,
    .fade-delay-3 {
        transition-delay: 0s;
    }
}

/* =============================================
   Smooth Image Loading
============================================= */

img {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.04);
    transition: opacity 0.8s ease, filter 1.2s ease, transform 1.2s ease;
}

img.loaded {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

/* Shimmer placeholder on image containers */
.bg-light-gray,
.bg-medium-gray {
    position: relative;
    overflow: hidden;
}

.bg-light-gray::before,
.bg-medium-gray::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 70%
    );
    animation: shimmer 2s ease-in-out infinite;
    z-index: 1;
}

/* Hide shimmer once image is loaded */
.bg-light-gray:has(img.loaded)::before,
.bg-medium-gray:has(img.loaded)::before {
    opacity: 0;
    transition: opacity 0.4s ease;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* =============================================
   Focus States (Accessibility)
============================================= */

a:focus-visible,
button:focus-visible {
    outline: 2px solid #222;
    outline-offset: 4px;
}

/* =============================================
   Portfolio Carousel
============================================= */

.carousel-row {
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.carousel-right {
    animation: scrollRight 30s linear infinite;
}

.carousel-left {
    animation: scrollLeft 30s linear infinite;
}

/* Pause on hover */
.carousel-row:hover {
    animation-play-state: paused;
}

@keyframes scrollRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollLeft {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}


/* =============================================
   Print Styles
============================================= */

@media print {
    nav,
    #mobile-menu,
    .scroll-line {
        display: none !important;
    }

    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}