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

body {
    font-family: 'JetBrains Mono', monospace;
    background: #000000;
    color: #ffffff;
    line-height: 1.4;
    overflow-x: hidden;
    position: relative;
    font-weight: 400;
}

/* ===== Grid Background ===== */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.15;
    background-image: 
        linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.15) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px, 100px 100px, 100px 100px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    animation: pulse 2s ease-in-out infinite;
}

.loading-logo img {
    height: 80px;
    width: auto;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ===== Main Content ===== */
.main-content {
    opacity: 0;
    animation: fadeInContent 1s ease 0.5s forwards;
}

/* ===== Header / Navigation ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    transform: translateY(-100%);
    animation: slideInFromTop 0.8s ease 0.5s forwards;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.8rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* ===== Logo ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    opacity: 0;
    animation: fadeInLogo 0.6s ease 0.7s forwards;
    position: relative;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
    padding: 0.3rem;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo img {
    height: 42px;
    width: auto;
    transition: filter 0.2s ease;
}

.logo:hover img {
    filter: brightness(1.1);
}

/* ===== Navigation Links ===== */
.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-links li {
    opacity: 0;
    transform: translateY(-20px);
    animation: slideInNavItems 0.5s ease forwards;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links li:last-child {
    border-right: none;
}

.nav-links li:nth-child(1) { animation-delay: 0.9s; }
.nav-links li:nth-child(2) { animation-delay: 1.0s; }
.nav-links li:nth-child(3) { animation-delay: 1.1s; }
.nav-links li:nth-child(4) { animation-delay: 1.2s; }

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding: 1rem 1.5rem;
    display: block;
    text-transform: uppercase;
    background: transparent;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.2s ease;
}

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

/* ===== Menu Toggle ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.menu-toggle:hover span {
    background: #cccccc;
}

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

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

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

/* ===== Mobile Navigation ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

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

.mobile-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
}

.mobile-nav.active a {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav.active a:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active a:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav.active a:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav.active a:nth-child(4) { transition-delay: 0.4s; }

/* ===== Main Pages Layout ===== */
main {
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 2rem;
}

.hero-content {
    opacity: 0;
    transform: translateY(50px);
    animation: heroContentSlideIn 1s ease 0.8s forwards;
}

.hero-image {
    max-width: 80%;
    height: auto;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: heroImageAppear 0.8s ease 1.2s forwards;
}

.scroll-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: arrowAppear 0.6s ease 1.6s forwards;
    transition: transform 0.3s ease;
    width: 100%;
}

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

.scroll-arrow svg {
    width: 40px;
    height: 40px;
    fill: #ffffff;
    animation: bounce 2s infinite;
}

/* ===== Page Hero Sections ===== */
.contact-hero,
.about-hero {
    text-align: center;
    padding: 2rem 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.contact-hero h1,
.about-hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.contact-hero p,
.about-hero p {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

/* ===== Services Section ===== */
.services {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.services h2,
.contact-section h2,
.team-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #ffffff;
    font-weight: 600;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-family: 'JetBrains Mono', monospace;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.service-card h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.service-card p {
    font-weight: 300;
    opacity: 0.9;
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-section h2 {
    animation-delay: 0.7s;
    margin-bottom: 2rem;
}

/* Contact Form */
.contact-form {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 0.9s forwards;
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #aaaaaa;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

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

/* UNIFIED BUTTON STYLES */
.contact-form button,
.recruitment-button,
.profile-button {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.contact-form button {
    align-self: flex-start;
}

.recruitment-button,
.profile-button {
    margin-top: 1rem;
}

.contact-form button:hover,
.recruitment-button:hover,
.profile-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.contact-details {
    margin-top: 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease 1.1s forwards;
}

.contact-details a {
    color: #4c00ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: #ffffff;
}

/* ===== Team Section ===== */
.team-section {
    padding: 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-section h2 {
    animation-delay: 0.7s;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 2rem;
}

.team-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.6s ease forwards;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.team-card:nth-child(1) { animation-delay: 0.9s; }
.team-card:nth-child(2) { animation-delay: 1.1s; }
.team-card:nth-child(3) { animation-delay: 1.3s; }
.team-card:nth-child(4) { animation-delay: 1.5s; }


.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.team-card.recruitment {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.03);
    /* Animation delay matches the 4th card position */
    animation-delay: 1.5s;
}

.team-card.recruitment:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-emoji {
    font-size: 2.5rem;
    line-height: 1;
}

.question-mark {
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
    opacity: 0.6;
}

.team-card:hover .avatar {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.team-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #ffffff;
}

.team-card .role {
    font-size: 0.85rem;
    color: #cccccc;
    margin-bottom: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.team-card p {
    font-weight: 300;
    line-height: 1.5;
    opacity: 0.9;
    font-size: 0.9rem;
}

.new-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ===== Footer ===== */
footer {
    background: rgba(0, 0, 0, 0.95);
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    font-weight: 300;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: #ffffff;
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: #cccccc;
    transform: scale(1.2);
}

/* ===== Version Section ===== */
.version-section {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'JetBrains Mono', monospace;
}

.version-info {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.9rem;
    color: #888;
    font-weight: 400;
}

.version-info::before {
    content: '> ';
    color: #00ff00;
}

/* ===== Animations ===== */
@keyframes fadeInContent {
    to { opacity: 1; }
}

@keyframes slideInFromTop {
    to { transform: translateY(0); }
}

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

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

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

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

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

/* Fade Up Utility */
.fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        padding: 0 1rem;
    }

    .logo img {
        height: 36px;
    }

    /* Hero adjustments */
    .hero-image {
        max-width: 90%;
    }

    .contact-hero h1,
    .about-hero h1 {
        font-size: 1.8rem;
    }

    .contact-section h2,
    .team-section h2 {
        font-size: 1.5rem;
    }

    /* Grid adjustments */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        /* Updated from 1fr to allow for proper card sizing on mobile */
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .team-card {
        padding: 1.5rem;
    }

    /* Layout adjustments */
    main {
        height: auto;
        min-height: 100vh;
    }

    .contact-hero,
    .about-hero {
        padding: 1rem 1rem 0.5rem;
    }

    .contact-section,
    .team-section {
        padding: 1rem;
    }
}