/* ==========================================================================
   STYLE.CSS - SPACECRAFT DEEP SPACE LOG THEME
   ========================================================================== */

/* ----- CSS Variables ----- */
:root {
    --bg-color: #030712;
    --text-primary: #E5E7EB;
    --text-muted: #94A3B8;
    
    --command-color: #7CFF7C;       /* Terminal Green */
    --accent: #FACC15;              /* Secondary Accent Yellow */
    --link-color: #38BDF8;          /* Light Blue Links */
    --border-color: rgba(255, 255, 255, 0.08);
    
    --font-mono: 'JetBrains Mono', monospace;
    
    --glow-text: 0 0 8px rgba(124, 255, 124, 0.4);
    --glow-link: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* ----- Global Resets ----- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.8;
    letter-spacing: 0.03em;
    overflow-x: hidden;
    position: relative;
}

/* ----- Background (Drifting Starfield) ----- */
.space-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    overflow: hidden;
    background-color: var(--bg-color);
    pointer-events: none;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.star {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    opacity: 0.1;
    animation: starTwinkle 8s infinite ease-in-out, starDrift 60s infinite linear;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.85; }
}

@keyframes starDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(var(--drift-x, 25px), var(--drift-y, -25px)); }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transform: rotate(30deg);
    pointer-events: none;
    z-index: -5;
    transition: all 1.5s cubic-bezier(0.25, 1, 0.5, 1);
    width: 0px;
}

.shooting-star.shoot {
    opacity: 0.75;
    width: 150px;
    transform: translate(200px, 115px) rotate(30deg);
}

/* ----- Fixed Navbar Navigation ----- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-brand {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.1em;
}

.nav-brand:hover {
    color: var(--command-color);
    text-shadow: var(--glow-text);
}

.nav-toggle {
    display: none;
}

.nav-menu {
    display: flex;
    gap: 1.8rem;
}

.nav-link {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

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

.resume-link {
    color: var(--link-color);
}

.resume-link:hover {
    text-shadow: var(--glow-link);
}

/* ----- Layout Container ----- */
.log-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ----- Section Generic Styles ----- */
.section {
    padding: 6.5rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 2.5rem;
    letter-spacing: -0.01em;
}

/* ----- Scroll Reveal Classes ----- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Hero / Landing Section ----- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 5rem;
}

/* CMD Window Styling */
.cmd-window {
    background: rgba(3, 7, 18, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-top: 2rem;
    overflow: hidden;
}

.cmd-header {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cmd-title {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.cmd-controls {
    display: flex;
    gap: 8px;
}

.cmd-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
}
.cmd-btn:nth-child(1) { background-color: #ff5f56; }
.cmd-btn:nth-child(2) { background-color: #ffbd2e; }
.cmd-btn:nth-child(3) { background-color: #27c93f; }

.cmd-body {
    padding: 2.5rem 3rem;
}

.terminal-intro {
    font-size: 1.6rem;
    color: var(--command-color);
    margin-bottom: 1.5rem;
    text-shadow: var(--glow-text);
}

.cursor {
    display: inline-block;
    color: var(--command-color);
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.hero-intro-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}

.hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1.8rem;
}

.role-tag {
    font-size: 12px;
    color: var(--accent);
}

.role-separator {
    font-size: 12px;
    color: var(--border-color);
}

.hero-subtext {
    font-size: 1rem;
    color: var(--text-primary);
    max-width: 580px;
    margin-bottom: 2.2rem;
    line-height: 1.7;
}

/* Pulsing Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2.5rem;
    font-size: 11px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: var(--command-color);
    border-radius: 50%;
    box-shadow: var(--glow-text);
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; box-shadow: 0 0 10px var(--command-color); }
}

.status-label {
    color: var(--text-muted);
}

/* Meta Grid details */
.meta-log-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.meta-row {
    display: flex;
    font-size: 12px;
}

.meta-lbl {
    color: var(--text-muted);
    width: 100px;
    flex-shrink: 0;
}

.meta-val {
    color: var(--text-primary);
}

.text-link {
    color: var(--link-color);
    text-decoration: none;
    transition: text-shadow 0.3s ease;
}

.text-link:hover {
    text-shadow: var(--glow-link);
}

/* Button Actions */
.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    text-decoration: none;
    padding: 0.8rem 1.6rem;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--command-color);
    box-shadow: var(--glow-text);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

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

/* ----- About Section ----- */
.about-content p {
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* ----- Skills Section ----- */
.skills-terminal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 3rem 2rem;
    margin-top: 1rem;
}

.skills-block {
    display: flex;
    flex-direction: column;
}

.skills-block-header {
    font-weight: 700;
    color: var(--text-primary);
}

.skills-block-divider {
    font-size: 11px;
    color: var(--border-color);
    margin: 0.3rem 0;
    user-select: none;
}

.skills-list {
    list-style: none;
    font-size: 13px;
    color: var(--text-muted);
}

.skills-list li {
    margin-bottom: 0.4rem;
    transition: color 0.3s ease;
}

.skills-list li:hover {
    color: var(--command-color);
    text-shadow: var(--glow-text);
}

/* ----- Projects Section ----- */
.projects-list {
    display: flex;
    flex-direction: column;
}

.project-item {
    display: flex;
    gap: 3rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.project-item:first-of-type {
    padding-top: 1rem;
}

.project-item:last-of-type {
    border-bottom: none;
}

.project-index {
    font-size: 1.3rem;
    color: var(--command-color);
    font-weight: 500;
    text-shadow: var(--glow-text);
    width: 30px;
    flex-shrink: 0;
}

.project-body {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.project-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-desc {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.7;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.2rem;
}

.stack-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 0.4rem;
}

.stack-tag {
    font-size: 11px;
    color: var(--link-color);
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.12);
    padding: 0.15rem 0.6rem;
    border-radius: 2px;
}

/* ----- Experience Section ----- */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.experience-item {
    background: transparent;
}

.exp-header {
    margin-bottom: 1rem;
}

.exp-dates {
    font-size: 12px;
    color: var(--accent);
    display: block;
    margin-bottom: 0.4rem;
}

.exp-company {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    display: inline-block;
    margin-right: 0.8rem;
}

.exp-role {
    font-size: 12px;
    color: var(--text-muted);
}

.exp-details {
    list-style: none;
    font-size: 13px;
    color: var(--text-muted);
}

.exp-details li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
}

.exp-details li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--command-color);
}

