:root {
    --bg-color: #050505;
    --bg-overlay: linear-gradient(to bottom, rgba(5, 5, 5, 0.1), rgba(5, 5, 5, 0.4));
    --primary: #00ffcc;
    --secondary: #ff00ff;
    --text: #ffffff;
    --text-muted: #aaaaaa;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body.light-mode {
    --bg-color: #f0f4f8;
    --bg-overlay: linear-gradient(to bottom, rgba(240, 244, 248, 0.85), rgba(240, 244, 248, 0.95));
    --primary: #00997a;
    --secondary: #d600d6;
    --text: #1a202c;
    --text-muted: #4a5568;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

h1, h2, h3, h4, h5, .stat-number, .glitch {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.5px;
}

body {
    background-color: var(--bg-color);
    background-image: var(--bg-overlay), url('universe_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.4s ease, color 0.4s ease, background-image 0.4s ease;
}

/* Custom Comet Cursor */
body, a, button, .theme-toggle, .location, .contact-badge {
    cursor: none !important;
}

.comet-cursor {
    position: fixed;
    top: -50px;
    left: -50px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 
        0 0 10px #ffffff,
        0 0 20px var(--primary),
        0 0 35px var(--primary),
        0 0 50px var(--secondary);
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    mix-blend-mode: screen;
}

.comet-cursor.active {
    width: 24px;
    height: 24px;
    background: #ffe6ff;
    box-shadow: 
        0 0 20px #ffffff,
        0 0 40px var(--secondary), 
        0 0 70px var(--primary);
}

/* Outer Glow/Plume of the comet tail */
.comet-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--tail-length, 0px);
    height: 20px;
    background: linear-gradient(to right, rgba(255,255,255,0.9), var(--primary), var(--secondary), transparent);
    transform-origin: left center;
    transform: translateY(-50%) rotate(var(--tail-angle, 0deg));
    filter: blur(3px);
    clip-path: polygon(0 10%, 100% 50%, 0 90%);
    z-index: -1;
    pointer-events: none;
    transition: width 0.1s ease-out;
}

/* Inner super-hot core of the comet tail */
.comet-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(var(--tail-length, 0px) * 0.5);
    height: 6px;
    background: linear-gradient(to right, #ffffff, #aaffff, transparent);
    transform-origin: left center;
    transform: translateY(-50%) rotate(var(--tail-angle, 0deg));
    filter: blur(1px);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    z-index: 0;
    pointer-events: none;
    transition: width 0.1s ease-out;
}

body.light-mode .comet-cursor {
    mix-blend-mode: normal;
    box-shadow: 
        0 0 10px #ffffff,
        0 0 20px var(--primary),
        0 0 40px #00997a;
}

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

.glass-container {
    max-width: 1400px;
    width: 95%;
    margin: 20px auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 50px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
    animation: fadeIn 1s ease-out;
    transition: background 0.4s ease, border 0.4s ease;
}

