/* --- VARIABLES & RESET --- */
:root {
    --bg-main: #030610; /* Deepest Midnight Blue almost pure black */
    --bg-glass: rgba(10, 16, 32, 0.6);
    --bg-glass-hover: rgba(15, 24, 48, 0.8);
    
    /* Cyber/Space Accents -> Deep Intelligence Palette */
    --color-cyan: #00A3FF;      /* Data Blue */
    --color-magenta: #FF4444;   /* Alert Red/Coral */
    --color-purple: #101c36;    /* Deep Midnight Box */
    --color-accent-mix: linear-gradient(135deg, var(--color-cyan), var(--color-magenta));
    
    --text-main: #E2E8F0;
    --text-muted: #8B9BB4;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    
    /* Shape Variables */
    --border-radius-base: 4px;
    --border-radius-lg: 6px;
    --border-radius-btn: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Custom cursor */
}

html {
    scroll-behavior: auto;
}

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

::selection {
    background: var(--color-cyan);
    color: #000;
}

/* --- CUSTOM CURSOR --- */
#cursor, #cursor-blur {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
}

#cursor {
    width: 14px; height: 14px;
    background-color: transparent;
    border: 1px solid var(--color-cyan);
    border-radius: var(--border-radius-base); /* Square logic on cursor too */
    transition: width 0.15s, height 0.15s, border-color 0.15s;
    backdrop-filter: invert(1);
}

#cursor-blur {
    width: 300px; height: 300px;
    background: radial-gradient(circle at center, rgba(0, 163, 255, 0.08) 0%, rgba(0,0,0,0) 60%);
    filter: blur(40px);
    transition: transform 0.1s ease-out;
    z-index: -1;
}

body.hovering #cursor {
    width: 34px; height: 34px;
    background-color: rgba(0, 163, 255, 0.05);
    border: 1px dashed var(--color-cyan);
}

/* --- CANVAS & BACKGROUND --- */
#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
}

/* Vignette overlay for depth, instead of loud noise */
.overlay-noise {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-main) 130%);
    pointer-events: none;
    z-index: -1;
}

/* Removed Orbs - too "magical space", replaced by pure geometric background in canvas */
.orb { display: none; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); border-left: 1px solid rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb { background: #1a2a47; border-radius: var(--border-radius-base); }
::-webkit-scrollbar-thumb:hover { background: var(--color-cyan); }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 500; }

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -1px; line-height: 1.1; margin-bottom: 20px;}
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.5px; margin-bottom: 40px; display: flex; align-items: center; gap: 15px; }

.text-stroke {
    color: var(--color-cyan);
    font-size: 0.8em;
    font-family: var(--font-code);
    opacity: 0.7;
}

.highlight-neon {
    color: var(--text-main);
    border-bottom: 2px solid var(--color-cyan);
    padding-bottom: 2px;
}

/* --- BUTTONS --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: transparent;
    border: 1px solid rgba(0, 163, 255, 0.4);
    color: var(--color-cyan);
    text-decoration: none;
    font-family: var(--font-code);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--border-radius-btn);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--color-cyan);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}

.btn-primary:hover {
    color: #000;
    box-shadow: 0 0 20px rgba(0, 163, 255, 0.2);
}

.btn-primary:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-primary.huge { padding: 16px 32px; font-size: 1rem; }

/* --- NAVIGATION --- */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    width: 100%;
    top: 0; z-index: 100;
    background: rgba(3, 6, 16, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    border-radius: 0 0 var(--border-radius-base) var(--border-radius-base);
    transition: all 0.4s ease;
}

.glass-nav.scrolled {
    padding: 12px 5%;
    background: rgba(3, 6, 16, 0.95);
    border-bottom-color: rgba(0, 163, 255, 0.2);
}

.logo {
    font-family: var(--font-code);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
}

.logo-bracket { color: var(--color-cyan); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { 
    color: var(--text-muted); 
    text-decoration: none; 
    font-size: 0.85rem; 
    font-family: var(--font-code); 
    text-transform: uppercase;
    transition: color 0.3s; 
}
.nav-links a:hover { color: var(--color-cyan); }
.btn-contact {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 16px;
    border-radius: var(--border-radius-btn);
}
.btn-contact:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main) !important;
}

.menu-toggle { display: none; font-size: 1.8rem; color: var(--text-main); }
.mobile-nav {
    position: fixed; top: 0; right: -100%;
    width: 100vw; height: 100vh;
    background: var(--bg-main);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px;
    z-index: 99; transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}
.mobile-nav.open { right: 0; }
.mobile-nav a { font-family: var(--font-code); font-size: 2rem; color: var(--text-main); text-decoration: none; text-transform: uppercase; }

/* --- HERO SECTION --- */
.section { padding: 150px 5% 60px; max-width: 1200px; margin: 0 auto; position: relative; }

.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; }

