/* CSS Variables & Theme Definition */
:root {
    /* Deep space background */
    --bg-dark: #07050f;
    --bg-light: #120e2b;
    
    /* Neon Accents */
    --cyan: #00f3ff;
    --purple: #bc13fe;
    --magenta: #ff007f;
    
    /* Typography */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Glassmorphism */
    --glass-bg: rgba(18, 14, 43, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, .logo, .hero-badge, .timeline-date, .badge {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

/* --- Atmospheric Background Effects --- */
.bg-layer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(188, 19, 254, 0.08), transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(0, 243, 255, 0.08), transparent 50%);
    z-index: -3;
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--purple);
    top: -50px;
    left: -50px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--cyan);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(30px) translateX(20px); }
}

/* --- Glassmorphism Core Utilities --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* Advanced Hover Tech Effect */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.03), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
}

.hover-glow:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 243, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 243, 255, 0.15), inset 0 0 15px rgba(0, 243, 255, 0.05);
}

.hover-glow:hover::before {
    left: 150%;
}

/* Glowing Border Wrapper Element */
.glowing-border {
    position: relative;
}
.glowing-border::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(45deg, var(--cyan), var(--purple), var(--cyan));
    background-size: 200% 200%;
    z-index: -1;
    animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Header & Navigation --- */
.glass-header {
    position: fixed;
    top: 0; width: 100%;
    background: rgba(7, 5, 15, 0.75);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}
.logo span {
    color: var(--cyan);
    text-shadow: 0 0 15px var(--cyan);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--cyan);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--cyan);
}
.nav-links a:hover {
    color: var(--cyan);
}
.nav-links a:hover::after {
    width: 100%;
}

/* --- Shared Section Styling --- */
.section {
    padding: 8rem 5% 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
    color: var(--text-main);
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}
.section-title span {
    color: var(--purple);
    font-size: 1.6rem;
    vertical-align: top;
    text-shadow: 0 0 15px var(--purple);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    max-width: 850px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(188, 19, 254, 0.15);
    border: 1px solid var(--purple);
    border-radius: 20px;
    color: var(--purple);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.3);
}

.glitch {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    position: relative;
    display: inline-block;
}

/* Glitch Pseudo Elements */
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg-dark); /* blend inside card is tricky, so keeping simple */
    opacity: 0.8;
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyan);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--magenta);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 80px, 0); }
    20% { clip: rect(40px, 9999px, 10px, 0); }
    40% { clip: rect(80px, 9999px, 50px, 0); }
    60% { clip: rect(30px, 9999px, 90px, 0); }
    80% { clip: rect(90px, 9999px, 20px, 0); }
    100% { clip: rect(20px, 9999px, 60px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(60px, 9999px, 10px, 0); }
    20% { clip: rect(10px, 9999px, 80px, 0); }
    40% { clip: rect(90px, 9999px, 30px, 0); }
    60% { clip: rect(40px, 9999px, 70px, 0); }
    80% { clip: rect(20px, 9999px, 50px, 0); }
    100% { clip: rect(80px, 9999px, 40px, 0); }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--cyan);
    letter-spacing: 5px;
    margin-bottom: 2.5rem;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.4);
}

.motto-container {
    min-height: 50px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
    position: relative;
}

.motto-container::before {
    content: '';
    position: absolute;
    top: -1px; left: 50%; transform: translateX(-50%);
    width: 100px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.typing-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-family: 'Inter', monospace;
    font-weight: 300;
}
.typing-text::after {
    content: '_';
    color: var(--cyan);
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- Skills Grid --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

.skill-card h3 {
    color: var(--cyan);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.neon-list {
    list-style: none;
}
.neon-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}
.neon-list li strong {
    color: var(--text-main);
}
.neon-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--purple);
    font-weight: bold;
    text-shadow: 0 0 8px var(--purple);
}

/* --- Vertical Timeline --- */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--cyan), var(--purple), transparent);
    top: 0; bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 20px 50px;
    position: relative;
    width: 50%;
}
.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--bg-dark);
    border: 3px solid var(--purple);
    border-radius: 50%;
    top: 50%; transform: translateY(-50%);
    box-shadow: 0 0 15px var(--purple), inset 0 0 5px var(--purple);
    z-index: 1;
}
.timeline-item.left::after { right: -10px; }
.timeline-item.right::after { left: -10px; }

.timeline-date {
    display: inline-block;
    color: var(--magenta);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
}

.timeline-content h3 {
    color: var(--text-main);
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}
.timeline-content h4 {
    color: var(--cyan);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 400;
}
.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Education Grid --- */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.edu-card {
    text-align: center;
    position: relative;
}
.edu-card h3 {
    color: var(--text-main);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.edu-card h4 {
    color: var(--purple);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 400;
}
.edu-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1rem;
}
.badge {
    position: absolute;
    top: -12px; right: -12px;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.4);
}

/* --- Footer --- */
.glass-footer {
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 6rem;
    border-top: 1px solid var(--glass-border);
    position: relative;
    background: rgba(7, 5, 15, 0.5);
    backdrop-filter: blur(10px);
}
.glass-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-glow {
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 2px;
    background: radial-gradient(ellipse at center, var(--cyan), transparent 70%);
    box-shadow: 0 -5px 20px var(--cyan);
}

/* --- SCROLL REVEAL ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.5s; }

/* --- RESPONSIVENESS --- */
@media screen and (max-width: 900px) {
    .timeline::after { left: 40px; }
    .timeline-item { width: 100%; padding-left: 90px; padding-right: 20px; text-align: left; }
    .timeline-item.left::after, .timeline-item.right::after { 
        left: 30px; 
        top: 40px; 
        transform: translateY(0); 
    }
    .timeline-item.right { left: 0%; }
}

@media screen and (max-width: 768px) {
    .nav-links { display: none; } /* Mobile menu handling omitted for simplicity */
    .glitch { font-size: 2rem; }
    .glitch::before, .glitch::after { display: none; } /* Better performance on mobile */
    .section { padding: 5rem 5% 3rem; }
    .glass-card { padding: 1.5rem; }
}
