@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;700&display=swap');

:root {
    --bg-base: #060606;
    --bg-panel: rgba(10, 10, 10, 0.88);
    --bg-panel-strong: rgba(18, 10, 0, 0.92);
    --bg-field: rgba(8, 8, 8, 0.92);
    --text-primary: #ffb31a;
    --text-secondary: rgba(255, 179, 26, 0.72);
    --text-soft: rgba(255, 179, 26, 0.5);
    --border-glow: rgba(255, 179, 26, 0.28);
    --border-strong: #ffb31a;
}

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

body {
    font-family: 'Roboto Mono', monospace;
    background: radial-gradient(circle at top, #191100 0%, #090909 50%, #040404 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

body.powering-on {
    background: #000000;
}

/* CRT Container */
.crt-container {
    width: 100%;
    height: 100vh;
    position: relative;
    background: var(--bg-base);
    box-shadow: inset 0 0 30px rgba(255, 179, 26, 0.22);
    overflow: hidden;
}

/* CRT Scanlines Effect */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.22),
            rgba(0, 0, 0, 0.22) 2px,
            rgba(255, 179, 26, 0.05) 2px,
            rgba(255, 179, 26, 0.05) 3px,
            transparent 3px,
            transparent 4px
        ),
        linear-gradient(
            180deg,
            rgba(255, 179, 26, 0.08) 0%,
            transparent 14%,
            transparent 86%,
            rgba(255, 179, 26, 0.1) 100%
        );
    z-index: 1000;
    opacity: 0.92;
    animation: scanlineDrift 16s linear infinite, flicker 5s infinite;
}

.scanlines::before {
    content: "";
    position: absolute;
    inset: -18% 0 auto;
    height: 22%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 179, 26, 0.03) 28%,
        rgba(255, 179, 26, 0.12) 50%,
        rgba(255, 179, 26, 0.03) 72%,
        transparent 100%
    );
    opacity: 0.45;
    animation: scanSweep 8s linear infinite;
}

@keyframes flicker {
    0% { opacity: 0.97; }
    50% { opacity: 1; }
    100% { opacity: 0.97; }
}

@keyframes scanlineDrift {
    from {
        background-position: 0 0, 0 0;
    }
    to {
        background-position: 0 120px, 0 0;
    }
}

@keyframes scanSweep {
    from {
        transform: translateY(-140%);
    }
    to {
        transform: translateY(560%);
    }
}

/* CRT Screen */
.crt-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 10, 0, 0.98) 0%, rgba(8, 8, 8, 0.98) 100%);
    color: var(--text-primary);
    text-shadow: 0 0 3px var(--text-primary);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    font-size: 0.9em;
}

body.powering-on .crt-screen {
    animation: powerOnScreen 1.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    transform-origin: center center;
}

body.powering-on .crt-screen::before,
body.powering-on .crt-screen::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    pointer-events: none;
}

body.powering-on .crt-screen::before {
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(255, 244, 212, 0.3) 0%, rgba(255, 179, 26, 0.12) 38%, transparent 70%),
        linear-gradient(180deg, rgba(255, 179, 26, 0.08) 0%, transparent 100%);
    opacity: 0;
    z-index: 2;
    animation: powerOnGlow 1.4s ease-out forwards;
}

body.powering-on .crt-screen::after {
    top: 50%;
    height: 3px;
    background: rgba(255, 244, 212, 0.85);
    box-shadow: 0 0 18px rgba(255, 179, 26, 0.75);
    opacity: 0;
    transform: translateY(-50%) scaleX(0.04);
    z-index: 3;
    animation: powerOnBeam 1.4s ease-out forwards;
}

@keyframes powerOnScreen {
    0% {
        opacity: 0;
        transform: scale(1.02, 0.002);
        filter: brightness(4.5) saturate(0.8);
    }
    22% {
        opacity: 1;
        transform: scale(1.01, 0.01);
        filter: brightness(5.5) saturate(1);
    }
    48% {
        opacity: 1;
        transform: scale(1, 0.06);
        filter: brightness(3.8) saturate(1.05);
    }
    72% {
        opacity: 1;
        transform: scale(1, 1.02);
        filter: brightness(1.45) saturate(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1, 1);
        filter: brightness(1) saturate(1);
    }
}

