:root {
    --bg-color: #030213;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent: #5e17eb;
    /* Similar to Certichain branding */
    --accent-glow: rgba(94, 23, 235, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* --- Terminal Boot Sequence --- */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #030213;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #4CAF50;
    /* Hacker Green */
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    /* Slightly larger for the bold effect */
    font-weight: bold;
    transition: opacity 1s ease-out;
}

.terminal-container {
    width: 80%;
    max-width: 600px;
    text-align: left;
}

#terminal-output div {
    margin-bottom: 8px;
    line-height: 1.4;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
    font-family: 'Courier New', Courier, monospace !important;
    font-weight: bold !important;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

#terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: #4CAF50;
    animation: terminalBlink 1s step-end infinite;
}

@keyframes terminalBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hide-boot {
    opacity: 0;
    pointer-events: none;
}

/* Base Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    /* Clean gradient to match modern web3 vibe */
    background: radial-gradient(circle at center, #0a0826 0%, #030213 100%);
}

/* --- High Performance CSS Background --- */
.grid-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(40px) translateZ(-200px);
    }
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
    animation: float 10s ease-in-out infinite alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #8c54ff, transparent 70%);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(50px) scale(1.1);
    }
}

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    perspective: 1000px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    /* 3D Transform is handled by JS, but we set transition for smoothing */
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.glass-card:hover {
    box-shadow: 0 15px 50px 0 var(--accent-glow);
}

.avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    transform: translateZ(50px);
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    filter: blur(20px);
    opacity: 0.6;
    z-index: 1;
    animation: pulse 3s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #fff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateZ(40px);
}

.subtitle-container {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: translateZ(30px);
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    /* prevents layout shift when jumping empty words */
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--accent);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.bio p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 1.05rem;
    transform: translateZ(20px);
}

.bio strong {
    color: var(--text-primary);
}

.skills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
    transform: translateZ(30px);
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(94, 23, 235, 0.4);
}

.links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transform: translateZ(40px);
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    transform: translateY(-3px) scale(1.1);
}

.primary-btn {
    background: var(--accent);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.primary-btn:hover {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-3px);
}

/* Page Load Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s forwards cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mini Terminal Easter Egg --- */
.mini-terminal-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    transform: translateZ(60px);
}

.mini-terminal-btn:hover {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    transform: translateY(-3px) translateZ(60px);
}

.mini-terminal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 2, 19, 0.98);
    border-radius: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95) translateZ(100px);
    transition: all 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    color: #4CAF50;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    text-align: left;
}

.mini-terminal.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1) translateZ(100px);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--glass-border);
}

#close-terminal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
}

#close-terminal:hover {
    color: #ff4757;
}

.terminal-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.5;
    text-shadow: 0 0 2px rgba(76, 175, 80, 0.5);
}

.terminal-input-wrapper {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-input-wrapper .prompt {
    font-weight: bold;
}

#term-input {
    background: transparent;
    border: none;
    color: #4CAF50;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    flex-grow: 1;
    outline: none;
    text-shadow: 0 0 2px rgba(76, 175, 80, 0.5);
}

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 600px) {
    .container {
        padding: 15px;
    }

    .glass-card {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .bio p {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .skills {
        gap: 8px;
        margin-bottom: 25px;
    }

    .skill-tag {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .links {
        gap: 10px;
        flex-wrap: wrap;
        /* Allows wrapping on extremely small devices */
    }

    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .primary-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
        width: 100%;
        /* Make button full width on mobile for better tapping */
        margin-top: 10px;
    }

    /* Fix mobile background clipping */
    .grid-bg {
        transform: none !important;
        animation: none !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-position: center;
        background-size: 30px 30px;
        opacity: 0.5;
    }

    .orb-1 {
        width: 250px;
        height: 250px;
        top: -50px;
        left: -50px;
    }

    .orb-2 {
        width: 200px;
        height: 200px;
        bottom: -20px;
        right: -20px;
    }
}