
/* =================================
   RIHAN - CYBER DIMENSION
   MAIN STYLESHEET
================================= */

:root {
    --bg: #050505;
    --panel: #0b0b0d;
    --red: #ff202d;
    --red-glow: #ff001e;
    --white: #f5f5f5;
    --muted: #858585;
    --border: rgba(255, 35, 48, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
}

/* LOADER */

#loader {
    position: fixed;
    inset: 0;
    background: #030303;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 55px;
    letter-spacing: 12px;
    color: var(--red);
    text-shadow: 0 0 25px var(--red);
}

.loader-content p {
    font-size: 12px;
    letter-spacing: 4px;
    color: #aaa;
    margin-top: 15px;
}

.loader-line {
    width: 220px;
    height: 2px;
    background: #292929;
    margin: 25px auto;
    overflow: hidden;
}

.loader-line::after {
    content: "";
    display: block;
    width: 40%;
    height: 100%;
    background: var(--red);
    box-shadow: 0 0 15px var(--red);
    animation: loading 1.2s infinite;
}

@keyframes loading {
    from { transform: translateX(-100%); }
    to { transform: translateX(350%); }
}

/* NAVBAR */

.navbar {
    width: 100%;
    height: 85px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(5, 5, 5, 0.92);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 100;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    font-weight: 800;
}

.logo span {
    color: var(--red);
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #aaa;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--red);
    text-shadow: 0 0 12px var(--red);
}

.menu-btn {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* HERO LAYOUT */

.hero-section {
    width: 100%;
    min-height: 680px;
    padding: 25px 4%;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
}

/* MAIN LEFT PANEL */

.hero-main-panel {
    min-height: 630px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(
        ellipse at 72% 485,
        rgba(255, 0, 35, 0.22),
        transparent 42%
    ),
    radial-gradient(
        ellipse at 25% 75%,
        rgba(120, 0, 20, 0.12),
        transparent 50%
    ),
    linear-gradient(
        135deg,
         #111 0%,
          #070707 65%,
           #170508 100%
           );
        border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(255, 0, 30, 0.08),
    inset 0 0 35px rgba(255, 0, 30, 0.04);
}

.hero-main-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 45px 45px;
}

.panel-top {
    position: absolute;
    top: 25px;
    left: 28px;
    right: 28px;
    display: flex;
    justify-content: space-between;
    z-index: 5;
}

.system-status,
.edition {
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #ff2535;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 12px var(--red);
}

.edition {
    color: var(--muted);
}

/* CHARACTER AREA */

.character-container {
    position: absolute;
    top: 65px;
    left: 32%;
    right: 0;
    bottom: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#characterCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.character-fallback {
    width: 270px;
    height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse, rgba(255,0,30,0.3), transparent 65%);
    border: 1px solid rgba(255, 30, 40, 0.2);
    color: rgba(255,255,255,0.4);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 3px;
}

/* HERO TITLE */

.hero-title {
    position: absolute;
    left: 35px;
    bottom: 110px;
    width: 42%;
    max-width: 340px;
    padding: 18px 20px;
    z-index: 6;
    background: linear-gradient(
        90deg,
        rgba(5, 5, 5, 0.75),
        transparent
    );
    border-left: 2px solid var(--red);
}

.hero-subtitle {
    color: var(--red);
    font-family: 'Orbitron', sans-serif;
    font-size: 8px;
    letter-spacing: 2px;
    line-height: 1.8;
    margin-bottom: 12px;
    max-width: 300px;
}

.hero-title h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(35px, 5vw, 68px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow:
    0 0 10px rgba(255, 255, 255, 0.15),
    0 0 25px rgba(255, 0, 30, 0.25);
}

.hero-title h1 span {
    display: block;
    color: var(--red);
    font-size: 0.28em;
    letter-spacing: 3px;
    margin-top: 10px;
    text-shadow: 0 0 15px rgba(255, 0, 30, 0.5);
}

/* BOTTOM NAVIGATION */

.hero-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 65px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    gap: 28px;
    background: rgba(0,0,0,0.75);
    border-top: 1px solid var(--border);
    z-index: 5;
}

.hero-tab {
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
    color: #888;
    transition: 0.3s;
}

.hero-tab span {
    color: var(--red);
    margin-right: 5px;
}

.hero-tab:hover,
.hero-tab.active {
    color: white;
}

.scroll-indicator {
    margin-left: auto;
    color: #777;
    font-size: 9px;
    letter-spacing: 2px;
}

/* RIGHT PANELS */

.hero-side-panel {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    min-height: 630px;
}

.portal-panel,
.interface-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0b090a;
}

.panel-label,
.interface-header,
.interface-footer {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    padding: 17px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #aaa;
}

.panel-label span:last-child,
.red-text {
    color: var(--red);
}