@keyframes powerOnGlow {
    0% {
        opacity: 0;
    }
    18% {
        opacity: 0.08;
    }
    40% {
        opacity: 0.4;
    }
    75% {
        opacity: 0.12;
    }
    100% {
        opacity: 0;
    }
}

@keyframes powerOnBeam {
    0% {
        opacity: 0;
        transform: translateY(-50%) scaleX(0.02);
    }
    18% {
        opacity: 0.95;
        transform: translateY(-50%) scaleX(0.03);
    }
    42% {
        opacity: 0.95;
        transform: translateY(-50%) scaleX(1);
    }
    68% {
        opacity: 0.18;
        transform: translateY(-50%) scaleX(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) scaleX(1);
    }
}

/* Header */
.console-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-strong);
}

.terminal-prompt {
    color: var(--text-primary);
    font-size: 0.85em;
    margin-bottom: 3px;
    letter-spacing: 1px;
}

.console-header h1 {
    font-size: 2em;
    font-weight: 700;
    margin: 8px 0;
    letter-spacing: 3px;
    animation: glow 2s ease-in-out infinite;
}

/* Logo styling */
.logo-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 10px 0;
    animation: logoScan 0.8s ease-out;
    perspective: 900px;
    transform-style: preserve-3d;
}

.logo-container::before,
.logo-container::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.logo-container::before {
    width: 150px;
    height: 110px;
    border-left: 1px solid rgba(255, 179, 26, 0.18);
    border-right: 1px solid rgba(255, 179, 26, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 179, 26, 0.18) 0, rgba(255, 179, 26, 0.18) 1px, transparent 1px),
        repeating-linear-gradient(
            180deg,
            rgba(255, 179, 26, 0.18) 0,
            rgba(255, 179, 26, 0.18) 1px,
            transparent 1px,
            transparent 18px
        );
    transform-origin: center center;
}

.logo-container::after {
    width: 170px;
    height: 120px;
    border-top: 1px solid rgba(255, 179, 26, 0.22);
    border-bottom: 1px solid rgba(255, 179, 26, 0.12);
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 179, 26, 0.14) 50%, transparent 100%);
    transform-origin: center center;
}

.logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 0 5px var(--text-primary));
    transition: filter 0.35s ease, transform 0.35s ease;
    cursor: pointer;
    transform-origin: center center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.logo:hover,
.logo:focus-visible {
    filter: drop-shadow(0 0 15px var(--text-primary)) brightness(1.2);
    transform: scale(1.05);
    outline: none;
}

.logo.is-animating {
    animation: logoVectorRun 0.95s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.logo-container.is-animating::before {
    animation: trenchGridRun 0.95s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.logo-container.is-animating::after {
    animation: trenchSweep 0.95s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes logoScan {
    0% {
        opacity: 0;
        transform: scaleY(0.5);
    }
    100% {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes logoVectorRun {
    0% {
        transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateZ(0) scale(1);
        filter: drop-shadow(0 0 5px var(--text-primary));
    }
    22% {
        transform: perspective(900px) rotateX(9deg) rotateY(-10deg) translateZ(20px) scale(1.04);
        filter: drop-shadow(0 0 12px var(--text-primary)) brightness(1.12);
    }
    55% {
        transform: perspective(900px) rotateX(3deg) rotateY(0deg) translateZ(34px) scale(1.07);
        filter: drop-shadow(0 0 18px var(--text-primary)) brightness(1.16);
    }
    78% {
        transform: perspective(900px) rotateX(-4deg) rotateY(8deg) translateZ(12px) scale(1.02);
        filter: drop-shadow(0 0 10px var(--text-primary)) brightness(1.06);
    }
    100% {
        transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateZ(0) scale(1);
        filter: drop-shadow(0 0 5px var(--text-primary));
    }
}

@keyframes trenchGridRun {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) perspective(900px) rotateX(78deg) scale(0.42, 0.18);
        filter: blur(0.6px);
    }
    18% {
        opacity: 0.58;
    }
    55% {
        opacity: 0.72;
        transform: translate(-50%, -50%) perspective(900px) rotateX(78deg) scale(0.98, 1.9);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) perspective(900px) rotateX(78deg) scale(1.2, 2.5);
        filter: blur(0.3px);
    }
}

@keyframes trenchSweep {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) perspective(900px) rotateX(72deg) scale(0.55, 0.24);
    }
    30% {
        opacity: 0.24;
    }
    62% {
        opacity: 0.42;
        transform: translate(-50%, -50%) perspective(900px) rotateX(72deg) scale(1.08, 1.45);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) perspective(900px) rotateX(72deg) scale(1.35, 2.1);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 
            0 0 3px var(--text-primary);
    }
    50% {
        text-shadow: 
            0 0 8px var(--text-primary);
    }
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    display: none;
}



