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

body {
    background: radial-gradient(circle at 20% 20%, rgba(0, 255, 136, 0.08), transparent 25%),
                radial-gradient(circle at 80% 0%, rgba(0, 212, 255, 0.08), transparent 22%),
                #020805;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    color: #e0e0e0;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Hide scrollbar while keeping scroll functionality */
body, html {
    scrollbar-width: none;
}
body::-webkit-scrollbar,
html::-webkit-scrollbar {
    display: none;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
}

/* Soft grid + drifting glyphs for hacker-screen vibe */
body::before {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='240'%3E%3Cstyle%3Etext{font-family:%22Fira%20Code%22,monospace;font-size:14px;letter-spacing:1.2px;}%3C/style%3E%3Ctext x='12' y='28' fill='%2300ff88' opacity='0.18'%3E01 0xA9 %F0%9D%95%9F%3C/text%3E%3Ctext x='22' y='62' fill='%2300ff88' opacity='0.16'%3E0x7E 0011%3C/text%3E%3Ctext x='14' y='98' fill='%2300ff88' opacity='0.14'%3E%CE%BB %7C %E2%88%9E %3C/text%3E%3Ctext x='36' y='138' fill='%2300ff88' opacity='0.2'%3Esudo run %3E%3C/text%3E%3Ctext x='8' y='176' fill='%2300ff88' opacity='0.18'%3E%5BOK%5D link%3C/text%3E%3Ctext x='64' y='208' fill='%2300ff88' opacity='0.16'%3E%CE%A3 %E2%86%91 %E2%86%93%3C/text%3E%3C/svg%3E"),
        linear-gradient(rgba(0, 255, 136, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.04) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0, 212, 255, 0.06), rgba(0, 255, 136, 0.02));
    background-size: 180px 240px, 140px 140px, 140px 140px, 100% 200%;
    animation: drift 26s linear infinite;
    mix-blend-mode: screen;
    opacity: 0.5;
}

body::after {
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(0, 255, 136, 0.14) 0px,
        rgba(0, 255, 136, 0.12) 1px,
        transparent 3px,
        transparent 6px
    );
    animation: scan 6s linear infinite;
    mix-blend-mode: screen;
    opacity: 0.35;
}

@keyframes drift {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 0 140px, 140px 0, 0 200%; }
}

@keyframes scan {
    0% { transform: translateY(-20px); }
    100% { transform: translateY(20px); }
}

/* Animated character rain layer */
.matrix-streams {
    position: fixed;
    inset: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 0;
    overflow: hidden;
    z-index: 0;
    mix-blend-mode: screen;
    opacity: 0.18;
}

.matrix-column {
    position: relative;
    height: 110vh;
    transform: translateY(-120%);
    animation: fall 12s linear infinite backwards;
    animation-delay: var(--delay, 0s);
    will-change: transform;
}

.matrix-column:nth-child(2n) { animation-duration: 14s; }
.matrix-column:nth-child(3n) { animation-duration: 10s; }
.matrix-column:nth-child(5n) { animation-duration: 16s; }

.matrix-char {
    display: block;
    color: #00ff88;
    opacity: 0.12;
    font-size: 12px;
    line-height: 1.25;
    filter: drop-shadow(0 0 1px rgba(0, 255, 136, 0.14));
    animation: glow 3.8s ease-in-out infinite alternate;
}

.matrix-char:nth-child(odd) { opacity: 0.16; }
.matrix-char:nth-child(3n) { opacity: 0.22; }
.matrix-char:nth-child(5n) { opacity: 0.28; }

@keyframes fall {
    0% { transform: translateY(-120%); }
    100% { transform: translateY(100%); }
}

@keyframes glow {
    from { opacity: 0.1; }
    to { opacity: 0.35; }
}

.terminal {
    width: 100%;
    max-width: 1000px;
    background: rgba(5, 8, 6, 0.9);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.05);
    overflow: hidden;
    border: 1px solid #1a1a1a;
    backdrop-filter: blur(4px);
}

