/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #141414;
    --bg-card: rgba(26, 26, 26, 0.6);
    --bg-card-hover: rgba(26, 26, 26, 0.8);

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6b6b6b;

    --accent: #00d4ff;
    --accent-secondary: #00b8e6;
    --accent-glow: rgba(0, 212, 255, 0.15);

    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --border-accent: rgba(0, 212, 255, 0.3);

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 120px;
    --section-padding-mobile: 80px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ===== Noise Background ===== */
.noise-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.noise-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
}

.noise-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.5;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

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

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

.btn-full {
    width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

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

.logo {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--transition-normal);
}

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

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

.nav-link-accent {
    color: var(--accent);
    padding: 10px 20px;
    border: 1px solid var(--accent);
    border-radius: 8px;
}

.nav-link-accent::after {
    display: none;
}

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

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-normal);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 80px;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image-border {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 50%, var(--border) 100%);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.hero-text {
    max-width: 600px;
}

.hero-greeting {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.hero-title {
    font-family: var(--font-serif);
    margin-bottom: 20px;
}

.hero-name {
    display: block;
    font-size: clamp(40px, 6vw, 72px);
    font-style: italic;
    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: 20px;
    color: var(--accent);
    margin-bottom: 16px;
}

.hero-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-hover);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 100% { opacity: 1; top: 8px; }
    50% { opacity: 0.5; top: 18px; }
}

/* ===== Sections ===== */
.section {
    padding: var(--section-padding) 0;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw, 48px);
    text-align: center;
    margin-bottom: 60px;
}

.section-title-italic {
    font-style: italic;
    color: var(--accent);
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 17px;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

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

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Services Section ===== */
.services {
    background: linear-gradient(180deg, transparent 0%, var(--bg-secondary) 50%, transparent 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.service-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.1);
}

.service-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 16px;
    margin-bottom: 24px;
    color: var(--accent);
}

.service-title {
    font-family: var(--font-serif);
    font-size: 22px;
    margin-bottom: 12px;
}

.service-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Portfolio Section ===== */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

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

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portfolio-card {
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-accent);
}

.portfolio-card.hidden {
    display: none;
}

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

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-muted);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 212, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-view {
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 14px;
}

.portfolio-info {
    padding: 20px;
}

.portfolio-category {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.portfolio-title {
    font-size: 16px;
    font-weight: 500;
}

/* ===== Testimonials Section ===== */
.testimonials {
    background: linear-gradient(180deg, transparent 0%, var(--bg-secondary) 50%, transparent 100%);
    overflow: hidden;
}

.testimonials-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: scroll-carousel 50s linear infinite;
    animation-play-state: running !important;
}

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

.carousel-slide {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.review-image {
    max-height: 350px;
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

/* ===== Contact Section ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-content.contact-centered {
    display: flex;
    justify-content: center;
}

.contact-centered .contact-info {
    max-width: 500px;
    text-align: center;
}

.contact-centered .contact-description {
    text-align: center;
}

.contact-centered .contact-response {
    justify-content: center;
}

.contact-description {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition-normal);
}

.contact-link:hover {
    border-color: var(--border-accent);
    transform: translateX(8px);
}

.contact-link-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 12px;
    color: var(--accent);
}

.contact-link-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-link-value {
    font-weight: 500;
}

.contact-response {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
}

.contact-response svg {
    color: var(--accent);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-of-type {
    margin-bottom: 24px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    transition: all var(--transition-normal);
}

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

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Animations ===== */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

@keyframes fadeIn {
    to { opacity: 1; }
}

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

/* Scroll animations */
.section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section.testimonials {
    opacity: 1;
    transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-image-wrapper {
        justify-self: center;
    }

    .hero-image-border {
        width: 220px;
        height: 220px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .services-grid,
    .portfolio-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: var(--section-padding-mobile);
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

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

    .nav-link {
        font-size: 24px;
    }

    .nav-link-accent {
        font-size: 18px;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .services-grid,
    .portfolio-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .portfolio-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-image-border {
        width: 180px;
        height: 180px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section-title {
        font-size: 28px;
    }

    .service-card,
    .testimonial-card,
    .contact-form {
        padding: 24px;
    }
}
