/* 
   Cyberpunk Portfolio Theme
   Author: Ebasa Getu
*/

:root {
    /* Colors */
    --bg-dark: #020c1b;
    --bg-light: #0a192f;
    --primary-color: #64ffda;
    /* Cyan/Teal */
    --secondary-color: #0077b6;
    /* Deep Blue */
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent: #00f3ff;
    /* Neon Blue */
    --error: #ff3333;

    /* Fonts */
    --font-heading: 'Orbitron', 'Rajdhani', sans-serif;
    --font-body: 'Roboto Mono', monospace;

    /* Spacing */
    --margin-md: 20px;
    --padding-md: 20px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Scroll Reveal Classes */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Background Effects */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    /* Larger width for movement */
    height: 200vh;
    background-image:
        linear-gradient(rgba(100, 255, 218, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 255, 218, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px;
}

.section {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    display: block;
    width: 300px;
    height: 1px;
    background: var(--secondary-color);
    margin-left: 20px;
    opacity: 0.5;
}

.highlight {
    color: var(--primary-color);
}

.accent {
    color: var(--accent);
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(2, 12, 27, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 20px 0;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links li {
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    align-items: center;
    /* Centered for the card look */
    justify-content: center;
}

.hero-content-card {
    background: rgba(17, 34, 64, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(100, 255, 218, 0.2);
    padding: 80px 100px;
    border-radius: 60px;
    /* Very round corners */
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(100, 255, 218, 0.05);
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.hero-content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 50px rgba(100, 255, 218, 0.1), inset 0 0 20px rgba(100, 255, 218, 0.1);
    border-color: rgba(100, 255, 218, 0.4);
}

.terminal-text {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 5px;
}

#hero h1 {
    font-size: 80px;
    line-height: 1.1;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px var(--secondary-color);
}

.subtitle {
    font-size: 40px;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: var(--font-body);
    /* Tech feel */
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.primary-btn {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.primary-btn:hover {
    background: rgba(100, 255, 218, 0.1);
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.secondary-btn {
    margin-left: 20px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
}

.secondary-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--text-primary);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--error);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--secondary-color);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    60% {
        clip: rect(60px, 9999px, 30px, 0);
    }

    80% {
        clip: rect(120px, 9999px, 10px, 0);
    }

    100% {
        clip: rect(40px, 9999px, 120px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(60px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(100px, 9999px, 40px, 0);
    }

    40% {
        clip: rect(20px, 9999px, 90px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 60px, 0);
    }

    80% {
        clip: rect(50px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(90px, 9999px, 50px, 0);
    }
}

/* About & Skills */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.about-text p {
    margin-bottom: 15px;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.detail-card {
    background: rgba(17, 34, 64, 0.6);
    border: 1px solid rgba(100, 255, 218, 0.15);
    padding: 16px;
    border-radius: 4px;
}

.detail-card h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.detail-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tech-stack-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-stack-inline span {
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: var(--primary-color);
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cyber-frame {
    border: 1px solid var(--primary-color);
    padding: 10px;
    position: relative;
    width: fit-content;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.1);
}

.cyber-frame::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
}

.cyber-frame::after {
    content: "";
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
}

.profile-img {
    width: 300px;
    height: 400px;
    object-fit: cover;
    display: block;
    /* Removes bottom space */
    filter: contrast(1.1) grayscale(0.2) drop-shadow(0 0 5px rgba(100, 255, 218, 0.3));
    /* Subtle filter for integration */
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-category {
    background: #112240;
    padding: 25px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.skill-category h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.skill-category li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Background Section */
.background-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
}

/* Vertical Line for Timeline Effect */
.background-content::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--secondary-color);
    opacity: 0.3;
}

.background-card {
    background: #112240;
    padding: 30px;
    border-radius: 4px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    border: 1px solid transparent;
    transition: var(--transition);
    margin-left: 80px;
    /* Space for the line */
    position: relative;
}

/* Connector Dot */
.background-card::before {
    content: '';
    position: absolute;
    left: -46px;
    /* Adjust based on margin-left */
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--bg-dark);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition);
}

.background-card:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.background-card:hover::before {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.icon-box {
    font-size: 32px;
    color: var(--primary-color);
    background: rgba(100, 255, 218, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid var(--primary-color);
}

.bg-details h3 {
    margin-bottom: 5px;
    font-size: 22px;
    color: var(--text-primary);
}

.bg-details .role {
    color: var(--secondary-color);
    font-family: var(--font-body);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.bg-details p:last-child {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: #112240;
    padding: 2rem;
    border-radius: 4px;
    transition: var(--transition);
    cursor: default;
    /* Changed from pointer to default since card itself isn't a link */
    position: relative;
    border: 1px solid transparent;
    /* Prepare for hover border */
}

.project-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    border-color: var(--primary-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.folder-icon {
    font-size: 40px;
}

.links a {
    font-size: 20px;
    margin-left: 10px;
    color: var(--text-primary);
    transition: var(--transition);
}

.links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 15px;
    font-size: 12px;
    font-family: var(--font-body);
    color: var(--text-secondary);
}

/* Loading & Error States */
.projects-grid .loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 3px solid rgba(100, 255, 218, 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.projects-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.projects-error a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-color);
}

/* Contact & Socials */
.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.social-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    border-radius: 50%;
    /* Rounded Social Icons */
    font-size: 24px;
    transition: var(--transition);
    background: rgba(17, 34, 64, 0.5);
}

.social-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.4);
    transform: translateY(-5px) scale(1.1);
    background: rgba(17, 34, 64, 0.8);
}

.big-btn {
    padding: 20px 40px;
    font-size: 18px;
}

/* Footer */
footer {
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-dark);
}

/* Enhanced Background Effects */
.stars-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 50% 50%, rgba(20, 40, 60, 0.2) 0%, rgba(2, 12, 27, 1) 100%);
    overflow: hidden;
}

