/* MLstudio Modern Design System */

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f9f9f9;
    --color-text: #1a1a1a;
    --color-text-muted: #595959;
    --color-accent: #000000;
    --font-primary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Montserrat', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-width: 1200px;
    --section-padding: 80px 20px;
    --transition-base: 0.3s ease;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.3rem;
    }
}

p {
    margin-bottom: 1.2rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: var(--section-padding);
}

/* Header & Navigation */
header {
    padding: 30px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    transition: var(--transition-base);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav a {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: var(--transition-base);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--color-accent);
    background: transparent;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-size: 0.8rem;
    font-weight: 700;
    transition: var(--transition-base);
    cursor: pointer;
}

.btn:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: #fff;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    /* Increased for desktop */
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
        /* Scaled for mobile */
    }
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

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

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    opacity: 0;
    transition: var(--transition-base);
}

.portfolio-item:hover .portfolio-info {
    opacity: 1;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.service-card {
    background: var(--color-bg);
    transition: var(--transition-base);
}

.service-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.service-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--color-accent);
}

.service-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.service-content p strong {
    display: block;
    margin-bottom: 10px;
    color: var(--color-text);
    font-size: 1rem;
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Footer */
footer {
    padding: 60px 0;
    background: var(--color-bg-alt);
    border-top: 1px solid #eee;
    text-align: center;
}

.footer-content {
    margin-bottom: 20px;
}

.copyright {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Responsive Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition-base);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--color-bg);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    nav a {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeIn 1s ease forwards;
}

section h2,
.hero-content {
    animation: fadeIn 1.2s ease forwards;
}

/* Mobile Portfolio Interactions */
@media (hover: none),
(max-width: 768px) {
    .portfolio-info {
        opacity: 1;
        /* Always show text on mobile */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4) 60%, transparent);
        /* Darker gradient for readability */
    }

    /* Programmatic hover class for mobile scroll effects */
    .mobile-hover img {
        transform: scale(1.05);
    }
}