.profile-wrapper { position: relative; width: 140px; height: 140px; margin-bottom: 30px; }
.profile-img { width: 100%; height: 100%; border-radius: var(--border-radius-base); object-fit: cover; border: 1px solid rgba(0, 163, 255, 0.3); position: relative; z-index: 2; transition: border-radius 0.4s; }
.profile-glow {
    position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: var(--border-radius-base);
    background: rgba(0, 163, 255, 0.1);
    border: 1px dashed rgba(0, 163, 255, 0.4);
    z-index: 1;
    transition: border-radius 0.4s;
}

/* Subtle glitch on text instead of messy RGB shift */
.glitch { position: relative; }

.typing-container { font-family: var(--font-code); font-size: 1rem; color: var(--color-cyan); margin-bottom: 40px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; background: rgba(0, 163, 255, 0.05); padding: 5px 15px; border-radius: var(--border-radius-btn); border-left: 2px solid var(--color-cyan); width: fit-content; }
.code-icon { color: var(--color-cyan); }
.cursor-type { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-cta { display: flex; align-items: center; gap: 30px; }
.social-links-hero a { color: var(--text-muted); font-size: 1.5rem; transition: color 0.3s; }
.social-links-hero a:hover { color: var(--color-cyan); }

.scroll-indicator { position: absolute; bottom: 40px; right: 5%; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--font-code); font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); opacity: 0.6; }
.mouse { width: 20px; height: 32px; border: 1px solid var(--text-muted); border-radius: var(--border-radius-btn); display: flex; justify-content: center; padding-top: 5px; }
.wheel { width: 2px; height: 6px; background: var(--text-muted); border-radius: 1px; animation: scrollDown 2s infinite cubic-bezier(0.15, 0.41, 0.69, 0.94); }
@keyframes scrollDown { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

/* --- SECTIONS H2 & LAYOUT --- */
.line { flex-grow: 1; height: 1px; background: var(--text-muted); opacity: 0.2; }

/* --- ACRYLIC DASHBOARD CARDS --- */
.glass-card {
    background: var(--bg-glass);
    border: 1px solid rgba(255,255,255,0.04);
    border-top: 1px solid rgba(255,255,255,0.08); /* slight glossy top edge */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-radius 0.4s ease, border-color 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.glass-card:hover {
    border-color: rgba(0, 163, 255, 0.2);
}

.card-glare {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 10;
}
.glass-card:hover .card-glare { opacity: 1; }
.card-content { position: relative; z-index: 2; transform: translateZ(20px); }

/* --- ABOUT --- */
.about-grid { display: grid; grid-template-columns: 2fr 1.2fr; gap: 20px; }
.about-card { padding-top: 25px; }
.about-card p { margin-bottom: 20px; font-size: 1rem; color: var(--text-muted); }
.about-card p:last-child { margin-bottom: 0; }
.card-icon { font-size: 1.8rem; color: var(--color-cyan); margin-bottom: 20px; display: inline-block; }

.stats-card h3 { margin-bottom: 25px; font-size: 1.2rem; font-family: var(--font-code); color: var(--color-cyan); font-weight: 400; text-transform: uppercase; letter-spacing: 1px;}
.focus-list { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.focus-list li { display: flex; align-items: center; gap: 15px; font-family: var(--font-code); color: var(--text-main); font-size: 0.9rem;}
.focus-list i { color: var(--color-cyan); font-size: 1.2rem; width: 25px; text-align: center; }

/* --- SKILLS & PROJECTS (HORIZONTAL SCROLL) --- */
.horizontal-scroll-container { position: relative; display: flex; align-items: center; margin: 0 -5%; padding: 0 5%; }
.scroll-track { display: flex; gap: 20px; overflow-x: auto; padding: 20px 0 40px; scroll-snap-type: x mandatory; scrollbar-width: none; flex-grow: 1; }
.scroll-track::-webkit-scrollbar { display: none; }

.nav-btn {
    background: var(--bg-glass); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--border-radius-base);
    width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; color: var(--text-muted); font-size: 1.5rem;
    position: absolute; z-index: 10; backdrop-filter: blur(5px); transition: all 0.2s;
}
.nav-btn:hover { background: rgba(0, 163, 255, 0.1); color: var(--color-cyan); border-color: var(--color-cyan); }
.prev-btn { left: 2%; } .next-btn { right: 2%; }

.skill-card, .project-card { min-width: 320px; scroll-snap-align: start; flex-shrink: 0; }
.skill-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px;}
.skill-header h3 { font-size: 1.2rem; }
.icon-box { font-size: 1.6rem; color: var(--accent, var(--color-cyan)); }
.skill-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 25px; min-height: 60px;}
.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tags span { padding: 4px 10px; border: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.3); border-radius: var(--border-radius-base); font-family: var(--font-code); font-size: 0.75rem; color: var(--text-muted); transition: border-radius 0.4s; }

.project-year { font-family: var(--font-code); color: var(--color-cyan); font-size: 0.8rem; margin-bottom: 15px; display: block; opacity: 0.8; }
.project-card h3 { font-size: 1.4rem; margin-bottom: 10px; }
.project-card p { color: var(--text-muted); margin-bottom: 25px; min-height: 60px; font-size: 0.9rem; }
.cyber-link { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-code); color: var(--color-cyan); font-size: 0.85rem; text-decoration: none; padding: 6px 12px; background: rgba(0, 163, 255, 0.05); border: 1px solid rgba(0, 163, 255, 0.2); border-radius: var(--border-radius-btn); transition: all 0.2s; }
.cyber-link:hover { background: rgba(0, 163, 255, 0.15); }