.terminal-header {
    background: #0a0a0a;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #1a1a1a;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons .btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn.close { background: #ff5f56; }
.btn.minimize { background: #ffbd2e; }
.btn.maximize { background: #27ca40; }

.terminal-title {
    flex: 1;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.terminal-body {
    padding: 24px;
    color: #e0e0e0;
    line-height: 1.8;
}

.line {
    margin: 20px 0 8px 0;
}

.prompt {
    color: #00ff88;
    font-weight: 600;
}

.command {
    color: #00d4ff;
}

.output {
    padding: 12px 0 12px 20px;
    border-left: 2px solid #1a1a1a;
    margin-left: 8px;
}

h1 {
    font-size: 2.5rem;
    color: #00ff88;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.subtitle {
    font-size: 1.1rem; /* Slightly smaller than the title */
    color: #00ff88 !important; /* Force the color to apply */
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4); /* Similar glow effect */
    margin-bottom: 12px; /* Adjust spacing */
}

.subtitle a {
    color: inherit;
}

.output p {
    margin: 8px 0;
    color: #ccc;
}

.achievements-grid, .projects-grid {
    display: grid;
    gap: 16px;
}

/* National achievements with toggle */
.achievement-item {
    background: #080808;
    border-radius: 6px;
    border: 1px solid #1a1a1a;
    overflow: hidden;
    transition: all 0.3s ease;
}

.achievement-item:hover {
    border-color: #00ff88;
}

.achievement-header {
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.achievement-header:hover {
    background: #0f0f0f;
}

.achievement-summary {
    padding: 0 16px 14px 16px;
}

.achievement-summary p {
    margin: 6px 0;
    color: #ccc;
}

.achievement-summary strong {
    color: #00ff88;
}

.achievement-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    transition: all 0.3s ease;
}

.achievement-item.expanded .achievement-content {
    max-height: 400px;
    padding: 0 16px 16px 16px;
    border-top: 1px solid #1a1a1a;
}

.achievement-content p {
    margin: 8px 0;
}

.achievement-content strong {
    color: #00ff88;
}

.achievement, .project {
    background: #080808;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #1a1a1a;
    transition: all 0.3s ease;
}

.achievement:hover, .project:hover {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

/* Zonal achievements with toggle */
.zonal-grid {
    display: grid;
    gap: 12px;
}

.zonal-item {
    background: #080808;
    border-radius: 6px;
    border: 1px solid #1a1a1a;
    overflow: hidden;
    transition: all 0.3s ease;
}

.zonal-item:hover {
    border-color: #00ff88;
}

.zonal-header {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.zonal-header:hover {
    background: #0f0f0f;
}

.zonal-summary {
    padding: 0 16px 12px 16px;
}

.zonal-summary p {
    margin: 6px 0;
    color: #ccc;
}

.zonal-summary strong {
    color: #ffd700;
}

.toggle-icon {
    color: #00ff88;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.achievement-item.expanded .toggle-icon,
.zonal-item.expanded .toggle-icon {
    transform: rotate(90deg);
}

.zonal-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    transition: all 0.3s ease;
}

.zonal-item.expanded .zonal-content {
    max-height: 200px;
    padding: 0 16px 16px 16px;
    border-top: 1px solid #1a1a1a;
}

.zonal-content p {
    margin: 8px 0;
}

.zonal-content strong {
    color: #ffd700;
}

.file {
    color: #ffd700;
    display: block;
    margin-bottom: 8px;
}

.dir {
    color: #00d4ff;
    display: block;
    margin-bottom: 8px;
}

.achievement strong, .project strong {
    color: #00ff88;
}

.project-image {
    width: 100%;
    height: auto;
    max-height: 55vh;
    object-fit: contain;
    display: block;
    border: 1px solid #1a1a1a;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #ffffff;
}

.project-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 55vh;
    margin-bottom: 12px;
    border: 1px solid #1a1a1a;
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid #00ff88;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #00ff88;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    z-index: 2;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-btn:hover {
    background: #00ff88;
    color: #000;
}

.carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 9px;
    height: 9px;
    border: 1px solid #00ff88;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.carousel-dot.active {
    background: #00ff88;
}

.project-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 14px;
    background: #0f0f0f;
    border: 1px solid #00ff88;
    border-radius: 4px;
    color: #00ff88;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: #00ff88;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.code-block {
    background: #080808;
    border-radius: 6px;
    padding: 16px !important;
    margin-left: 8px;
}

.code-block pre {
    color: #00ff88;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.vision {
    background: linear-gradient(135deg, #0a0a0a 0%, #0d0d0d 100%);
    border-radius: 6px;
    padding: 20px !important;
    border: 1px solid #00ff88;
}

.vision p {
    color: #e0e0e0;
    font-style: italic;
}

.contact a {
    color: #00d4ff;
    text-decoration: none;
    transition: color 0.3s;
}

.contact a:hover {
    color: #00ff88;
    text-decoration: underline;
}

.cursor-line {
    margin-top: 30px;
}

.cursor {
    color: #00ff88;
    animation: blink 1s infinite;
}

.cursor.blink {
    opacity: 0;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Glitch effect for name */
.glitch {
    position: relative;
}

.glitch:hover::before,
.glitch:hover::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.glitch:hover::before {
    color: #ff00ff;
    animation: glitch-1 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch:hover::after {
    color: #00ffff;
    animation: glitch-2 0.3s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
    0% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

@keyframes glitch-2 {
    0% { transform: translateX(0); }
    20% { transform: translateX(3px); }
    40% { transform: translateX(-3px); }
    60% { transform: translateX(1px); }
    80% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .terminal-body {
        padding: 16px;
    }
    
    .output {
        padding-left: 12px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc6a;
}
