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

:root {
    --navy: #0a1628;
    --navy-light: #1a2d4a;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --nav-h: 76px; /* updated via JS for mobile menu positioning */
}

html {
    scroll-behavior: smooth;
    color-scheme: light dark;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    background: transparent;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav.scrolled .logo {
    color: var(--navy);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-300);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle:hover {
    border-color: var(--gray-400);
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--navy);
    transition: 0.3s;
    transform-origin: center;
}

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

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

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

.mobile-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
    max-height: calc(100vh - var(--nav-h));
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
}

.mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    overflow: auto;
}

.mobile-menu ul {
    list-style: none;
    padding: 0.5rem 1rem 1rem;
    margin: 0;
}

.mobile-menu a {
    display: block;
    padding: 0.95rem 0.5rem;
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
    transition: background-color 0.2s;
}

.mobile-menu a:hover {
    background-color: var(--gray-50);
}

/* Dim the page slightly while the menu is open (mobile only) */
body.menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.22);
    z-index: 900;
}

body.menu-open {
    overflow: hidden;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    overflow: hidden;
    padding: 6rem 2rem 4rem;
}

.hero-effect {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-effect .grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.45;
}

.fiber-line {
    position: absolute;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.45), transparent);
    animation: fiberPulse 3.4s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.18);
    opacity: 0.55;
}

.fiber-line-1 {
    top: 18%;
    left: -22%;
    width: 66%;
    transform: rotate(-5deg);
    animation-delay: 0s;
}

.fiber-line-2 {
    top: 36%;
    right: -24%;
    width: 72%;
    transform: rotate(3deg);
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.45), transparent);
    animation-delay: 1s;
}

.fiber-line-3 {
    top: 58%;
    left: -18%;
    width: 70%;
    transform: rotate(-2deg);
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.35), transparent);
    animation-delay: 2s;
}

.fiber-line-4 {
    top: 78%;
    right: -26%;
    width: 76%;
    transform: rotate(4deg);
    animation-delay: 1.5s;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.85);
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.22);
    animation: particleMove linear infinite;
    opacity: 0.0;
}

.particle-1 {
    top: 22%;
    animation-duration: 9s;
    animation-delay: 0s;
}

.particle-2 {
    top: 42%;
    animation-duration: 11s;
    animation-delay: 2s;
}

.particle-3 {
    top: 62%;
    animation-duration: 8s;
    animation-delay: 1s;
}

.particle-4 {
    top: 82%;
    animation-duration: 10s;
    animation-delay: 3s;
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(59, 130, 246, 0.42);
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.10);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.18);
    animation: nodePulse 2.6s ease-in-out infinite;
}

.node-1 { top: 26%; left: 14%; animation-delay: 0s; }
.node-2 { top: 46%; right: 18%; animation-delay: 0.5s; }
.node-3 { top: 66%; left: 22%; animation-delay: 1s; }
.node-4 { top: 34%; left: 62%; animation-delay: 1.5s; }

.hero .container {
    position: relative;
    z-index: 1;
}

.hero .container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: center;
    justify-items: center;
}

.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    text-align: center;
    max-width: 820px;
}

.hero-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--navy);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2rem;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--gray-300);
}

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

@keyframes fiberPulse {
    0%, 100% {
        opacity: 0.25;
        transform: translateX(0);
    }
    50% {
        opacity: 0.9;
        transform: translateX(18px);
    }
}

@keyframes particleMove {
    0% {
        left: -6%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 106%;
        opacity: 0;
    }
}

@keyframes nodePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.55;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fiber-line,
    .particle,
    .node {
        animation: none !important;
    }
}

/* About Section */
.about {
    padding: 8rem 2rem;
    background: var(--white);
}

.about .container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.about h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.expertise-list {
    list-style: none;
}

.expertise-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

/* Standards Section */
.standards {
    padding: 8rem 2rem;
    background: var(--navy);
    color: var(--white);
}

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

.standards .section-label {
    color: var(--accent-light);
}

.standards h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.standards-intro {
    font-size: 1.1rem;
    color: var(--gray-300);
    margin-bottom: 3rem;
    max-width: 600px;
}

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

.standard-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.standard-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.standard-code {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-light);
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.standard-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.standard-card p {
    font-size: 0.95rem;
    color: var(--gray-300);
    line-height: 1.6;
}

/* Experience Section */
.experience {
    padding: 8rem 2rem;
    background: var(--gray-50);
}

.experience .container {
    max-width: 1000px;
    margin: 0 auto;
}

.experience h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-300);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateX(-5px);
}

.timeline-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.timeline-item .period {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.timeline-item p {
    color: var(--gray-600);
    line-height: 1.7;
}

/* Gallery Section */
.gallery {
    padding: 8rem 2rem;
    background: var(--white);
}

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

.gallery h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
}