.stars-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 130px 80px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 160px 120px, #ffffff, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    animation: stars-move 100s linear infinite;
}

@keyframes stars-move {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-50%);
    }
}

/* Responsiveness */
@media (max-width: 1080px) {
    .background-card {
        padding: 20px;
    }

    /* Tablet/Medium */
    .container {
        padding: 0 40px;
    }

    #hero h1 {
        font-size: 60px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        margin: 0 auto;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .background-content::before {
        left: 20px;
    }

    .background-card {
        flex-direction: column;
        gap: 15px;
        margin-left: 50px;
    }

    .background-card::before {
        left: -37px;
        top: 35px;
        /* Align with icon roughly */
        transform: none;
    }

    /* Mobile */
    .nav-links {
        position: fixed;
        right: 0px;
        top: 0px;
        height: 100vh;
        background: rgba(2, 12, 27, 0.95);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        /* Full width or partial */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 20px 0;
        font-size: 20px;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 200;
        margin-right: 0;
    }

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

    .project-card {
        padding: 1.5rem;
    }

    .project-card h3 {
        font-size: 20px;
    }

    .project-card p {
        font-size: 14px;
    }

    .tech-stack {
        gap: 8px;
    }

    .profile-img {
        width: 100%;
        height: auto;
        max-width: 280px;
    }

    .detail-card {
        padding: 12px;
    }

    .detail-card h4 {
        font-size: 0.7rem;
    }

    .hamburger .line {
        width: 30px;
        height: 2px;
        background: var(--primary-color);
        margin: 6px 0;
        transition: 0.4s;
    }

    /* Hamburger Animation */
    .hamburger.open .line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.open .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open .line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    #hero h1 {
        font-size: 40px;
    }

    .subtitle {
        font-size: 24px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 25px;
    }

    .section {
        padding: 80px 0;
    }
}
