/* ==========================================
   mmerinodev Portfolio - Dark Theme
   ========================================== */

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1d;
    --bg-card: #141416;
    
    --text-primary: #ffffff;
    --text-secondary: #c8c8d0;
    --text-tertiary: #9a9aa3;
    
    --accent: #06b6d4;
    --accent-hover: #22d3ee;
    --accent-subtle: rgba(6, 182, 212, 0.1);
    
    --border: #27272a;
    --border-hover: #3f3f46;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-max: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    
    /* Transitions */
    --transition: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-logo {
    position: absolute;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
}

.nav-link {
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-actions {
    position: absolute;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.lang-btn {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-tertiary);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-subtle) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-family: var(--font-mono);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-primary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.hero-socials {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* ==========================================
   Section Styles
   ========================================== */
section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
}

/* ==========================================
   About Section
   ========================================== */
.about {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* ==========================================
   Expertise Section
   ========================================== */
.expertise {
    background: var(--bg-primary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.expertise-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: var(--transition);
}

.expertise-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.expertise-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-subtle);
    border-radius: var(--border-radius-sm);
    color: var(--accent);
    margin-bottom: 20px;
}

.expertise-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.expertise-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================
   Projects Section
   ========================================== */
.projects {
    background: var(--bg-secondary);
    position: relative;
}

.project-category {
    margin-bottom: 48px;
}

.project-category:last-child {
    margin-bottom: 0;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.category-title svg {
    color: var(--accent);
}

/* Project Cards - Horizontal Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.project-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

/* Center hotspot - triggers overlay only when mouse is near center */
/* Adjust top/left and width/height to change the activation area */
.project-image .expand-hotspot {
    position: absolute;
    top: 30%;      /* Distance from top (increase = smaller area) */
    left: 30%;     /* Distance from left (increase = smaller area) */
    width: 40%;    /* Width of hotspot (decrease = smaller area) */
    height: 40%;   /* Height of hotspot (decrease = smaller area) */
    z-index: 6;
    cursor: pointer;
}

.project-image .expand-hotspot:hover ~ .expand-icon,
.project-image .expand-icon:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.project-image:has(.expand-hotspot:hover)::after,
.project-image:has(.expand-icon:hover)::after {
    opacity: 1;
}

.project-image .expand-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 5;
    cursor: pointer;
}

.project-image .expand-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-card) 100%);
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.project-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-meta p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.project-results {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-results li {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
}

.project-results li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.75rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
}

.tech-tag {
    padding: 4px 10px;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-mono);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-top: 8px;
}

.project-link:hover {
    color: var(--accent);
}

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

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

@media (min-width: 1600px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   Contact Section
   ========================================== */
.contact {
    background: var(--bg-primary);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.contact-item:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background: var(--bg-primary);
        padding: 40px 24px;
        gap: 8px;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        transform: translateX(100%);
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-link {
        padding: 16px 24px;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .nav-actions {
        position: absolute;
        right: 60px;
        display: flex;
    }
    
    .lang-toggle {
        padding: 3px;
    }
    
    .lang-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-item {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .project-content {
        padding: 20px;
    }
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ==========================================
   Image Carousel
   ========================================== */
.project-carousel {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
    z-index: 10;
}

.project-carousel:hover .carousel-btn {
    opacity: 1;
}

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

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--accent);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 32px;
        height: 32px;
        opacity: 1;
    }
    
    .carousel-prev {
        left: 4px;
    }
    
    .carousel-next {
        right: 4px;
    }
}

/* ==========================================
   Image Lightbox
   ========================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-image {
        max-width: 95vw;
        max-height: 85vh;
    }
}