/* Navigation */
.console-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    background: transparent;
    border: 2px solid var(--border-strong);
    color: var(--text-primary);
    padding: 6px 12px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.5s ease;
    letter-spacing: 1px;
    box-shadow: inset 0 0 5px rgba(255, 179, 26, 0.1);
}

.nav-btn:hover {
    background: rgba(255, 179, 26, 0.1);
    box-shadow: 
        inset 0 0 5px rgba(255, 179, 26, 0.2),
        0 0 5px var(--text-primary);
    transform: scale(1.02);
}

.nav-btn.active {
    background: rgba(255, 179, 26, 0.15);
    box-shadow: 
        inset 0 0 5px rgba(255, 179, 26, 0.3),
        0 0 8px var(--text-primary);
}

/* Main Content */
.console-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    scroll-behavior: auto;
}

.console-content::-webkit-scrollbar {
    width: 8px;
}

.console-content::-webkit-scrollbar-track {
    background: rgba(255, 179, 26, 0.1);
}

.console-content::-webkit-scrollbar-thumb {
    background: var(--text-primary);
    box-shadow: 0 0 10px var(--text-primary);
}

/* Content Sections */
.content-section {
    display: none;
    opacity: 0;
    transform: translateY(8px);
}

.content-section.active {
    display: block;
    animation: sectionSwitch 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes sectionSwitch {
    from {
        opacity: 0;
        transform: translateY(10px);
        filter: brightness(1.18);
    }
    60% {
        opacity: 0.96;
        transform: translateY(1px);
        filter: brightness(1.04);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: brightness(1);
    }
}

.terminal-window {
    border: 2px solid var(--border-strong);
    background: rgba(0, 0, 0, 0.32);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 179, 26, 0.18);
    margin-bottom: 20px;
    animation: windowSettle 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes windowSettle {
    0% {
        opacity: 0.88;
        transform: translateY(6px);
        box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.54), 0 0 20px rgba(255, 179, 26, 0.24);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 179, 26, 0.18);
    }
}

.crt-screen.is-switching {
    animation: screenRefresh 0.28s ease-out;
}

@keyframes screenRefresh {
    0% {
        filter: brightness(1) contrast(1);
    }
    35% {
        filter: brightness(1.12) contrast(1.02);
    }
    100% {
        filter: brightness(1) contrast(1);
    }
}

.terminal-header {
    background: linear-gradient(90deg, rgba(255, 179, 26, 0.16) 0%, transparent 100%);
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-strong);
    color: var(--text-primary);
    font-size: 0.8em;
    font-weight: bold;
    letter-spacing: 2px;
}

.terminal-body {
    padding: 15px;
    line-height: 1.6;
    font-size: 0.88em;
}

