:root {
    --bg-color: #080808;
    --card-bg: #121212;
    --text-main: #f0f0f0;
    --text-dim: #999;
    --accent-red: #ff003c;
    --accent-blue: #00f0ff;
    --accent-green: #00ff9d;
    --font-head: 'Montserrat', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    cursor: none; /* Hide default cursor for custom one */
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-red);
    transition: width 0.2s, height 0.2s, top 0.1s, left 0.1s;
}

body:hover .cursor-outline {
    opacity: 1;
}

/* CRT Scanline Effect */
.scanline {
    width: 100%;
    height: 100px;
    z-index: 999;
    background: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(255, 255, 255, 0.04) 50%, rgba(0,0,0,0) 100%);
    opacity: 0.1;
    position: fixed;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% { bottom: 100%; }
    100% { bottom: -100px; }
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: 9998;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
}

/* Nav */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(8, 8, 8, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-family: var(--font-head);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
}
.logo .dot { color: var(--accent-red); }

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    margin-left: 25px;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    position: relative;
}

/* Nav Link Hover Animation */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--accent-blue); }
.nav-links a:hover::after { width: 100%; }

/* Hero */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 10%;
    position: relative;
}

.badge {
    display: inline-block;
    background: #1a1a1a;
    color: var(--accent-green);
    padding: 5px 10px;
    font-size: 0.8rem;
    border: 1px solid var(--accent-green);
    margin-bottom: 20px;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
    animation: slideInDown 1s ease-out;
}

.main-title {
    font-family: var(--font-head);
    font-size: 4.5rem;
    line-height: 0.95;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    animation: fadeIn 1.5s ease-out;
}

.highlight {
    color: transparent;
    -webkit-text-stroke: 2px var(--accent-red);
    position: relative;
    display: inline-block;
}

/* Text Typing Effect Cursor */
.subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 500px;
    min-height: 1.6em; /* Prevent layout jump */
    border-right: 2px solid var(--accent-blue);
    white-space: nowrap;
    overflow: hidden;
    animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-blue); }
}

.cta-group { 
    display: flex; 
    gap: 20px; 
    opacity: 0; /* Hidden initially for JS stagger */
    animation: fadeInUp 1s ease-out 2s forwards;
}

.btn {
    padding: 15px 35px;
    font-family: var(--font-mono);
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: none; /* Custom cursor */
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0%; height: 100%;
    z-index: -1;
    transition: width 0.3s ease;
}

.btn.primary {
    background: var(--accent-red);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.3);
}

.btn.primary::before { background: #fff; }
.btn.primary:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
    box-shadow: 0 0 40px rgba(255, 0, 60, 0.8);
}
.btn.primary:hover::before { width: 100%; }


.btn.secondary {
    border-color: var(--text-dim);
    color: var(--text-main);
}
.btn.secondary::before { background: var(--accent-blue); }
.btn.secondary:hover {
    border-color: var(--accent-blue);
    color: #000;
}
.btn.secondary:hover::before { width: 100%; }

/* Visual */
.hero-visual {
    position: relative;
    width: 350px;
    height: 350px;
}
.visual-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed var(--accent-blue);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotateCircle 20s linear infinite;
}

.visual-circle::before {
    content: '';
    position: absolute;
    width: 110%;
    height: 110%;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
}

.glitch-img {
    width: 280px;
    height: 280px;
    background: url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1470&q=80'); /* Cyberpunk Image */
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
    animation: glitch-anim 5s infinite;
}

.glitch-img::before, .glitch-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: inherit;
    border-radius: 50%;
}

.glitch-img::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-img::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes rotateCircle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideInDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sections */
section { padding: 100px 10%; }
.section-header { margin-bottom: 60px; display: flex; align-items: center; gap: 20px; }
.section-header h2 { font-family: var(--font-head); font-size: 2.5rem; font-weight: 900; text-transform: uppercase; color: #fff; }
.section-header .line { flex-grow: 1; height: 1px; background: #333; transform-origin: left; transform: scaleX(0); transition: transform 1s ease; }
.section-header.visible .line { transform: scaleX(1); }

/* Cards & Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.card {
    background: var(--card-bg);
    padding: 30px;
    border: 1px solid #222;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    opacity: 0; /* JS Fade In */
}
.card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}
.card h3 {
    color: var(--accent-blue);
    margin-bottom: 25px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stability Card (Subtle Gym) */
.status-line {
    font-size: 0.8rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.highlight-green {
    color: var(--accent-green);
    position: relative;
    padding-left: 15px;
}

.highlight-green::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.terminal-box {
    background: #000;
    padding: 15px;
    border: 1px solid #222;
    margin-bottom: 20px;
}

.code-line {
    font-size: 0.8rem;
    color: var(--accent-blue);
    margin-bottom: 5px;
    font-family: var(--font-mono);
}

.subtle-note {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-style: italic;
    border-top: 1px solid #222;
    padding-top: 15px;
}

.data-list { list-style: none; }
.data-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #222;
    font-size: 0.9rem;
}
.data-list li:last-child { border-bottom: none; }
.data-list .label { color: var(--text-dim); }
.data-list .val { font-weight: bold; color: var(--text-main); text-align: right; }

/* Tech Grid */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.tech-item {
    background: #111;
    border: 1px solid #333;
    padding: 15px 30px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.4s;
    cursor: none;
    position: relative;
    overflow: hidden;
    opacity: 0; /* JS Stagger */
    transform: translateY(20px);
}

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

.tech-item:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
    transform: translateY(-5px);
}

