/* custom color variables and effects */
:root {
    /* set color scheme to dark */
    color-scheme: dark;
    --primary-glass: rgba(255, 255, 255, 0.1);
    --secondary-glass: rgba(255, 255, 255, 0.15);
    --accent-glow: rgba(100, 200, 255, 0.6);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --border-glass: rgba(255, 255, 255, 0.2);
    --shadow-primary: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    --terminal-bg: rgba(40, 44, 52, 0.9);
    --terminal-border: rgba(255, 255, 255, 0.1);
    --gradient-start: #111111;
    --gradient-end: #000000;
}

/* reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* body styling for full page layout */
body {
    font-family: 'JetBrains Mono', monospace;
    overflow-x: hidden;
    background: radial-gradient(ellipse at center, #111111 0%, #000000 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    cursor: text;
}

/* background animation container */
#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* individual code lines for background animation */
.code-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
}

/* base styles for instruction lines */
.instruction-line {
    position: absolute;
    white-space: nowrap;
    will-change: transform, opacity;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* highlighted instruction line styles */
.instruction-line.highlight {
    font-weight: 500;
    text-shadow: 0 0 20px currentColor;
    filter: brightness(1.3);
}

/* keyframe animation for code line movement */
@keyframes codeFlow {
    0% {
        transform: translate3d(-100vw, 0, 0);
        opacity: 0;
    }
    3% {
        opacity: var(--line-opacity);
    }
    97% {
        opacity: var(--line-opacity);
    }
    100% {
        transform: translate3d(100vw, 15px, 0);
        opacity: 0;
    }
}

/* background grid pattern */
.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 50px 50px;
    animation: gridPulse 4s ease-in-out infinite;
}

/* keyframe animation for grid pulsing effect */
@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.1; }
}

/* main content container for the terminal */
.container {
    background: var(--primary-glass);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 24px;
    border: 1px solid var(--border-glass);
    box-shadow:
        var(--shadow-primary),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 80px rgba(100, 200, 255, 0.1);
    max-width: 700px;
    width: 90%;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    margin: 20px auto;
}

/* hover effect for the container */
.container:hover {
    box-shadow:
        0 35px 70px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 120px rgba(100, 200, 255, 0.2);
    transform: translateY(0);
}

/* terminal window title bar styles */
.terminal-titlebar {
    background: var(--terminal-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--terminal-border);
    border-radius: 24px 24px 0 0;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: -1px -1px 0 -1px;
    cursor: pointer;
}

/* styles for terminal control buttons */
.terminal-controls {
    display: flex;
    gap: 8px;
    position: absolute;
    left: 20px;
}

/* back button styling */
.terminal-back-button {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 6px 12px;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* back button hover effect */
.terminal-back-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.3),
        0 0 15px var(--accent-glow);
    border-color: rgba(255, 255, 255, 0.4);
}

/* back button active state */
.terminal-back-button:active {
    transform: translateY(0);
}

/* terminal title styling */
.terminal-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

/* top border shimmer effect */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent-glow),
        rgba(255, 150, 200, 0.6),
        var(--accent-glow),
        transparent);
    animation: borderShimmer 3s ease-in-out infinite;
}

/* keyframe animation for border shimmer */
@keyframes borderShimmer {
    0%, 100% { opacity: 0.3; transform: translateX(-20px); }
    50% { opacity: 1; transform: translateX(20px); }
}

/* terminal content area styling */
.terminal-section {
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    padding: 40px;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

/* individual terminal line styling */
.terminal-line {
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* command prompt styling */
.prompt {
    color: var(--accent-glow);
    font-weight: 500;
}

/* command text styling */
.command {
    color: #81c784;
    font-weight: 400;
}

/* command output styling */
.output {
    color: var(--text-secondary);
    margin-left: 0;
    margin-top: 8px;
    line-height: 1.6;
    font-weight: 300;
}

/* welcome title styling */
.welcome-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(100, 200, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
}

/* styling for the added icon */
.welcome-icon {
    width: 30px;
    height: auto;
    vertical-align: middle;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.3);
    position: relative;
    cursor: help;
}

/* tooltip container */
.tooltip-container {
    position: relative;
    display: inline-block;
}

/* tooltip text */
.tooltip-container .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--terminal-bg);
    color: var(--text-primary);
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-primary);
}

/* tooltip arrow */
.tooltip-container .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--terminal-bg) transparent transparent transparent;
}

/* show tooltip on hover */
.tooltip-container:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* welcome subtitle styling */
.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    font-family: 'JetBrains Mono', monospace;
}

/* blinking cursor styling */
.cursor {
    display: inline-block;
    background: var(--accent-glow);
    width: 10px;
    height: 18px;
    margin-left: 2px;
    animation: blink 1s infinite;
}