.gallery-item img, .gallery-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-placeholder {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.gallery-item:hover img,
.gallery-item:hover .gallery-placeholder {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-caption {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Section */
.contact {
    padding: 8rem 2rem;
    background: var(--navy);
    color: var(--white);
}

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

.contact .section-label {
    color: var(--accent-light);
}

.contact h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--gray-300);
    margin-bottom: 3rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-method {
    text-align: center;
}

.contact-method-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.contact-method a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.contact-method a:hover {
    color: var(--accent-light);
}

.contact .btn-primary {
    padding: 1.25rem 3rem;
    font-size: 1rem;
}

/* Footer */
footer {
    padding: 2rem;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--gray-400);
    font-size: 0.9rem;
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        margin: 0 auto 2rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .contact-methods {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    body.menu-open::before {
        display: block;
    }

    .hero {
        padding-top: 5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    section {
        padding: 4rem 1.5rem;
    }

    h2 {
        font-size: 2rem !important;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: #050a12;
        color: rgba(241, 245, 249, 0.92);
    }

    nav.scrolled {
        background: rgba(5, 10, 18, 0.82);
        box-shadow: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .logo,
    nav.scrolled .logo {
        color: rgba(241, 245, 249, 0.92);
    }

    .nav-links a {
        color: rgba(241, 245, 249, 0.72);
    }

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

    .nav-toggle {
        border-color: rgba(255, 255, 255, 0.14);
        background: rgba(10, 22, 40, 0.60);
    }

    .nav-toggle:hover {
        border-color: rgba(255, 255, 255, 0.22);
    }

    .nav-toggle span {
        background: rgba(241, 245, 249, 0.92);
    }

    .mobile-menu {
        background: rgba(5, 10, 18, 0.96);
        border-top: 1px solid rgba(255, 255, 255, 0.10);
        box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
    }

    .mobile-menu a {
        color: rgba(241, 245, 249, 0.92);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-menu a:hover {
        background-color: rgba(255, 255, 255, 0.06);
    }

    body.menu-open::before {
        background: rgba(0, 0, 0, 0.45);
    }

    .hero {
        background:
            radial-gradient(1000px 600px at 50% 40%, rgba(59, 130, 246, 0.16) 0%, rgba(5, 10, 18, 0) 60%),
            linear-gradient(135deg, #050a12 0%, #071325 100%);
    }

    .hero-effect .grid-overlay {
        background-image:
            linear-gradient(rgba(96, 165, 250, 0.07) 1px, transparent 1px),
            linear-gradient(90deg, rgba(96, 165, 250, 0.07) 1px, transparent 1px);
        opacity: 0.32;
    }

    .fiber-line {
        box-shadow: 0 0 14px rgba(96, 165, 250, 0.25);
        opacity: 0.62;
    }

    .particle {
        box-shadow: 0 0 16px rgba(96, 165, 250, 0.28);
    }

    .node {
        border-color: rgba(96, 165, 250, 0.40);
        background: rgba(96, 165, 250, 0.10);
        box-shadow: 0 0 18px rgba(96, 165, 250, 0.22);
    }

    .hero-label {
        background: rgba(96, 165, 250, 0.14);
        color: rgba(241, 245, 249, 0.92);
        border: 1px solid rgba(96, 165, 250, 0.22);
    }

    .hero h1 {
        color: rgba(241, 245, 249, 0.98);
    }

    .hero p {
        color: rgba(241, 245, 249, 0.72);
    }

    .btn-primary:hover {
        background: var(--accent-light);
    }

    .btn-secondary {
        color: rgba(241, 245, 249, 0.92);
        border-color: rgba(255, 255, 255, 0.18);
    }

    .btn-secondary:hover {
        border-color: rgba(255, 255, 255, 0.32);
    }

    .about,
    .gallery {
        background: #060e1b;
    }

    .experience {
        background: #050a12;
    }

    .about h2,
    .experience h2,
    .gallery h2 {
        color: rgba(241, 245, 249, 0.98);
    }

    .about-text p,
    .timeline-item p {
        color: rgba(241, 245, 249, 0.72);
    }

    .expertise-list li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: rgba(241, 245, 249, 0.86);
    }

    .timeline::before {
        background: rgba(255, 255, 255, 0.14);
    }

    .timeline-item h3 {
        color: rgba(241, 245, 249, 0.92);
    }

    .gallery-placeholder {
        background: linear-gradient(135deg, rgba(96, 165, 250, 0.10) 0%, rgba(59, 130, 246, 0.10) 100%);
        color: rgba(241, 245, 249, 0.65);
    }

    .gallery-item::after {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.70) 0%, transparent 55%);
    }

    footer {
        background: #050a12;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        color: rgba(241, 245, 249, 0.60);
    }
}