@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&family=Saira:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --bg-color: #0a0a0a;
    --card-bg: rgba(30, 30, 30, 0.6);
    --text-color: #f0f0f0;
    --accent-color: #00FFFF;
    --secondary-color: #008b8b;
    --font-heading: 'Google Sans Code', monospace; /* Modern developer style */
    --font-body: 'Saira', sans-serif;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --neon-shadow: 0 0 10px rgba(0, 255, 255, 0.5), 0 0 20px rgba(0, 255, 255, 0.3);
}

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

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 255, 255, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 139, 139, 0.08) 0%, transparent 25%);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Cyber Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) scale(2);
    animation: grid-move 20s linear infinite;
    pointer-events: none;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0) scale(2); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px) scale(2); }
}

/* CRT Scanline */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 255, 255, 0.02) 51%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}


/* REMOVED FIXED HEADER STYLES */
/* header { ... } */

nav {
    display: block; /* Changed from flex */
}

/* New Centered Layout Styles */
.hero.centered-layout {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from center to push content up */
    align-items: center;
    text-align: center;
    height: auto;
    min-height: 50vh;
    padding-top: 10vh; /* Add some top padding instead */
}

.brand-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--accent-color);
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
    position: relative;
    display: inline-block;
}

/* Removed highlight-title effect as requested */

/* Blinking Cursor Effect */
.cursor {
    display: inline-block;
    color: var(--accent-color);
    animation: blink 1s step-end infinite;
    -webkit-text-stroke: 0px;
    text-shadow: 0 0 10px var(--accent-color);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.main-nav {
    margin-bottom: 4rem;
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.nav-links-center {
    display: flex;
    gap: 4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-links-center li a {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links-center li a:hover, .nav-links-center li a.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.nav-links-center li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--accent-color);
}

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

.tagline {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.sub-tagline {
    font-size: 1.1rem;
    color: #888;
    width: fit-content; /* Adjust width to content */
    max-width: 90vw; /* Using viewport width instead of % to be safer on mobile */
    margin: 0 auto; 
}

.separator {
    color: var(--accent-color);
    margin: 0 10px;
    font-weight: bold;
}

/* True Typewriter Effect */
.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: normal; /* Turn off tracking spacing for mobile fitting */
    animation: typing 3.5s steps(60, end), blink-caret 0.75s step-end infinite, hide-caret 0s linear 3.5s forwards;
    border-right: 2px solid var(--accent-color);
    padding-right: 0; 
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-right-color: transparent }
    50% { border-right-color: var(--accent-color) }
}

@keyframes hide-caret {
    to { border-right-color: transparent; }
}

/* Specific override for the typing container to match text width exactly */
.hero .sub-tagline {
    max-width: fit-content;
    width: fit-content;
}

/* Adjustments for non-home pages to have a smaller header/nav area */
.page-header {
    padding: 4rem 1rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 4rem;
}

.page-header .brand-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header .nav-links-center {
    gap: 2rem;
}

.page-header .nav-links-center li a {
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header .brand-title {
        font-size: 2rem; /* Make header smaller on mobile */
    }

    .nav-links-center {
        gap: 0.5rem; /* Tighter gap */
        flex-direction: row;
        flex-wrap: wrap; 
        justify-content: center;
        padding: 0;
        width: 100%;
    }
    
    .nav-links-center li {
        flex-shrink: 1; /* Allow shrinking if needed */
    }

    .nav-links-center li a {
        font-size: 0.75rem; /* Smaller font on mobile */
        padding: 0.25rem 0.5rem;
        white-space: nowrap; /* Keep text together */
    }

    .sub-tagline {
        font-size: 0.95rem !important; /* Scale down typing text significantly */
        width: 100%;
        max-width: 95vw;
        letter-spacing: -0.5px; /* Slight squish */
        white-space: nowrap; /* Force single line */
    }

    /* .main-nav styles removed from media query so they inherit from default */
}


.highlight {
    color: transparent;
    -webkit-text-stroke: 2px var(--accent-color);
    position: relative;
    display: block;
}

.highlight::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    color: var(--accent-color);
    overflow: hidden;
    transition: width 1s ease-in-out;
    border-right: 2px solid var(--accent-color);
}

