/* css/style.css */

/* Smooth scrolling for in-page anchors (if any) */
html {
    scroll-behavior: smooth;
}

/* Custom Font Definitions */
@font-face {
    font-family: 'neu';
    src: url('../assets/fonts/NeueHaasDisplayMediu.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'neu';
    src: url('../assets/fonts/NeueHaasDisplayLight.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
}

@font-face {
    font-family: 'neu';
    src: url('../assets/fonts/NeueHaasDisplayRoman.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

/* Base styles */
body {
    font-family: 'neu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    color: #1a1a1a;
    background-color: #EFEAE3;
}

:focus-visible {
    outline: 2px solid #FE320A;
    outline-offset: 2px;
}

/* Loader styles */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    opacity: 1; visibility: visible;
    will-change: opacity, visibility;
}
#loader h1 {
    font-size: clamp(2rem, 4vw, 4rem); color: transparent;
    background: linear-gradient(to right, orange, orangered);
    -webkit-background-clip: text; background-clip: text;
    opacity: 0; animation: load 1s linear forwards; margin: 0.5rem 0;
    will-change: transform, opacity;
}
#loader h1:nth-child(1) { animation-delay: 0.5s; }
#loader h1:nth-child(2) { animation-delay: 1.5s; }
#loader h1:nth-child(3) { animation-delay: 2.5s; }

@keyframes load {
    0% { opacity: 0; transform: translateY(20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Navigation link styles */
.nav-link {
    position: relative; display: inline-block;
    padding: 0.5rem 1.25rem; border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px; color: rgba(0, 0, 0, 0.7);
    transition: color 0.3s ease, background-color 0.3s ease;
    overflow: hidden; z-index: 1; text-decoration: none;
}
.nav-link::after {
    content: ""; position: absolute;
    bottom: -100%; left: 0;
    width: 100%; height: 100%; background-color: #000;
    border-radius: 50%;
    transition: all 0.4s ease; z-index: -1;
    will-change: transform, border-radius;
}
.nav-link:hover { color: white; }
.nav-link:hover::after {
    bottom: 0;
    border-radius: 0;
}
.nav-link.active {
    background-color: #000;
    color: white;
}

/* Logo image styles */
.logo-image {
    position: relative;
    z-index: 2;
    display: block;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: contain;
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, box-shadow;
    width: 55px;
    height: 55px;
}

.logo-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

@media (min-width: 640px) {
    .logo-image {
        width: 70px;
        height: 70px;
    }
}

@media (min-width: 768px) {
    .logo-image {
        width: 85px;
        height: 85px;
    }
}

/* Hero shape styles (index.html) */
#hero-shape { position: absolute; right: 0; top: 65vh; width: 46vw; height: 36vw; z-index: -1; }
#hero-1, #hero-2, #hero-3 { position: absolute; filter: blur(10px); }
#hero-1 { background-color: #FE320A; width: 100%; height: 100%; border-top-left-radius: 50%; border-bottom-left-radius: 50%; }
#hero-2, #hero-3 {
    background: linear-gradient(#FE320A, #fe3f0a); width: 30vw; height: 30vw;
    border-radius: 50%; filter: blur(25px);
    will-change: transform;
}
#hero-2 { animation: anime2 5s linear infinite alternate; }
#hero-3 { animation: anime1 5s linear infinite alternate; }
@keyframes anime1 { from { transform: translate(55%, -3%); } to { transform: translate(0%, 10%); } }
@keyframes anime2 { from { transform: translate(5%, -5%); } to { transform: translate(-20%, 30%); } }

/* Marquee styles (index.html) */
.marquee-container { overflow: hidden; white-space: nowrap; }
.marquee-content {
    display: inline-flex; align-items: center;
    animation: move 20s linear infinite;
    will-change: transform;
}
@keyframes move { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.marquee-dot {
    display: inline-block;
    width: clamp(20px, 3vw, 50px);
    height: clamp(20px, 3vw, 50px);
    background-color: #FE320A; border-radius: 50%; margin: 0 1.5vw;
}

/* Gooey effect (index.html) */
.gooey-effect {
    position: absolute;
    width: clamp(200px, 32vw, 400px); height: clamp(200px, 32vw, 400px);
    background: linear-gradient(to top right, #ff2d03, #ff5c0b);
    border-radius: 50%; filter: blur(20px);
    animation: gooey 6s ease-in-out infinite alternate; z-index: -1;
    will-change: transform, filter;
}
@keyframes gooey {
    from { filter: blur(20px); transform: translate(10%, -10%) skew(0); }
    to { filter: blur(30px); transform: translate(-10%, 10%) skew(-12deg); }
}

/* Project item styles (projects.html) */
.project-item {
    position: relative;
}

/* Fixed image preview on project hover (projects.html, desktop only) */
.fixed-image-preview {
    position: fixed; left: 50%; top: 20%;
    width: clamp(280px, 22vw, 420px);
    height: clamp(220px, 18vw, 340px);
    border-radius: 0.75rem;
    background-size: cover; background-position: center;
    pointer-events: none;
    opacity: 0;
    z-index: 999;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.2), 0 10px 15px -8px rgba(0,0,0,0.1);
    transform: translateX(-50%) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: transform, opacity;
}
.fixed-image-preview.active {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Mobile menu styles */
.mobile-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 2000;
    will-change: opacity;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu.active { opacity: 1; visibility: visible; }
.mobile-menu-content {
    width: 100%; max-height: 70vh;
    background-color: #EFEAE3;
    border-bottom-left-radius: 1.5rem; border-bottom-right-radius: 1.5rem;
    padding-top: 5rem; padding-bottom: 2rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    overflow-y: auto;
}
.mobile-menu-link {
    font-size: clamp(1.25rem, 4.5vw, 1.75rem);
    font-weight: 500; color: #1a1a1a; margin: 1rem 0;
    transition: color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    padding: 0.5rem 1rem;
    will-change: transform;
}
.mobile-menu-link:hover, .mobile-menu-link:focus, .mobile-menu-link.active {
    color: #FE320A;
    transform: scale(1.05);
}
#close-menu {
    transition: transform 0.2s ease, color 0.2s ease;
    will-change: transform;
}
#close-menu:hover, #close-menu:focus {
    transform: scale(1.1);
    color: #FE320A;
}

/* Responsive adjustments for hero shapes and project preview */
@media (max-width: 768px) {
    #hero-shape {
        top: 70vh; right: 5%;
        width: 70vw; height: 55vw;
    }
    #hero-2, #hero-3 { width: 45vw; height: 45vw; filter: blur(20px); }
    #hero-2 { animation: anime2_mobile 5s linear infinite alternate; }
    #hero-3 { animation: anime1_mobile 5s linear infinite alternate; }
    @keyframes anime1_mobile { from { transform: translate(50%, -5%); } to { transform: translate(0%, 10%); } }
    @keyframes anime2_mobile { from { transform: translate(5%, -10%); } to { transform: translate(-10%, 20%); } }

    .fixed-image-preview { display: none !important; }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion) {
    html {
        scroll-behavior: auto;
    }
    #hero-2, #hero-3, .marquee-content, .gooey-effect, #loader h1,
    .nav-link::after, .fixed-image-preview, .mobile-menu,
    .mobile-menu-link, #close-menu, .logo-image {
        animation: none !important;
        transition: none !important;
        will-change: auto !important;
    }
}

/* Accessibility: screen-reader only */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* Gradient text (footer name) */
.text-gradient-name {
    background: linear-gradient(to right, orange, orangered);
    -webkit-background-clip: text; -moz-background-clip: text;
    background-clip: text; color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .text-gradient-name { color: #FFA500; }
}

/* Placeholder pages (min-height to keep footer down) */
.placeholder-page-container {
    min-height: calc(100vh - 200px);
}

/* ============================================================
   REDESIGNED FOOTER — Sheryians-inspired premium dark footer
   ============================================================ */

#site-footer {
    position: relative;
    background-color: #0a0a0a;
    color: #a0a0a0;
    overflow: hidden;
    font-family: 'neu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Large decorative background brand text */
.footer-bg-text {
    position: absolute;
    top: clamp(3.5rem, 8vw, 6rem);
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 9vw, 5rem);
    font-weight: 700;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.06);
    text-stroke: 1.5px rgba(255,255,255,0.06);
    letter-spacing: -0.03em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    
    /* Hover fill effect matching loader gradient */
    background: linear-gradient(to right, orange 0%, orangered 50%, transparent 50%, transparent 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    transition: background-position 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#site-footer:hover .footer-bg-text {
    background-position: 0 0;
}

/* Continuous animation for mobile/touch devices where hover doesn't exist */
@keyframes fill-text {
    0%, 100% { background-position: 100% 0; }
    50% { background-position: 0 0; }
}
@media (hover: none) {
    .footer-bg-text {
        animation: fill-text 6s ease-in-out infinite;
    }
}

/* Main footer content row */
.footer-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: clamp(7rem, 16vw, 12rem) 2rem 3rem;
}

@media (min-width: 768px) {
    .footer-bg-text {
        font-size: clamp(4rem, 7vw, 12rem);
    }
    
    .footer-main {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        padding-left: clamp(2rem, 5vw, 5rem);
        padding-right: clamp(2rem, 5vw, 5rem);
    }
}

/* Left section */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 260px;
}

@media (max-width: 767px) {
    .footer-left {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas: 
            "logo tagline"
            "logo socials";
        gap: 0.4rem 1.25rem;
        align-items: center;
        max-width: 100%;
    }
    .footer-logo-link { grid-area: logo; align-self: center; }
    .footer-tagline { 
        grid-area: tagline; 
        text-align: right;
    }
    .footer-socials { 
        grid-area: socials; 
        margin-top: 0; 
        gap: 0.4rem;
        justify-content: flex-end;
    }
    .footer-social-btn {
        width: 32px;
        height: 32px;
    }
    .footer-social-btn svg {
        width: 16px;
        height: 16px;
    }
}

.footer-logo-link {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.footer-logo-link:hover {
    transform: scale(1.06);
    opacity: 0.9;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}

.footer-tagline {
    font-size: 0.78rem;
    line-height: 1.6;
    color: #666;
    font-weight: 300;
}

/* Social icon buttons */
.footer-socials {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    color: #888;
    background: rgba(255,255,255,0.04);
    text-decoration: none;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform, box-shadow;
}

.footer-social-btn:hover,
.footer-social-btn:focus-visible {
    color: #fff;
    background: #FE320A;
    border-color: #FE320A;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(254, 50, 10, 0.35);
    outline: none;
}

/* Nav columns grid */
.footer-nav-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem 4rem;
}

@media (max-width: 600px) {
    .footer-nav-columns {
        flex-wrap: nowrap;
        gap: 1rem;
        justify-content: space-between;
        width: 100%;
    }
}

.footer-nav-col h3.footer-nav-heading {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1.1rem;
}

.footer-nav-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Nav links with slide-underline hover */
.footer-nav-link {
    position: relative;
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 300;
    color: #777;
    text-decoration: none;
    transition: color 0.25s ease;
    padding-bottom: 1px;
}

.footer-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: #FE320A;
    transition: width 0.3s ease;
}

.footer-nav-link:hover,
.footer-nav-link:focus-visible {
    color: #fff;
    outline: none;
}

.footer-nav-link:hover::after,
.footer-nav-link:focus-visible::after {
    width: 100%;
}

/* Contact column specifics */
.footer-contact-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #444;
    margin-bottom: 0.2rem;
}

.footer-contact-val {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.5;
}

.footer-contact-plain {
    display: block;
    font-size: 0.8rem;
    color: #777;
}

/* Bottom bar */
.footer-bottom {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    padding: 1.25rem clamp(2rem, 5vw, 5rem);
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.72rem;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-copy {
    color: #444;
}

.footer-made-with {
    color: #444;
}

/* Reduced-motion: disable footer social hover transforms */
@media (prefers-reduced-motion) {
    .footer-social-btn,
    .footer-logo-link,
    .footer-nav-link::after {
        transition: none !important;
        animation: none !important;
    }
}