:root {
    --brand-50: #fdfbf7;
    --brand-100: #f7f0e1;
    --brand-200: #eeddbb;
    --brand-300: #e1c48c;
    --brand-400: #d4a75e;
    --brand-500: #c5a059;
    --brand-600: #a68144;
    --brand-700: #856536;
    --brand-800: #6b512d;
    --brand-900: #574226;
    --brand-950: #1a140e;
    --white: #ffffff;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #000000;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--brand-400), var(--brand-600));
    z-index: 2000;
    transition: width 0.1s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 12px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--brand-600);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-family: var(--font-serif);
    font-weight: bold;
    font-size: 20px;
}

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

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--brand-600);
}

/* Hero */
.hero, .project-hero {
    padding: 180px 0 100px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8)), url('pictures/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.hero .container, .project-hero .container {
    background: transparent;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 80px;
    line-height: 1;
    margin-bottom: 24px;
    color: #ffffff;
}

.hero h1 span {
    color: var(--brand-600);
}

.hero h1 i {
    font-style: italic;
    color: var(--brand-400);
}

.hero p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 40px;
}

.btn-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--brand-600);
    color: white;
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-tag {
    font-family: monospace;
    color: var(--brand-400);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 48px;
    margin-bottom: 24px;
    color: #ffffff;
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(197, 160, 89, 0.08);
    border-color: var(--brand-300);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-400);
    margin-bottom: 24px;
}

.card h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    margin-bottom: 16px;
    color: #ffffff;
}

.card p {
    color: rgba(255, 255, 255, 0.7);
}

/* Smart Systems */
.systems {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    backdrop-filter: blur(5px);
}

.image-stack {
    position: relative;
    padding-bottom: 60px;
    padding-right: 60px;
}

.image-stack img {
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: transform 0.5s ease;
}

.img-main {
    width: 85%;
    display: block;
    position: relative;
    z-index: 2;
}

.img-sub {
    width: 60%;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 3;
    border: 8px solid var(--brand-950);
}

.image-stack:hover .img-main {
    transform: translate(-10px, -10px);
}

.image-stack:hover .img-sub {
    transform: translate(10px, 10px);
}

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

.systems-content h2 {
    font-family: var(--font-serif);
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 32px;
}

.systems-content h2 span {
    color: var(--brand-300);
    font-style: italic;
}

.systems-list {
    list-style: none;
    margin-bottom: 40px;
}

.systems-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--brand-100);
}

.systems-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--brand-500);
    border-radius: 50%;
}

/* Contact */
.contact-form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 60px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.info-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 24px;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.info-box:hover {
    border-color: var(--brand-300);
}

.info-box i {
    color: var(--brand-600);
    margin-bottom: 8px;
    display: block;
}

.info-box span {
    font-weight: 700;
    font-size: 18px;
}

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

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    margin-left: 4px;
}

input, select, textarea {
    width: 100%;
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

.btn-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* About Section */
.about-section {
    background: transparent;
    padding: 120px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    align-items: center;
}

.about-photo-container {
    position: relative;
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid #a68144;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.about-content {
    max-width: 700px;
}

#about-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8) !important;
    line-height: 1.8;
    margin-bottom: 24px;
}

.skills-grid-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background: rgba(197, 160, 89, 0.1);
    color: var(--brand-300);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid rgba(197, 160, 89, 0.2);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--brand-500);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #ffffff;
    transition: all 0.3s ease;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(26, 20, 14, 0.98), rgba(0, 0, 0, 0.98));
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: all 0.6s cubic-bezier(0.85, 0, 0.15, 1);
        z-index: 1000;
        overflow: hidden;
    }

    .nav-links::before {
        content: '';
        position: absolute;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle at center, rgba(197, 160, 89, 0.1) 0%, transparent 70%);
        animation: pulse 8s infinite alternate;
        pointer-events: none;
    }

    @keyframes pulse {
        0% { transform: translate(-25%, -25%) scale(1); }
        100% { transform: translate(-15%, -15%) scale(1.2); }
    }

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

    .nav-links a {
        font-size: 24px;
        font-weight: 300;
        color: white;
        letter-spacing: 4px;
        text-transform: uppercase;
        position: relative;
        transition: all 0.4s ease;
        opacity: 0;
        transform: translateY(20px);
        text-shadow: 0 0 10px rgba(197, 160, 89, 0.2);
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered entrance for links */
    .nav-links.active a:nth-child(1) { transition-delay: 0.2s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.3s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.4s; }

    .nav-links a:hover {
        color: var(--brand-400);
        text-shadow: 0 0 15px rgba(197, 160, 89, 0.6); /* Soft gold glow */
    }

    .nav-links a::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        width: 0;
        height: 1px;
        background: var(--brand-400);
        box-shadow: 0 0 10px var(--brand-400);
        transition: all 0.4s ease;
        transform: translateX(-50%);
    }

    .nav-links a:hover::after {
        width: 40px;
    }

    /* Hamburger Animation & Color Change */
    .mobile-menu-toggle.active span {
        background: white;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .about-photo-container {
        display: flex;
        justify-content: center;
    }
    .profile-photo {
        width: 200px;
        height: 200px;
    }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--brand-600);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--brand-600);
}

/* Footer */
footer {
    padding: 60px 0;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.social-links a {
    text-decoration: none;
    color: var(--brand-500);
    font-weight: 700;
    font-size: 14px;
}

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

section {
    padding: 100px 0;
    animation: fadeInUp 0.8s ease-out both;
}

section:nth-child(even) {
    animation-delay: 0.2s;
}

/* Mobile */
@media (max-width: 1024px) {
    .hero h1 { font-size: 60px; }
    .grid { grid-template-columns: 1fr 1fr; }
    .systems-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 48px; }
    .grid { grid-template-columns: 1fr; }
    .contact-info { grid-template-columns: 1fr; }
    .hero { padding-top: 140px; }
    
    .image-stack {
        padding-bottom: 40px;
        padding-right: 40px;
        max-width: 400px;
        margin: 0 auto;
    }

    footer .container { flex-direction: column; gap: 32px; text-align: center; }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

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

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
    transition: transform 0.3s;
}

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

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 3002;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: var(--brand-600);
    border-color: var(--brand-600);
}

.lightbox-prev { left: -80px; }
.lightbox-next { right: -80px; }

@media (max-width: 1024px) {
    .lightbox-prev { left: 20px; }
    .lightbox-next { right: 20px; }
    .lightbox-prev, .lightbox-next {
        width: 50px;
        height: 50px;
        background: rgba(0,0,0,0.5);
    }
}

.gallery img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.02);
}