.terminal-body p {
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.terminal-hr {
    border: none;
    border-top: 1px solid var(--border-strong);
    margin: 10px 0;
    opacity: 0.5;
}

/* Section Title */
.section-title {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 3px var(--text-primary);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

/* Service Blocks */
.service-block {
    background: rgba(255, 179, 26, 0.03);
    border-left: 2px solid var(--border-strong);
    padding: 10px;
    margin: 8px 0;
    transition: all 0.5s ease;
}

.service-block:hover {
    background: rgba(255, 179, 26, 0.08);
    box-shadow: inset 0 0 5px rgba(255, 179, 26, 0.1);
    border-left-color: var(--text-primary);
}

.service-label {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 3px;
    text-shadow: 0 0 3px var(--text-primary);
}

.indent {
    margin-left: 20px;
    color: var(--text-primary);
    opacity: 0.9;
}

/* Highlight */
.highlight {
    color: var(--text-primary);
    text-shadow: 0 0 3px var(--text-primary);
    font-weight: 700;
    padding: 8px;
    background: rgba(255, 179, 26, 0.03);
    border: 1px solid rgba(255, 179, 26, 0.15);
}

/* Social Grid */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.social-item {
    border: 1px solid var(--border-strong);
    padding: 10px;
    background: rgba(255, 179, 26, 0.03);
    transition: all 0.5s ease;
}

.social-item:hover {
    background: rgba(255, 179, 26, 0.1);
    box-shadow: 0 0 8px rgba(255, 179, 26, 0.2);
}

.social-label {
    color: var(--text-primary);
    font-size: 0.85em;
    font-weight: 700;
    margin-bottom: 5px;
}

.social-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.5s ease;
    display: inline-block;
}

.social-link:hover {
    color: #fff4d4;
    text-shadow: 0 0 5px #fff4d4;
}

/* Contact Form */
.contact-form {
    margin: 15px 0;
    padding: 14px;
    border: 1px solid rgba(255, 179, 26, 0.2);
    background: var(--bg-panel-strong);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-shadow: 0 0 5px rgba(255, 179, 26, 0.5);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-field);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    padding: 8px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.88em;
    transition: all 0.5s ease;
    caret-color: var(--text-primary);
}

.form-group select option {
    background: var(--bg-base);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    background: rgba(18, 10, 0, 0.98);
    box-shadow: 0 0 5px rgba(255, 179, 26, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-soft);
}

.submit-btn {
    background: transparent;
    border: 2px solid var(--border-strong);
    color: var(--text-primary);
    padding: 10px 25px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.5s ease;
    letter-spacing: 1px;
    font-weight: 700;
}

.submit-btn:hover {
    background: rgba(255, 179, 26, 0.1);
    box-shadow: 0 0 8px var(--text-primary);
    transform: scale(1.02);
}

.submit-btn:active {
    transform: scale(0.95);
}

/* Typing Effect */
.typing-effect {
    white-space: pre-wrap;
}

/* Footer */
.console-footer {
    border-top: 2px solid var(--border-strong);
    padding-top: 10px;
    margin-top: 15px;
    text-align: center;
    font-size: 0.8em;
}

.console-footer .terminal-prompt {
    margin-bottom: 3px;
}

/* Keyboard Hints */
.keyboard-hint {
    display: none;
}

.nav-shortcuts {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .console-header h1 {
        font-size: 1.8em;
    }

    .console-nav {
        gap: 5px;
    }

    .nav-btn {
        padding: 6px 10px;
        font-size: 0.75em;
    }

    .crt-container {
        border-width: 4px;
    }

    .crt-screen {
        padding: 20px;
    }

    @media (prefers-reduced-motion: reduce) {
        body.powering-on {
            background: radial-gradient(circle at top, #191100 0%, #090909 50%, #040404 100%);
        }

        body.powering-on .crt-screen,
        body.powering-on .crt-screen::before,
        body.powering-on .crt-screen::after {
            animation: none !important;
            opacity: 1 !important;
            transform: none !important;
            filter: none !important;
        }

        *,
        *::before,
        *::after {
            animation: none !important;
            transition: none !important;
            scroll-behavior: auto !important;
        }
    }

    .terminal-body {
        font-size: 0.85em;
    }

    .section-title {
        font-size: 1.1em;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .console-header h1 {
        font-size: 1.4em;
    }

    .crt-screen {
        padding: 15px;
    }

    .console-nav {
        gap: 5px;
    }

    .nav-btn {
        padding: 5px 8px;
        font-size: 0.65em;
    }

    .terminal-body {
        font-size: 0.8em;
    }

    .terminal-header {
        font-size: 0.75em;
    }
}