.blur-fade { border: 1px dashed rgba(255,255,255,0.1); background: transparent; }
.soon-content { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; height: 100%; opacity: 0.6; }
.pulse-ring { width: 12px; height: 12px; background: var(--color-magenta); border-radius: 50%; margin-bottom: 15px; box-shadow: 0 0 10px var(--color-magenta); animation: pulse-dot 2s infinite ease-out; }
@keyframes pulse-dot { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

/* --- CONTACT --- */
.contact-wrapper { padding: 60px 40px; margin-top: 20px; border-left: 3px solid var(--color-cyan); }
.text-center { text-align: left; display: flex; flex-direction: column; align-items: flex-start;}
.contact-wrapper p { color: var(--text-muted); font-size: 1rem; max-width: 500px; margin: 0 0 30px; }

/* --- OPERATIONS LOG & INTEL --- */
.operations-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.operations-grid.single-card { grid-template-columns: 1fr; }
.thm-badge-container img:hover { transform: scale(1.02); border-color: var(--color-cyan); }

/* Log Terminal */
.log-header { font-family: var(--font-code); font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.log-terminal { font-family: var(--font-code); font-size: 0.8rem; line-height: 1.8; display: flex; flex-direction: column; gap: 8px; }
.log-entry { display: flex; gap: 10px; word-wrap: break-word; }
.log-time { color: var(--text-muted); opacity: 0.7; }
.log-level { font-weight: bold; min-width: 60px; }
.log-level.info { color: var(--color-cyan); }
.log-level.success { color: #00ff41; }
.log-level.warn { color: var(--color-magenta); }
.log-msg { color: var(--text-main); }
.blinking-cursor { animation: blink 1s step-end infinite; color: var(--color-cyan); }

/* CTF Stats */
.ctf-card { display: flex; flex-direction: column; justify-content: center; }
.ctf-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 25px; }
.ctf-stats-wrapper { display: flex; align-items: center; gap: 30px; }
.ctf-ring-container { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.progress-ring { transform: rotate(-90deg); overflow: visible; }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.05); stroke-width: 6; }
.ring-progress { fill: none; stroke: var(--color-magenta); stroke-width: 6; stroke-linecap: square; stroke-dasharray: 213; stroke-dashoffset: 213; transition: stroke-dashoffset 1.5s cubic-bezier(0.86, 0, 0.07, 1); }
.ring-content { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; font-family: var(--font-code); font-size: 0.75rem; color: var(--text-main); }
.ctf-details { display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.ctf-row { display: flex; justify-content: space-between; font-family: var(--font-code); font-size: 0.8rem; border-bottom: 1px dotted rgba(255,255,255,0.05); padding-bottom: 5px; }
.ctf-label { color: var(--text-muted); }
.ctf-val { color: var(--text-main); }
.ctf-val.highlight { color: var(--color-cyan); }

/* --- SERVER STATUS WIDGET --- */
.server-status-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(3, 6, 16, 0.85);
    border: 1px solid rgba(0, 163, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-base);
    padding: 15px 20px;
    z-index: 99;
    font-family: var(--font-code);
    min-width: 200px;
    pointer-events: none;
}
.status-header { font-size: 0.75rem; color: var(--text-muted); border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.status-blinker { width: 8px; height: 8px; background: #00ff41; border-radius: 50%; box-shadow: 0 0 8px #00ff41; animation: pulse-blinker 2s infinite ease-out; margin: 0 auto 0 10px;}
@keyframes pulse-blinker { 0% { opacity: 1; } 50% { opacity: 0.2; } 100% { opacity: 1; } }
.status-data { display: flex; flex-direction: column; gap: 6px; }
.data-row { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }
.data-value { color: var(--text-main); }
.data-value.highlight { color: var(--color-cyan); }

/* --- FOOTER --- */
footer { padding: 30px 5%; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 80px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.footer-logo { font-family: var(--font-code); color: var(--text-muted); font-size: 0.8rem; }
.footer-social { display: flex; gap: 20px; }
.footer-social a { color: var(--text-muted); font-size: 1.2rem; transition: color 0.3s; }
.footer-social a:hover { color: var(--color-cyan); transform: translateY(-3px); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .about-grid, .operations-grid { grid-template-columns: 1fr; }
    .hero { align-items: center; text-align: center; }
    .typing-container { margin: 0 auto 40px; }
    .contact-wrapper { border-left: none; border-top: 3px solid var(--color-cyan); }
    .text-center { align-items: center; text-align: center; }
    .server-status-widget { display: none; /* Hide on mobile to free up space */ }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    h1 { font-size: 2.5rem; }
    .profile-wrapper { width: 120px; height: 120px; }
    .section { padding: 100px 5% 40px; }
    .nav-btn { display: none; }
    .skill-card, .project-card { min-width: 280px; }
    #cursor, #cursor-blur { display: none; }
    * { cursor: auto !important; }
}