.portal-container {
    position: absolute;
    inset: 45px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at center, rgba(255,0,25,0.18), transparent 65%),
        linear-gradient(135deg, #160609, #080808);
}

#portalCanvas,
#interfaceCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
}

.portal-fallback {
    width: 155px;
    height: 155px;
    border: 2px solid rgba(255, 20, 40, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 25px var(--red),
        inset 0 0 30px rgba(255,0,30,0.3);
    animation: portalPulse 3s infinite alternate;
    font-family: 'Orbitron', sans-serif;
    font-size: 8px;
    text-align: center;
    letter-spacing: 1px;
}

@keyframes portalPulse {
    from { transform: scale(0.95); box-shadow: 0 0 15px var(--red); }
    to { transform: scale(1.05); box-shadow: 0 0 45px var(--red); }
}

/* INTERFACE PANEL */

.interface-content {
    position: absolute;
    inset: 45px 0 40px;
    background:
        radial-gradient(circle at center, rgba(255,0,30,0.18), transparent 60%);
}

.interface-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}

.interface-fallback h2 {
    font-size: 23px;
    color: var(--red);
    text-shadow: 0 0 20px var(--red);
}

.interface-fallback p {
    font-size: 9px;
    letter-spacing: 3px;
    color: #888;
}

.interface-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-top: 1px solid var(--border);
    padding: 12px 20px;
}

/* CONTENT SECTIONS */

.content-section {
    padding: 110px 8%;
    border-top: 1px solid var(--border);
    background:
        radial-gradient(ellipse at 80% 50%, rgba(100,0,15,0.09), transparent 60%);
}

.section-number {
    color: var(--red);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
}

.content-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(30px, 5vw, 55px);
    margin: 25px 0;
}

.content-section h2 span {
    color: var(--red);
}

.content-section > p {
    max-width: 650px;
    color: #999;
    font-size: 19px;
    line-height: 1.7;
}

/* SKILLS */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 40px;
}

.skill-card {
    padding: 30px 15px;
    border: 1px solid var(--border);
    background: #0c0c0e;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    transition: 0.4s;
}

.skill-card:hover {
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(255,0,30,0.12);
}

/* PROJECTS */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.project-card {
    padding: 35px 25px;
    min-height: 220px;
    background: linear-gradient(145deg, #111, #080808);
    border: 1px solid var(--border);
    transition: 0.4s;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--red);
    box-shadow: 0 15px 35px rgba(255,0,30,0.12);
}

.project-card > span {
    color: var(--red);
    font-size: 10px;
    letter-spacing: 2px;
}

.project-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 17px;
    margin: 25px 0 12px;
}

.project-card p {
    color: #888;
}

.project-link {
    display: inline-block;
    margin-top: 25px;
    color: var(--red);
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
}

/* CONTACT */

.contact-link {
    display: inline-block;
    margin-top: 30px;
    padding: 17px 30px;
    border: 1px solid var(--red);
    color: var(--white);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    transition: 0.3s;
}

.contact-link:hover {
    background: var(--red);
    box-shadow: 0 0 30px rgba(255,0,30,0.4);
}

/* FOOTER */

.footer {
    display: flex;
    justify-content: space-between;
    padding: 30px 5%;
    border-top: 1px solid var(--border);
    color: #777;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
}

/* RESPONSIVE DESIGN */

@media (max-width: 900px) {

    .hero-section {
        grid-template-columns: 1fr;
    }

    .hero-side-panel {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 350px;
        min-height: 350px;
    }

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

}

@media (max-width: 600px) {

    .navbar {
        height: 70px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: #090909;
        border-bottom: 1px solid var(--border);
    }

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

    .nav-links a {
        padding: 18px 25px;
        border-top: 1px solid #222;
    }

    .menu-btn {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

    .menu-btn span {
        width: 25px;
        height: 2px;
        background: var(--red);
    }

    .hero-section {
        padding: 12px;
        gap: 12px;
    }

    .hero-main-panel {
        min-height: 560px;
    }

    .character-container {
        left: 0;
        right: 0;
        top: 55px;
        bottom: 150px;
    }

    .hero-title {
        width: calc(100% - 40%);
        max-width: 100%;
        left: 20px;
        bottom: 85px;
    }

    .hero-side-panel {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 300px;
    }

    .hero-title {
        left: 20px;
        bottom: 100px;
    }

    .hero-title h1 {
        font-size: 39px;
    }

    .hero-bottom {
        padding: 0 12px;
        gap: 12px;
    }

    .hero-tab {
        font-size: 8px;
    }

    .scroll-indicator {
        display: none;
    }

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

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

    .content-section {
        padding: 75px 7%;
    }

    .footer {
        flex-direction: column;
        gap: 15px;
        line-height: 1.6;
    }

}