/* ----- Contact Section ----- */
.contact-terminal {
    width: 100%;
}

.contact-subtext {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
    padding: 1.8rem;
    max-width: 550px;
}

.comm-line {
    display: flex;
}

.comm-label {
    width: 120px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.comm-val {
    color: var(--text-primary);
}

.contact-actions {
    display: flex;
    gap: 1.5rem;
}

/* ----- Footer ----- */
.log-footer {
    padding: 4rem 0;
    text-align: center;
}

.footer-divider {
    font-size: 12px;
    color: var(--border-color);
    user-select: none;
    margin: 1.5rem 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.footer-tech {
    display: flex;
    gap: 0.8rem;
    font-size: 11px;
    color: var(--text-muted);
}

.footer-tech span:first-of-type {
    margin-right: 0.4rem;
}

.copyright {
    font-size: 11px;
    color: var(--text-muted);
}

/* ----- Responsive Rules ----- */
@media (max-width: 768px) {
    .nav-brand {
        display: block;
    }
    
    .nav-container {
        justify-content: space-between;
    }
    
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 20px;
        height: 14px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 120;
        padding: 0;
    }
    
    .nav-toggle .bar {
        width: 100%;
        height: 1px;
        background-color: var(--text-primary);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
        background-color: var(--command-color);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
        background-color: var(--command-color);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: rgba(3, 7, 18, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 110;
        padding: 2rem;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 13px;
        letter-spacing: 0.1em;
    }

    .hero-name {
        font-size: 2.8rem;
    }

    .project-item {
        flex-direction: column;
        gap: 0.8rem;
        padding: 2.2rem 0;
    }
    
    .project-index {
        font-size: 1.1rem;
        width: auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }

    .cmd-body {
        padding: 1.8rem;
    }
}

@media (max-width: 576px) {
    .log-container {
        padding: 0 1.2rem;
    }

    .section {
        padding: 4.5rem 0;
    }

    .hero-name {
        font-size: 2.3rem;
    }

    .hero-roles {
        gap: 0.5rem;
    }

    .hero-roles span {
        font-size: 11px;
    }

    .hero-subtext {
        font-size: 0.95rem;
    }

    .meta-log-grid {
        padding: 1rem;
    }

    .meta-lbl {
        width: 80px;
    }

    .contact-methods {
        padding: 1.2rem;
    }

    .comm-label {
        width: 90px;
    }
    
    .comm-val {
        font-size: 12px;
    }

    .cmd-body {
        padding: 1.2rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-actions .btn {
        text-align: center;
        width: 100%;
    }
}
