/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Mono', monospace;
    line-height: 1.6;
    color: #0A1628;
    background: #F9FAFB;
}

p {
    font-size: 1.0rem;
}

/* Header and Navigation */
header {
    background: transparent;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: none;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 40px;
    width: auto;
}

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

.nav-links a {
    text-decoration: none;
    color: #F59E0B;
    transition: color 0.3s;
    font-weight: 400;
}

.nav-links a:hover {
    color: #FFFFFF;
}

.nav-links a.nav-opt2 {
    color: #FFFFFF;
    background-color: #2563EB;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background-color 0.3s, transform 0.2s;
}

.nav-links a.nav-opt2:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

/* Main content */
main {
    margin-top: 0;
}

/* Hero section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: url('images/background.png') center/cover no-repeat;
    background-size: 100% 100%;
    color: #FFFFFF;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    animation: subtleZoom 20s ease-in-out infinite;
}

/* Subtle zoom animation for background */
@keyframes subtleZoom {
    0%, 100% {
        background-size: 100% 100%;
    }
    50% {
        background-size: 110% 110%;
    }
}

/* Grid rectangles container */
.grid-rectangles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Individual rectangle styling */
.grid-rectangle {
    position: absolute;
    background-color: transparent;
    border: 1px solid #2563EB;
    border-radius: 2px;
    opacity: 0;
}

/* Pulse animation using opacity only */
@keyframes rectanglePulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}


.hero h1 {
    font-size: 40px;
    font-weight: 300;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

/* Fade in and settle animation for line 1 */
@keyframes fadeInSettle {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Simple fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Border drawing animation - left, top, right, bottom sequentially with smooth fade */
@keyframes drawBorder {
    /* Draw border: 0-25% of animation time with smooth fade in */
    0% {
        border-left-color: transparent;
        border-top-color: transparent;
        border-right-color: transparent;
        border-bottom-color: transparent;
    }
    /* Left border fades in smoothly */
    2% {
        border-left-color: rgba(245, 158, 11, 0);
        border-top-color: transparent;
        border-right-color: transparent;
        border-bottom-color: transparent;
    }
    5% {
        border-left-color: rgba(245, 158, 11, 1);
        border-top-color: transparent;
        border-right-color: transparent;
        border-bottom-color: transparent;
    }
    /* Top border fades in smoothly */
    8% {
        border-left-color: rgba(245, 158, 11, 1);
        border-top-color: rgba(245, 158, 11, 0);
        border-right-color: transparent;
        border-bottom-color: transparent;
    }
    11% {
        border-left-color: rgba(245, 158, 11, 1);
        border-top-color: rgba(245, 158, 11, 1);
        border-right-color: transparent;
        border-bottom-color: transparent;
    }
    /* Right border fades in smoothly */
    14% {
        border-left-color: rgba(245, 158, 11, 1);
        border-top-color: rgba(245, 158, 11, 1);
        border-right-color: rgba(245, 158, 11, 0);
        border-bottom-color: transparent;
    }
    17% {
        border-left-color: rgba(245, 158, 11, 1);
        border-top-color: rgba(245, 158, 11, 1);
        border-right-color: rgba(245, 158, 11, 1);
        border-bottom-color: transparent;
    }
    /* Bottom border fades in smoothly */
    20% {
        border-left-color: rgba(245, 158, 11, 1);
        border-top-color: rgba(245, 158, 11, 1);
        border-right-color: rgba(245, 158, 11, 1);
        border-bottom-color: rgba(245, 158, 11, 0);
    }
    25% {
        border-left-color: rgba(245, 158, 11, 1);
        border-top-color: rgba(245, 158, 11, 1);
        border-right-color: rgba(245, 158, 11, 1);
        border-bottom-color: rgba(245, 158, 11, 1);
    }
    /* Pause with border fully visible: 25-95% (3-5 second pause) */
    95% {
        border-left-color: rgba(245, 158, 11, 1);
        border-top-color: rgba(245, 158, 11, 1);
        border-right-color: rgba(245, 158, 11, 1);
        border-bottom-color: rgba(245, 158, 11, 1);
    }
    /* Smooth fade out at end: 95-100% */
    100% {
        border-left-color: transparent;
        border-top-color: transparent;
        border-right-color: transparent;
        border-bottom-color: transparent;
    }
}

.headline-line1 {
    display: block;
    opacity: 0;
    animation: fadeInSettle 0.4s ease-out forwards;
}

.headline-line2 {
    display: inline-block;
    padding: 0.1rem 1.1rem;
    border: 2px solid transparent;
    transform: translateX(1.4rem);
    opacity: 0;
    animation: fadeIn 0.4s ease-out 0.6s forwards;
}

.headline-line2.animate-border {
    animation: fadeIn 0.4s ease-out 0.6s forwards, drawBorder 5s cubic-bezier(0.4, 0, 0.2, 1) 0.5s infinite;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.cta-button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    background: #F59E0B;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* About and Contact sections */
.about, .contact {
    padding: 5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.about h2, .contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #0A1628;
}

.about p, .contact p {
    font-size: 1.2rem;
    color: #6B7280;
}

/* Footer */
footer {
    background: #0A1628;
    color: #FFFFFF;
    text-align: center;
    padding: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
}
