/**
 * Mint Creative Studio
 */

:root {
    --bg: #fafafa;
    --text-main: #111111;
    --text-muted: #888888;
    --line-color: #e5e5e5;
    --mint: #00bfa5;

    --font-geist: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --ease-slow: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-fast: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-geist);
    font-weight: 300;
    /* Extremely thin default weight */
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--text-main);
    color: var(--bg);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-padding {
    padding: 15vh 0;
}

.section-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

/* Typography Overrides */
h1,
h2,
h3,
h4 {
    font-weight: 300;
    /* Keeping headings dangerously sleek */
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.text-mint {
    color: var(--mint);
}

.text-muted {
    color: var(--text-muted);
}

/* ==========================================================================
   Header Navbar
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 0;
    z-index: 100;
    transition: padding 0.5s var(--ease-slow), background 0.5s var(--ease-slow);
}

.header.scrolled {
    padding: 1.5rem 0;
    background: rgba(250, 250, 250, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* A very sleek typographic logo */
.logo-link {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.05em;
}

.nav-menu {
    display: flex;
    gap: 3rem;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: lowercase;
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-main);
    transform: translateX(-101%);
    transition: transform 0.4s var(--ease-slow);
}

.nav-link:hover::after {
    transform: translateX(0);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 101;
    cursor: pointer;
}

.mobile-toggle .bar {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    /* Thinner hamburger menu lines */
    background: var(--text-main);
    transition: transform 0.4s var(--ease-slow);
}

.mobile-toggle .line-1 {
    top: 4px;
}

.mobile-toggle .line-2 {
    bottom: 4px;
}


/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 10vh;
}

.hero-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 70vh;
}

.hero-top {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-title {
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 200;
    /* Ultra thin font weight */
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
}

.title-line {
    display: block;
}

.hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid var(--line-color);
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.6;
}

.scroll-link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.scroll-link .arrow {
    transition: transform 0.3s var(--ease-fast);
}

.scroll-link:hover .arrow {
    transform: translateY(4px);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.service-list {
    border-top: 1px solid var(--line-color);
}

/* Dim other rows when list is hovered (Desktop mainly) */
@media (hover: hover) {
    .service-list:hover .service-row {
        opacity: 0.25;
        transform: scale(0.98);
        filter: grayscale(100%);
    }
}

.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--line-color);
    align-items: baseline;
    cursor: default;
    transition: opacity 0.6s var(--ease-slow), transform 0.6s var(--ease-slow), filter 0.6s var(--ease-slow);
    transform-origin: center left;
}

.service-row:hover {
    opacity: 1 !important;
    transform: scale(1) !important;
    filter: grayscale(0%) !important;
}

.service-name {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300;
    transition: transform 0.6s var(--ease-slow), color 0.6s var(--ease-slow);
}

.service-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: transform 0.6s var(--ease-slow), color 0.6s var(--ease-slow);
}

.service-row:hover .service-name {
    color: var(--text-main);
    transform: translateX(1.5rem);
}

.service-row:hover .service-desc {
    color: var(--mint);
    transform: translateX(1rem);
}

@media (max-width: 768px) {
    .service-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2.5rem 0;
    }

    .service-row:hover .service-name,
    .service-row:hover .service-desc {
        transform: translateX(0);
        /* No horizontal shift on small screens */
    }
}

/* ==========================================================================
   Portfolio (Asymmetric 3-Column Grid)
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3vw;
}

.portfolio-col {
    display: flex;
    flex-direction: column;
}

/* Create an editorial masonry effect by pushing the middle column down */
.offset-col {
    margin-top: 8vw;
}

/* Push the third column down slightly to continue the flow */
.col-3 {
    margin-top: 4vw;
}

.project-card {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    margin-bottom: 5vw;
    transition: opacity 0.6s var(--ease-slow), transform 0.6s var(--ease-slow), filter 0.6s var(--ease-slow);
    cursor: zoom-in;
}

.project-card:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.02);
    z-index: 2;
    position: relative;
}

.img-wrapper {
    overflow: hidden;
    margin-bottom: 0;
    background-color: var(--line-color);
    aspect-ratio: 4/5;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Default slight greyscale to look sophisticated */
    filter: grayscale(20%);
    transition: transform 1.2s var(--ease-slow);
}

/* On hover, image slightly zooms and fully regains color (color return handled by parent hover) */
.project-card:hover .img-wrapper img {
    transform: scale(1.05);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-slow);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    width: 90%;
    max-width: 1200px;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s var(--ease-slow), transform 0.6s var(--ease-slow);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.lightbox.active .lightbox-content img {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.1s;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    font-size: 3rem;
    font-weight: 200;
    color: var(--text-main);
    cursor: pointer;
    z-index: 10000;
    padding: 1rem;
    transition: transform 0.4s var(--ease-fast);
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    z-index: 10000;
    padding: 1.5rem;
    transition: transform 0.4s var(--ease-fast), opacity 0.4s var(--ease-fast);
    opacity: 0.7;
}

.lightbox-nav:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 2vw;
}

.lightbox-prev:hover {
    transform: translateY(-50%) translateX(-4px);
}

.lightbox-next {
    right: 2vw;
}

.lightbox-next:hover {
    transform: translateY(-50%) translateX(4px);
}

@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: 1fr 1fr;
    }

    .col-3 {
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .offset-col,
    .col-3 {
        margin-top: 0;
    }

    .img-wrapper {
        aspect-ratio: auto;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.footer-content {
    margin-bottom: 10vh;
}

.footer-title {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 200;
    margin-bottom: 2rem;
}

.email-link {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s var(--ease-slow);
}

.email-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line-color);
    padding-top: 2rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.socials {
    display: flex;
    gap: 2rem;
}

.socials a:hover {
    color: var(--mint);
}

@media (max-width: 768px) {
    .footer.section-padding {
        padding-bottom: 3rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .back-to-top {
        margin-top: 1.5rem;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s var(--ease-slow), transform 1.2s var(--ease-slow);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 1.5s var(--ease-slow);
}

.fade-in.active {
    opacity: 1;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.6s var(--ease-slow);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 2rem;
    }

    .mobile-toggle {
        display: block;
    }

    .mobile-toggle.active .line-1 {
        transform: translateY(4px) rotate(45deg);
    }

    .mobile-toggle.active .line-2 {
        transform: translateY(-4px) rotate(-45deg);
    }
}