.hero:hover .highlight::before {
    width: 100%;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #aeaeae;
    max-width: 700px;
    border-left: 3px solid var(--accent-color);
    padding-left: 1.5rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--accent-color);
    z-index: -1;
    transition: width 0.3s ease;
}

.cta-button:hover {
    color: #000;
    box-shadow: var(--neon-shadow);
}

.cta-button:hover::after {
    width: 100%;
}

.about {
    max-width: 1200px;
    margin: 2rem auto 5rem;
    padding: 4rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

/* Specific Page Styles */
.page-title {
    margin: 8rem 0 4rem;
    font-family: var(--font-heading);
    font-size: 3rem;
    text-align: left;
    text-transform: uppercase;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 5rem;
}

.card {
    background-color: var(--card-bg);
    border: var(--glass-border);
    transition: transform 0.4s ease, border-color 0.4s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.card-image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #444;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    border-bottom: var(--glass-border);
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.card-content p {
    color: #bbb;
    font-size: 0.95rem;
}

/* Contact Form */
.contact-container {
    max-width: 800px;
    margin: 0 auto 5rem;
    border: 1px solid var(--accent-color);
    padding: 3rem;
    position: relative;
    background: rgba(10, 10, 10, 0.8); /* Slight darkening */
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.protocol-header {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--bg-color);
    padding: 0 10px;
    color: var(--accent-color);
    font-family: var(--font-heading);
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.label-name {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
    font-family: var(--font-body);
}

.form-group input, .form-group textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: var(--glass-border);
    border-radius: 0;
    color: #fff;
    padding: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
}

footer {
    text-align: center;
    padding: 3rem;
    color: #444;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Profile Image Styles */
.profile-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: auto;
    cursor: crosshair;
}

.profile-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* Hover state: Scale */
.about:hover .profile-image {
    transform: scale(1.02);
}

/* Glitch overlay effect */
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 255, 255, 0.05) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.about:hover .glitch-overlay {
    opacity: 0;
    animation: none;
}

/* Static Section Header */
.glitch-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0rem;
    position: relative;
    width: fit-content;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
    line-height: 1;
    margin-top: 0;
}

/* Responsive Design - Tablet/Laptop Breakpoint for Grid */
@media (max-width: 1024px) {
    .about {
        grid-template-columns: 1fr;
        padding: 3rem;
        gap: 3rem;
        text-align: left; /* Keep text left aligned */
        display: flex; /* Switch to flexbox for easier reordering */
        flex-direction: column;
    }

    .about > div:last-child {
        text-align: center !important;
        display: flex;
        justify-content: center;
        margin: 0 auto 2rem; /* Center horizontally and add bottom margin */
        order: -1;
        width: 100%; 
    }

    .about > div:last-child > div {
        /* This targets the inline-styled container to override its width/position */
        max-width: 250px !important; /* Make it smaller */
        margin: 0 auto; /* Ensure it is centered */
    }


    
    .about > div:first-child {
        padding: 0 1rem; /* "Move over" / constrain text a bit */
    }

    .about h2 {
        font-size: 2rem;
    }

    .glitch-text {
        white-space: normal;
        text-align: left; /* Keep left aligned */
        width: 100%;
        margin-left: 0; /* Reset margins */
        margin-right: auto;
    }
}

/* Responsive Design - Mobile Nav */
@media (max-width: 768px) {
    .about {
        padding: 2rem; /* Reduce padding further on mobile */
    }
    
    .about h2 {
        font-size: 1.8rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid rgba(0, 255, 255, 0.1);
        z-index: 10;
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}