.tech-item:hover::after {
    left: 100%;
}

/* Timeline/History */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: #333;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px;
    opacity: 0; /* JS Fade */
    transition: 0.5s;
}
.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-red);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    transition: 0.3s;
}

.timeline-item:hover::after {
    background-color: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red);
}

.left { left: 0; text-align: right; }
.right { left: 50%; }
.right::after { left: -8px; }

.timeline-item .content {
    background: var(--card-bg);
    padding: 20px 30px;
    border: 1px solid #222;
    position: relative;
    transition: 0.3s;
}
.timeline-item .content:hover { border-color: var(--accent-red); transform: scale(1.02); }
.timeline-item h3 { color: var(--accent-red); font-size: 0.9rem; margin-bottom: 5px; }
.timeline-item h4 { font-size: 1.1rem; margin-bottom: 10px; font-weight: bold; }
.timeline-item p { font-size: 0.9rem; color: var(--text-dim); }

/* Interests */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.interest-item {
    background: var(--card-bg);
    padding: 30px;
    text-align: center;
    border: 1px solid #222;
    transition: 0.4s;
    opacity: 0; /* JS Stagger */
    transform: translateY(20px);
}
.interest-item:hover { 
    border-color: var(--accent-blue); 
    transform: translateY(-10px); 
    background: #161616;
}
.interest-item .icon { font-size: 2.5rem; margin-bottom: 20px; color: var(--text-dim); transition: 0.3s; }
.interest-item.game:hover .icon { color: #9d4edd; transform: rotate(15deg) scale(1.2); }
.interest-item.book:hover .icon { color: #ffd60a; transform: scale(1.2); }
.interest-item.chess:hover .icon { color: #fff; transform: translateY(-5px) scale(1.2); }

/* Music */
#music {
    position: relative;
    background: #000;
    overflow: hidden;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}
.music-content {
    display: flex;
    align-items: center;
    gap: 80px;
    z-index: 2;
}
.now-playing { text-align: right; }
.blinking { color: var(--accent-red); font-size: 0.8rem; font-weight: bold; animation: blink 1s infinite; display: block; margin-bottom: 10px; }
@keyframes blink { 50% { opacity: 0; } }

.music-content h2 {
    font-size: 4rem;
    line-height: 0.9;
    font-family: var(--font-head);
    font-weight: 900;
}
.outline { -webkit-text-stroke: 1px #fff; color: transparent; }

.vinyl {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(#222 10%, #050505 70%);
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin 3s linear infinite;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transition: 0.5s;
}

.vinyl:hover {
    box-shadow: 0 0 80px rgba(255, 0, 60, 0.3);
    border-color: var(--accent-red);
}

.vinyl-center {
    width: 80px;
    height: 80px;
    background: var(--accent-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Contact */
.contact-box { max-width: 500px; margin: 0 auto; text-align: center; }
.input-group { margin-bottom: 15px; }
.input-group input {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    padding: 15px;
    color: #fff;
    font-family: var(--font-mono);
    outline: none;
    transition: 0.3s;
}
.input-group input:focus { border-color: var(--accent-green); background: #151515; transform: scale(1.02); }
.socials { margin-top: 40px; font-size: 1.8rem; display: flex; justify-content: center; gap: 30px; }
.socials a { color: var(--text-dim); transition: 0.3s; position: relative; }
.socials a:hover { color: #fff; transform: translateY(-5px); }

/* Animation Utility Classes */
.stagger-1 { transition-delay: 100ms; }
.stagger-2 { transition-delay: 200ms; }
.stagger-3 { transition-delay: 300ms; }
.stagger-4 { transition-delay: 400ms; }
.stagger-5 { transition-delay: 500ms; }
.stagger-6 { transition-delay: 600ms; }

.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

footer { padding: 40px; text-align: center; font-size: 0.7rem; color: #444; border-top: 1px solid #111; }

/* Responsive */
@media (max-width: 900px) {
    .main-title { font-size: 3rem; }
    #hero { flex-direction: column; text-align: center; padding-top: 120px; }
    .hero-visual { display: none; }
    .stats-container { grid-template-columns: 1fr; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 23px; }
    .left { text-align: left; }
    .right { left: 0%; }
    .grid-3 { grid-template-columns: 1fr; }
    .music-content { flex-direction: column; gap: 40px; text-align: center; }
    .now-playing { text-align: center; }
    
    /* Disable custom cursor on mobile */
    .cursor-dot, .cursor-outline { display: none; }
    * { cursor: auto; }
}
