/* Import navigation styles */
@import url('/assets/css/navigation.css');

:root {
    --primary: #00ff41;
    --secondary: #00d4ff;
    --bg-dark: #0a0a0a;
    --bg-medium: #1a1a1a;
    --text-light: #e0e0e0;
    --accent: #ff00ff;
}

/* Light mode colors */
[data-theme="light"] {
    --bg-dark: #ffffff;
    --bg-medium: #f5f5f5;
    --text-light: #1a1a1a;
    --primary: #00a631;
    --secondary: #0084a8;
    --accent: #d400d4;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 65, 0.03) 2px,
            rgba(0, 255, 65, 0.03) 4px
        );
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 166, 49, 0.03) 2px,
            rgba(0, 166, 49, 0.03) 4px
        );
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
}

header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
}

@media (max-width: 640px) {
    header {
        margin-bottom: 2rem;
        padding: 2rem 0;
    }
}

.glitch {
    font-family: 'Space Mono', monospace;
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: var(--primary);
    letter-spacing: 0.05em;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

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

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--secondary);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--accent);
    z-index: -2;
}

@keyframes glitch-1 {
    0% {
        clip-path: inset(40% 0 61% 0);
        transform: translate(-2px, -2px);
    }
    20% {
        clip-path: inset(92% 0 1% 0);
        transform: translate(2px, 2px);
    }
    40% {
        clip-path: inset(43% 0 1% 0);
        transform: translate(-2px, 2px);
    }
    60% {
        clip-path: inset(25% 0 58% 0);
        transform: translate(2px, -2px);
    }
    80% {
        clip-path: inset(54% 0 7% 0);
        transform: translate(-2px, 2px);
    }
    100% {
        clip-path: inset(58% 0 43% 0);
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {
    0% {
        clip-path: inset(65% 0 8% 0);
        transform: translate(2px, -2px);
    }
    20% {
        clip-path: inset(24% 0 63% 0);
        transform: translate(-2px, 2px);
    }
    40% {
        clip-path: inset(75% 0 5% 0);
        transform: translate(2px, 2px);
    }
    60% {
        clip-path: inset(14% 0 80% 0);
        transform: translate(-2px, -2px);
    }
    80% {
        clip-path: inset(90% 0 3% 0);
        transform: translate(2px, 2px);
    }
    100% {
        clip-path: inset(33% 0 62% 0);
        transform: translate(-2px, -2px);
    }
}

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

.tagline {
    font-size: 1.2rem;
    margin-top: 1rem;
    color: var(--secondary);
    font-weight: 300;
}

section {
    margin-bottom: 3rem;
    background: var(--bg-medium);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 65, 0.2);
    position: relative;
    overflow: hidden;
}

@media (max-width: 640px) {
    section {
        margin-bottom: 2rem;
        padding: 1.5rem;
    }
}

section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.02;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

h2 {
    font-family: 'Space Mono', monospace;
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.bio p {
    line-height: 1.8;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 1rem;
}

.stat .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: 'Space Mono', monospace;
}

@media (max-width: 640px) {
    .stat .number {
        font-size: 2rem;
    }
}

.stat .label {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.fact-list {
    list-style: none;
}

.fact-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.fact-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-family: 'Space Mono', monospace;
    font-weight: 700;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-item {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(0, 255, 65, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 255, 65, 0.3);
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
}

.terminal-cursor {
    font-family: 'Space Mono', monospace;
    color: var(--primary);
}

.cursor {
    animation: blink 1s infinite;
}

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

/* Dark mode toggle */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-medium);
    border: 1px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--primary);
    transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
    transform: rotate(30deg);
}

/* Portfolio preview cards */
.portfolio-preview {
    margin-top: 3rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.portfolio-card {
    background: var(--bg-medium);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    transition: left 0.5s ease;
}

.portfolio-card:hover::before {
    left: 100%;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(0, 255, 65, 0.2);
}

.portfolio-card.featured {
    border-color: var(--secondary);
    box-shadow: 0 2px 8px rgba(255, 204, 0, 0.1);
}

.portfolio-card.featured:hover {
    box-shadow: 0 8px 16px rgba(255, 204, 0, 0.2);
}

.portfolio-card h3 {
    font-family: 'Space Mono', monospace;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.portfolio-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.portfolio-card .card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--primary);
    font-family: 'Space Mono', monospace;
}

.portfolio-card .card-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Recent posts section */
.recent-posts {
    margin-top: 3rem;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.post-item {
    padding: 1rem;
    background: rgba(0, 255, 65, 0.05);
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.post-item:hover {
    background: rgba(0, 255, 65, 0.1);
    transform: translateX(4px);
}

.post-date {
    font-size: 0.85rem;
    color: var(--secondary);
    font-family: 'Space Mono', monospace;
}

.post-title {
    font-size: 1.1rem;
    margin: 0.3rem 0;
    color: var(--text-light);
}

.post-preview {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .stat {
        margin-bottom: 1rem;
    }
    
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}