.theme-toggle {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.theme-toggle:hover {
    color: var(--primary);
    transform: scale(1.1);
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-container {
    margin-bottom: 25px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 12px;
}

.profile-container::before,
.profile-container::after {
    content: '';
    position: absolute;
    width: 174px;
    height: 174px;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
}

.profile-container::before {
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    animation: rotate-ring 6s linear infinite;
}

.profile-container::after {
    border-bottom-color: var(--secondary);
    border-left-color: var(--secondary);
    animation: rotate-ring 4s linear infinite reverse;
}

@keyframes rotate-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

body.light-mode .profile-pic {
    box-shadow: 0 0 20px rgba(0, 153, 122, 0.4);
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.6);
    border-color: var(--secondary);
}

body.light-mode .profile-pic:hover {
    box-shadow: 0 0 30px rgba(214, 0, 214, 0.6);
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00ffcc, #ffd700, #00997a, #00ffcc);
    background-size: 300% 100%;
    animation: gradientText 6s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

body.light-mode h1 {
    background: linear-gradient(90deg, #008a6e, #c79e00, #006652, #008a6e);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: inline-block;
    padding: 8px 25px;
    background: rgba(0, 255, 204, 0.05);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 30px;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.1);
}

body.light-mode .subtitle {
    background: rgba(0, 153, 122, 0.05);
    border: 1px solid rgba(0, 153, 122, 0.3);
    box-shadow: 0 0 15px rgba(0, 153, 122, 0.1);
}

.bio-text {
    max-width: 800px;
    margin: 0 auto 25px auto;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.contact-badge {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-decoration: none;
    background: rgba(128, 128, 128, 0.05);
    padding: 8px 18px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(128, 128, 128, 0.2);
    transition: all 0.3s ease;
}

.contact-badge i {
    color: var(--primary);
    font-size: 1.1rem;
}

.contact-badge:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: var(--primary);
    color: var(--text);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
    transform: translateY(-2px);
}

body.light-mode .contact-badge:hover {
    background: rgba(0, 153, 122, 0.1);
    box-shadow: 0 0 15px rgba(0, 153, 122, 0.3);
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 i {
    color: var(--primary);
}

/* INFOGRAPHIC ABOUT SECTION */
.about-infographic {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    justify-content: space-between;
}

.info-card {
    flex: 1;
    background: rgba(128, 128, 128, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.info-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 1.2rem;
    justify-content: center;
    margin-bottom: 10px;
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.info-card span {
    font-size: 0.8rem;
    background: var(--secondary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
}

/* INFOGRAPHIC SKILLS SECTION */
.skills-infographic {
    margin-bottom: 50px;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-bar-container {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 1rem;
    color: var(--text);
}

.progress-bg {
    width: 100%;
    height: 10px;
    background: rgba(128, 128, 128, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0; /* Animated via JS */
    border-radius: 5px;
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.1, 1);
}

/* INFOGRAPHIC EXPERIENCE & PROJECTS */
.experience-projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-icon {
    position: absolute;
    left: -39px;
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--bg-color);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.8rem;
    z-index: 1;
}

.timeline-content {
    background: rgba(128, 128, 128, 0.05);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 12px;
}

.timeline-item .date {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 600;
}

.timeline-item h4 {
    font-size: 1.2rem;
    margin-bottom: 2px;
    color: var(--text);
}

.timeline-item h5 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 5px;
}

.timeline-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.project-block {
    margin-bottom: 30px;
}

.project-block h4 {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--glass-border);
    padding-bottom: 5px;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-box {
    background: rgba(128, 128, 128, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--secondary);
    transform: scale(1.05);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.stat-box div {
    display: inline-block;
}

.stat-box span {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: inline-block;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hobbies-section {
    margin-bottom: 50px;
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.hobby-box {
    background: rgba(128, 128, 128, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hobby-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.1);
}

body.light-mode .hobby-box:hover {
    box-shadow: 0 10px 30px rgba(0, 153, 122, 0.1);
}

.hobby-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.hobby-box:hover .hobby-icon {
    transform: scale(1.1) rotate(5deg);
}

.hobby-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.hobby-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.philosophy-card {
    background: rgba(128, 128, 128, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.philosophy-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.1);
}

body.light-mode .philosophy-card:hover {
    box-shadow: 0 10px 30px rgba(0, 153, 122, 0.1);
}

.atom-animation {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px auto;
    position: relative;
    transform-style: preserve-3d;
}

.nucleus {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--primary);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.9); box-shadow: 0 0 15px var(--primary); }
    100% { transform: translate(-50%, -50%) scale(1.1); box-shadow: 0 0 30px var(--primary); }
}

.electron {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 255, 204, 0.4);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: orbit 4s linear infinite;
}

body.light-mode .electron {
    border: 2px solid rgba(0, 153, 122, 0.4);
}

.electron-1 { --y-angle: 0deg; transform: rotateX(70deg) rotateY(0deg); }
.electron-2 { --y-angle: 60deg; transform: rotateX(70deg) rotateY(60deg); }
.electron-3 { --y-angle: 120deg; transform: rotateX(70deg) rotateY(120deg); }

@keyframes orbit {
    0% { transform: rotateX(70deg) rotateY(var(--y-angle)) rotateZ(0deg); }
    100% { transform: rotateX(70deg) rotateY(var(--y-angle)) rotateZ(360deg); }
}

.quote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.6;
    margin-top: 25px;
}

.quote cite {
    display: block;
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    font-style: normal;
}

.cert-card {
    background: rgba(128, 128, 128, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.cert-card:hover {
    border-color: #ffd700;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.15);
    transform: translateY(-3px);
}

.cert-icon {
    font-size: 2.5rem;
    color: #ffd700;
}

.cert-info h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.cert-issuer {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.cert-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.glow-tag {
    padding: 8px 16px;
    background: rgba(0, 255, 204, 0.05);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text);
    transition: all 0.3s ease;
    cursor: default;
}

.glow-tag:hover {
    background: rgba(0, 255, 204, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
}

body.light-mode .glow-tag {
    background: rgba(0, 153, 122, 0.05);
    border-color: rgba(0, 153, 122, 0.3);
}

body.light-mode .glow-tag:hover {
    background: rgba(0, 153, 122, 0.15);
    box-shadow: 0 0 15px rgba(0, 153, 122, 0.4);
}

footer {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .experience-projects, .about-infographic {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .stats-grid, .hobbies-grid {
        grid-template-columns: 1fr;
    }
    .glass-container {
        margin: 20px;
        padding: 30px;
    }
    h1 {
        font-size: 3rem;
    }
}