/* keyframe animation for cursor blink */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* grid layout for buttons */
.buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 10px;
    padding-left: 0;
    padding-right: 0;
}

/* glass button styling */
.glass-button {
    background: var(--secondary-glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 18px 36px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* glass button hover effect */
.glass-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 30px var(--accent-glow);
    border-color: rgba(255, 255, 255, 0.4);
}

/* glass button active state */
.glass-button:active {
    transform: translateY(-1px);
}

/* styling for button icons */
.btn-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* project button styling */
.project-button {
    background: var(--secondary-glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 15px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
}

/* project button hover effect */
.project-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 30px var(--accent-glow);
    border-color: rgba(255, 255, 255, 0.4);
}

/* project button active state */
.project-button:active {
    transform: translateY(-1px);
}

/* icon inside project button */
.project-icon {
    font-size: 1.6rem;
    color: var(--accent-glow);
    margin-bottom: 3px;
    display: block;
}

/* project title */
.project-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* project description */
.project-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-top: 3px;
}

/* project tags container */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

/* individual project tag */
.project-tag {
    background: rgba(100, 200, 255, 0.1);
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.7rem;
    color: #a7d9ff;
    font-weight: 400;
}

/* show more link styling */
.show-more-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--accent-glow);
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
}

.show-more-link:hover {
    color: #a7d9ff;
    text-decoration: underline;
}


/* keyframe animation for fade-in-up effect */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* keyframe animation for ripple effect on buttons */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* styles for discord status indicator */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    background-color: grey; /* default for unknown status */
}

/* color for online status */
.status-online {
    background-color: #43b581; /* discord green */
}

/* color for idle status */
.status-idle {
    background-color: #faa61a; /* discord orange */
}

/* color for do not disturb status */
.status-dnd {
    background-color: #f04747; /* discord red */
}

/* color for offline status */
.status-offline {
    background-color: #747f8d; /* discord grey */
}

/* responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        border-radius: 20px;
    }

    .terminal-titlebar {
        border-radius: 20px 20px 0 0;
        padding: 10px 15px;
    }

    .terminal-title {
        font-size: 0.8rem;
    }

    .terminal-section {
        padding: 40px 30px;
    }

    .welcome-title {
        font-size: 1.3rem;
    }

    .welcome-subtitle {
        font-size: 0.9rem;
    }

    .buttons {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .glass-button {
        font-size: 0.95rem;
        padding: 16px 32px;
    }

    /* adjust project grid for smaller screens */
    .project-grid {
        grid-template-columns: 1fr; /* single column on small screens */
    }

    .project-button {
        padding: 18px;
    }
    
    /* globe container styling for small screens */
    #globe-container {
        display: none !important;
    }

    /* globe canvas styling for small screens */
    #globe-canvas {
        width: 100px !important; /* Smaller size for mobile */
        height: 100px !important;
        cursor: grab;
    }

    #globe-info {
        width: 100px; /* Adjust info box width */
    }

    /* Hide background code animation on small screens */
    #background {
        display: none;
    }
}

/* code syntax highlighting colors */
.code-reg { color: #64b5f6; }
.code-inst { color: #81c784; }
.code-hex { color: #ffb74d; }
.code-comment { color: #9e9e9e; }
.code-label { color: #f06292; }

/* globe container styling */
#globe-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: opacity 0.5s ease-in-out;
}

/* globe canvas styling */
#globe-canvas {
    width: 150px !important; /* using !important to override potential conflicts */
    height: 150px !important;
    cursor: grab;
}

#globe-canvas:active {
    cursor: grabbing;
}

/* globe info box styling */
#globe-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--primary-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 150px;
}

#globe-info p {
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#discord-status-container {
    margin-top: 15px;
    font-size: 0.95rem;
}

#discord-activity-text {
    display: none;
    margin-left: 5px;
}

.welcome-subtitle {
    margin-top: 10px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.output ul {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    font-size: 0.95rem;
}

.output ul li {
    margin-bottom: 10px;
}

.output ul li a {
    color: var(--accent-glow);
    text-decoration: none;
}

.output ul li a span {
    font-size: 0.8em;
}

.jetbrains {
    color: #81c784;
}

.apple {
    color: #81c784;
}

.lanyard {
    color: #81c784;
}

.meowpas {
    color: #81c784;
}

.censored {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    position: relative;
    color: transparent;
    user-select: none;
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
}

.censored::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    opacity: 0.6;
    transition: all 0.3s ease;
    font-size: 16px;
}

#ip-address.censored::after {
    content: 'ℹ️🅿️';
}

#location.censored::after {
    content: '📍';
}

.censored:hover {
    background: var(--secondary-glass);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px var(--accent-glow);
}

.censored:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.revealed {
    background: transparent;
    backdrop-filter: none;
    border-color: transparent;
    color: inherit;
    cursor: default;
    padding: 0;
}
