* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

/* ========== TRANSITION ANIMATION ========== */
.transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    pointer-events: none;
}

.transition-row {
    flex: 1;
    display: flex;
}

.transition-row.row-1 .block {
    transform-origin: top;
}

.transition-row.row-2 .block {
    transform-origin: bottom;
}

.block {
    flex: 1;
    background: linear-gradient(135deg, var(--main-color));
    will-change: transform;
}

/* Default Dark Theme */
:root {
    --bg-color: #060b18;
    --bg-deep: #040810;
    --second-bg-color: #0a1225;
    --text-color: #e8edf5;
    --text-muted: #8892a8;
    --main-color: #00abf0;
    --main-glow: rgba(0, 171, 240, 0.35);
    --main-glow-soft: rgba(0, 171, 240, 0.12);
    --glass-bg: rgba(12, 22, 48, 0.65);
    --glass-border: rgba(0, 171, 240, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.04);
    --orb-1: rgba(0, 120, 255, 0.08);
    --orb-2: rgba(0, 200, 180, 0.06);
    --orb-3: rgba(100, 60, 255, 0.07);
    --grid-color: rgba(0, 171, 240, 0.03);
    --noise-opacity: 0.025;
}

/* Light Theme */
.light-mode {
    --bg-color: #eef3fa;
    --bg-deep: #dfe8f4;
    --second-bg-color: #e3ecf7;
    --text-color: #1a2a44;
    --text-muted: #5a6a82;
    --main-color: #0288d1;
    --main-glow: rgba(2, 136, 209, 0.25);
    --main-glow-soft: rgba(2, 136, 209, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(2, 136, 209, 0.2);
    --glass-highlight: rgba(255, 255, 255, 0.5);
    --orb-1: rgba(2, 136, 209, 0.06);
    --orb-2: rgba(0, 180, 160, 0.05);
    --orb-3: rgba(100, 60, 200, 0.05);
    --grid-color: rgba(2, 136, 209, 0.04);
    --noise-opacity: 0.015;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
    min-height: 100vh;
}

/* ========== ANIMATED BACKGROUND LAYER ========== */
.bg-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Deep base gradient */
.bg-scene::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 120% 80% at 20% 10%, rgba(0, 80, 180, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 100% 60% at 80% 85%, rgba(0, 140, 200, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 80% 50% at 50% 50%, rgba(10, 20, 50, 0.9) 0%, transparent 100%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-color) 40%, var(--second-bg-color) 100%);
    z-index: 0;
}

/* Subtle grid pattern */
.bg-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    opacity: 0.7;
}

/* Noise texture overlay */
.bg-noise {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Floating glow orbs */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    will-change: transform;
}

.bg-orb--1 {
    width: 500px;
    height: 500px;
    background: var(--orb-1);
    top: -10%;
    left: -5%;
    animation: orbFloat1 18s ease-in-out infinite;
}

.bg-orb--2 {
    width: 400px;
    height: 400px;
    background: var(--orb-2);
    bottom: -5%;
    right: -8%;
    animation: orbFloat2 22s ease-in-out infinite;
}

.bg-orb--3 {
    width: 350px;
    height: 350px;
    background: var(--orb-3);
    top: 40%;
    left: 55%;
    animation: orbFloat3 20s ease-in-out infinite;
}

.bg-orb--4 {
    width: 250px;
    height: 250px;
    background: rgba(0, 171, 240, 0.05);
    top: 15%;
    right: 20%;
    animation: orbFloat4 15s ease-in-out infinite;
}

.bg-orb--5 {
    width: 300px;
    height: 300px;
    background: rgba(0, 200, 255, 0.04);
    bottom: 20%;
    left: 15%;
    animation: orbFloat5 25s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, 40px) scale(1.1); }
    50% { transform: translate(30px, 80px) scale(0.95); }
    75% { transform: translate(-20px, 50px) scale(1.05); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    30% { transform: translate(-50px, -30px) scale(1.08); }
    60% { transform: translate(-30px, -70px) scale(0.92); }
    80% { transform: translate(20px, -40px) scale(1.04); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(-40px, 30px) scale(1.12); }
    45% { transform: translate(30px, -20px) scale(0.9); }
    70% { transform: translate(50px, 40px) scale(1.06); }
}

@keyframes orbFloat4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40% { transform: translate(-35px, 50px) scale(1.15); }
    70% { transform: translate(25px, -30px) scale(0.88); }
}

@keyframes orbFloat5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    35% { transform: translate(45px, -40px) scale(1.08); }
    65% { transform: translate(-25px, 35px) scale(0.94); }
}

/* Floating micro particles */
.bg-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.bg-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--main-color);
    border-radius: 50%;
    opacity: 0;
    animation: particleDrift linear infinite;
}

.bg-particle:nth-child(1)  { left: 10%; top: 20%; animation-duration: 12s; animation-delay: 0s; }
.bg-particle:nth-child(2)  { left: 25%; top: 60%; animation-duration: 16s; animation-delay: 2s; }
.bg-particle:nth-child(3)  { left: 45%; top: 30%; animation-duration: 14s; animation-delay: 4s; }
.bg-particle:nth-child(4)  { left: 65%; top: 75%; animation-duration: 18s; animation-delay: 1s; }
.bg-particle:nth-child(5)  { left: 80%; top: 15%; animation-duration: 13s; animation-delay: 3s; }
.bg-particle:nth-child(6)  { left: 35%; top: 85%; animation-duration: 17s; animation-delay: 5s; }
.bg-particle:nth-child(7)  { left: 90%; top: 45%; animation-duration: 15s; animation-delay: 6s; }
.bg-particle:nth-child(8)  { left: 55%; top: 10%; animation-duration: 19s; animation-delay: 7s; }
.bg-particle:nth-child(9)  { left: 15%; top: 50%; animation-duration: 11s; animation-delay: 8s; }
.bg-particle:nth-child(10) { left: 70%; top: 90%; animation-duration: 20s; animation-delay: 9s; }
.bg-particle:nth-child(11) { left: 5%;  top: 70%; animation-duration: 14s; animation-delay: 1.5s; }
.bg-particle:nth-child(12) { left: 50%; top: 55%; animation-duration: 16s; animation-delay: 3.5s; }
.bg-particle:nth-child(13) { left: 85%; top: 25%; animation-duration: 12s; animation-delay: 5.5s; }
.bg-particle:nth-child(14) { left: 40%; top: 5%;  animation-duration: 18s; animation-delay: 7.5s; }
.bg-particle:nth-child(15) { left: 20%; top: 95%; animation-duration: 15s; animation-delay: 0.5s; }

@keyframes particleDrift {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    10% { opacity: 0.6; }
    50% { opacity: 0.3; transform: translateY(-80px) scale(1); }
    90% { opacity: 0.5; }
    100% { opacity: 0; transform: translateY(-160px) scale(0.5); }
}

/* Horizontal scan line (subtle) */
.bg-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--main-glow-soft) 30%, var(--main-glow) 50%, var(--main-glow-soft) 70%, transparent 100%);
    z-index: 3;
    animation: scanDown 8s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes scanDown {
    0% { top: -2px; opacity: 0; }
    5% { opacity: 0.5; }
    95% { opacity: 0.5; }
    100% { top: 100%; opacity: 0; }
}

/* Vignette overlay */
.bg-vignette {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: radial-gradient(ellipse 75% 65% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

/* ========== GLASSMORPHISM UTILITY ========== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 var(--glass-highlight),
        0 0 0 0.5px rgba(255, 255, 255, 0.03) inset;
}

.glass-strong {
    background: var(--glass-bg);
    backdrop-filter: blur(30px) saturate(1.3);
    -webkit-backdrop-filter: blur(30px) saturate(1.3);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--glass-highlight),
        0 0 0 0.5px rgba(255, 255, 255, 0.05) inset;
}

/* Glow ring for focus states */
.glow-ring {
    box-shadow:
        0 0 0 1px var(--main-color),
        0 0 15px var(--main-glow-soft),
        0 0 40px var(--main-glow-soft);
}

/* ========== CONTENT WRAPPER ========== */
.content-wrapper {
    position: relative;
    z-index: 10;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: .3s;
}

.header.sticky {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Blinking Underscore */
.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    text-shadow: 0 0 30px var(--main-glow-soft);
}

.logo::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: showRight 1s ease forwards;
    animation-delay: .4s;
}

.logo::after {
    content: '_';
    position: absolute;
    right: -12px;
    animation: blinkUnderscore 1s infinite;
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-glow);
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    background: var(--main-color);
    transform: rotate(15deg);
    box-shadow: 0 0 20px var(--main-glow);
}

.theme-toggle i {
    font-size: 2rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.theme-toggle:hover i {
    color: var(--bg-color);
}

/* Menu Icon */
#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
}

#menu-icon:hover {
    color: var(--main-color);
    text-shadow: 0 0 15px var(--main-glow);
}

.navbar {
    display: flex;
    align-items: center;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    margin-left: 3.5rem;
    transition: .3s;
    position: relative;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--main-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--main-glow);
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 80%;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    text-shadow: 0 0 20px var(--main-glow-soft);
}

/* HOME */
section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 9%;
    min-height: 100vh;
}

.home-content {
    flex: 1 1 55%;
    z-index: 99;
}

.home-img {
    flex: 1 1 35%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Glow behind profile image */
.home-img::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--main-glow-soft) 0%, transparent 70%);
    animation: imgGlowPulse 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes imgGlowPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.home-img img {
    position: relative;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    object-fit: cover;
    border-radius: 50%;
    box-shadow:
        0 0 35px var(--main-glow-soft),
        0 0 80px rgba(0, 171, 240, 0.1),
        inset 0 0 30px rgba(0, 0, 0, 0.3);
    opacity: 0.7;
    transition: opacity 0.5s ease, box-shadow 0.5s ease;
    cursor: pointer;
    border: 2px solid rgba(0, 171, 240, 0.15);
}

.home-img img:hover {
    opacity: 1;
    box-shadow:
        0 0 50px var(--main-glow),
        0 0 100px rgba(0, 171, 240, 0.15);
}

.home-content h1 {
    position: relative;
    font-size: 5.6rem;
    font-weight: 900;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    text-shadow: 0 0 40px rgba(0, 171, 240, 0.08);
}

.home-content h1::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: showRight 1s ease forwards;
    animation-delay: .7s;
}

.home-content .text-animate {
    position: relative;
    width: 100%;
    margin: 1rem 0;
}

.home-content .text-animate h3 {
    font-size: 3.2rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--main-color);
    margin: 1rem 0;
    text-shadow: 0 0 25px var(--main-glow-soft);
}

.highlight-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
}

.highlight-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: var(--main-color);
    z-index: 0;
    box-shadow: 0 0 20px var(--main-glow);
}

.highlight-wrap .word {
    position: relative;
    z-index: 1;
    padding: 0.04em 0.25em;
    color: var(--bg-color);
    font-weight: 800;
    -webkit-font-smoothing: antialiased;
}

.highlight-wrap .word.fade {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.highlight-wrap .word.show {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.static-solve {
    color: var(--main-color);
}

.home-content p {
    position: relative;
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
    color: var(--text-muted);
}

.home-content p::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    animation: showRight 1s ease forwards;
    animation-delay: 1.1s;
}

/* BUTTONS */
.btn-box {
    position: relative;
    display: flex;
    justify-content: space-between;
    width: 34.5rem;
    height: 5rem;
    flex-wrap: wrap;
}

.btn-box .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 16rem;
    height: 100%;
    background: var(--main-color);
    border: .2rem solid var(--main-color);
    border-radius: .8rem;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: .1rem;
    color: var(--bg-color);
    z-index: 1;
    overflow: hidden;
    position: relative;
    transition: .5s;
    box-shadow: 0 0 20px var(--main-glow-soft);
}

.btn-box .btn:hover {
    box-shadow: 0 0 30px var(--main-glow), 0 0 60px var(--main-glow-soft);
}

.btn-box .btn:nth-child(2) {
    background: transparent;
    color: var(--main-color);
    box-shadow: 0 0 0 0 transparent;
}

.btn-box .btn:nth-child(2):hover {
    color: var(--bg-color);
    box-shadow: 0 0 30px var(--main-glow);
}

.btn-box .btn:nth-child(2)::before {
    background: var(--main-color);
}

.btn-box .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
    transition: .5s;
}

.btn-box .btn:hover::before {
    width: 100%;
}

.btn-box .btn:first-child:hover {
    color: var(--main-color);
}

/* SOCIAL ICONS */
.home-sci {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 1.5rem;
    width: 100%;
    padding: 0.5rem 0;
    align-items: center;
}

.home-sci a {
    flex-shrink: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: .2rem solid var(--glass-border);
    border-radius: 50%;
    font-size: 20px;
    color: var(--main-color);
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: .5s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.home-sci a:hover {
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-glow);
    border-color: var(--main-color);
}

.home-sci a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--main-color);
    z-index: -1;
    transition: .5s;
}

.home-sci a:hover::before {
    width: 100%;
}

/* About */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    background: var(--second-bg-color);
    padding-bottom: 6rem;
    position: relative;
}

/* Section-specific ambient glow */
.about::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, var(--main-glow-soft) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.heading {
    font-size: 5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 40px var(--main-glow-soft);
}

.about-img {
    position: relative;
    width: 25rem;
    height: 25rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* Glow behind about image */
.about-img::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--main-glow-soft) 0%, transparent 60%);
    z-index: -1;
    animation: imgGlowPulse 5s ease-in-out infinite;
}

.about-img img {
    width: 90%;
    border-radius: 50%;
    border: .2rem solid var(--main-color);
    box-shadow: 0 0 20px var(--main-glow-soft);
}

span {
    color: var(--main-color);
}

.about-img .circle-spin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border-top: .2rem solid var(--second-bg-color);
    border-bottom: .2rem solid var(--second-bg-color);
    border-left: .2rem solid var(--main-color);
    border-right: .2rem solid var(--main-color);
    box-shadow: 0 0 15px var(--main-glow-soft);
}

.about-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.about-content h3 {
    font-size: 2.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
    color: var(--text-muted);
}

.btn-box.btns a::before {
    background: var(--second-bg-color);
}

/* Education */
.education {
    padding: 100px 15px;
    background: var(--second-bg-color);
    position: relative;
}

.education::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(ellipse, var(--main-glow-soft) 0%, transparent 70%);
    pointer-events: none;
}

.education h2 {
    font-size: 8rem;
    text-align: center;
    margin: 5rem 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 40px var(--main-glow-soft);
}

.timeline-items {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.timeline-items::before {
    content: "";
    position: absolute;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, var(--main-color) 15%, var(--main-color) 85%, transparent 100%);
    left: calc(50% - 1px);
    box-shadow: 0 0 10px var(--main-glow);
}

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

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 30px);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 30px);
}

.timeline-dot {
    height: 21px;
    width: 21px;
    background-color: var(--main-color);
    box-shadow: 0 0 15px var(--main-glow), 0 0 40px var(--main-glow-soft);
    position: absolute;
    left: calc(50% - 8px);
    border-radius: 50%;
    top: 10px;
}

.timeline-date {
    font-size: 20px;
    font-weight: 800;
    color: var(--main-color);
    margin: 6px 0 15px;
    text-shadow: 0 0 10px var(--main-glow-soft);
}

.timeline-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 20px 28px;
    word-break: break-word;
    overflow-wrap: break-word;
    border-radius: 4rem;
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 var(--glass-highlight);
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 25px var(--main-glow-soft),
        0 8px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 var(--glass-highlight);
    border-color: rgba(0, 171, 240, 0.35);
}

.timeline-content h3 {
    font-size: 20px;
    color: var(--text-color);
    margin: 0 0 10px;
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 300;
    line-height: 22px;
}

.timeline-content .gpa-info {
    display: none;
    margin-top: 1rem;
    font-size: 1.4rem;
    color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

.timeline-content .gpa-info.show {
    display: block;
}

/* SKILLS */
.skills {
    background: var(--second-bg-color);
    padding: 5rem 9%;
    color: var(--text-color);
    position: relative;
}

.skills::before {
    content: '';
    position: absolute;
    top: -50px;
    right: 10%;
    width: 500px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(100, 60, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.skills .heading {
    font-size: 5rem;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.skills-category {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 var(--glass-highlight);
    transition: 0.3s;
    position: relative;
    z-index: 1;
}

.skills-category:hover {
    transform: scale(1.02);
    box-shadow:
        0 0 25px var(--main-glow-soft),
        0 8px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 var(--glass-highlight);
    border-color: rgba(0, 171, 240, 0.35);
}

.skills-category h3 {
    font-size: 2.4rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-shadow: 0 0 15px var(--main-glow-soft);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.skill-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    background: rgba(0, 171, 240, 0.05);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    margin: 0.5rem;
    font-size: 1.8rem;
    transition: 0.5s;
    z-index: 1;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.skill-badge::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--main-color);
    z-index: -1;
    transition: 0.5s ease;
}

.skill-badge:hover {
    color: var(--bg-color);
    cursor: default;
    box-shadow: 0 0 15px var(--main-glow-soft);
    border-color: var(--main-color);
}

.skill-badge:hover::before {
    width: 100%;
}

/* CONTACT */
.contact {
    padding-bottom: 7rem;
    background: var(--second-bg-color);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    width: 500px;
    height: 300px;
    background: radial-gradient(ellipse, var(--main-glow-soft) 0%, transparent 70%);
    pointer-events: none;
}

.contact form {
    max-width: 70rem;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box .input-field {
    position: relative;
    width: 49%;
    margin: .8rem 0;
}

.contact form .input-box .input-field input,
.contact form .textarea-field textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: .6rem;
    border: .2rem solid var(--glass-border);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact form .input-box .input-field input:focus,
.contact form .textarea-field textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 15px var(--main-glow-soft);
}

.contact form .input-box .input-field input::placeholder,
.contact form .textarea-field textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.contact form .focus {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--main-color);
    border-radius: .6rem;
    z-index: -1;
    transition: .5s;
    opacity: 0.15;
}

.contact form .input-box .input-field input:focus~.focus,
.contact form .input-box .input-field input:valid~.focus,
.contact form .textarea-field textarea:focus~.focus,
.contact form .textarea-field textarea:valid~.focus {
    width: 100%;
}

.contact form .textarea-field {
    position: relative;
    margin: .8rem 0 2.7rem;
    display: flex;
}

.contact form .textarea-field textarea {
    resize: none;
}

.contact form .btn-box.btns .btn {
    cursor: pointer;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--main-color);
    border-radius: 4px;
    box-shadow: 0 0 6px var(--main-glow);
}

::-webkit-scrollbar-track {
    background-color: var(--bg-deep);
}

/* Project */
.portfolio {
    background: var(--second-bg-color);
    padding: 8rem 9% 5rem;
    position: relative;
}

.portfolio::before {
    content: '';
    position: absolute;
    top: 100px;
    left: 20%;
    width: 600px;
    height: 350px;
    background: radial-gradient(ellipse, rgba(0, 171, 240, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.portfolio h2.heading {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 var(--glass-highlight);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.portfolio-box:hover {
    transform: translateY(-10px);
    box-shadow:
        0 0 25px var(--main-glow-soft),
        0 12px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 var(--glass-highlight);
    border-color: rgba(0, 171, 240, 0.35);
    cursor: pointer;
}

.portfolio-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: 0.5s ease;
    opacity: 0.85;
}

.portfolio-box:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(to top, rgba(0, 40, 70, 0.97) 0%, rgba(0, 100, 160, 0.7) 50%, rgba(0, 171, 240, 0.35) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    transform: translateY(100%);
    transition: 0.5s ease;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
    line-height: 1.2;
}

.portfolio-layer p {
    font-size: 1.35rem;
    margin-bottom: 1.1rem;
    line-height: 1.5;
    color: #ffffff;
    opacity: 0.92;
}

/* Button row */
.portfolio-layer-btns {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.portfolio-layer a.btn-live,
.portfolio-layer a.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.3rem;
    border-radius: 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.portfolio-layer a.btn-live {
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.portfolio-layer a.btn-live:hover {
    background: #ffffff;
    color: #0077aa;
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.portfolio-layer a.btn-github {
    background: rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.portfolio-layer a.btn-github:hover {
    background: #ffffff;
    color: #222222;
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.portfolio-layer a.btn-live i,
.portfolio-layer a.btn-github i {
    font-size: 1.3rem;
    line-height: 1;
}

/* Unique Project Card Covers */
.proj-cover {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-cover-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    transition: opacity 0.5s ease;
}

.portfolio-box:hover .proj-cover-bg {
    opacity: 0.32;
}

.proj-cover-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.proj-icon {
    font-size: 6rem;
    color: #fff;
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.5));
    transition: transform 0.4s ease, filter 0.4s ease;
}

.portfolio-box:hover .proj-icon {
    transform: scale(1.15) translateY(-4px);
    filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.85));
}

.proj-tech-tags {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: center;
}

.proj-tech-tags span {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08rem;
    padding: 0.3rem 1rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* E-Commerce */
.proj-ecommerce {
    background: linear-gradient(135deg, #1a0a00 0%, #6b2200 50%, #c04000 100%);
}

.proj-ecommerce .proj-cover-bg {
    background: repeating-linear-gradient(45deg,
            transparent,
            transparent 20px,
            rgba(255, 120, 0, 0.15) 20px,
            rgba(255, 120, 0, 0.15) 40px);
}

.proj-ecommerce .proj-icon {
    color: #ff9a4d;
    filter: drop-shadow(0 0 16px rgba(255, 100, 0, 0.7));
}

.proj-ecommerce .proj-tech-tags span {
    border-color: rgba(255, 120, 0, 0.5);
}

/* Portfolio */
.proj-portfolio {
    background: linear-gradient(135deg, #0a0020 0%, #2a0060 50%, #5500cc 100%);
}

.proj-portfolio .proj-cover-bg {
    background: radial-gradient(circle at 30% 70%, rgba(120, 0, 255, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 70% 30%, rgba(0, 171, 240, 0.2) 0%, transparent 60%);
}

.proj-portfolio .proj-icon {
    color: #b57bff;
    filter: drop-shadow(0 0 16px rgba(140, 0, 255, 0.7));
}

.proj-portfolio .proj-tech-tags span {
    border-color: rgba(140, 0, 255, 0.5);
}

/* Todo */
.proj-todo {
    background: linear-gradient(135deg, #001a0a 0%, #003d1a 50%, #006b2e 100%);
}

.proj-todo .proj-cover-bg {
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 18px,
            rgba(0, 200, 80, 0.1) 18px,
            rgba(0, 200, 80, 0.1) 19px);
}

.proj-todo .proj-icon {
    color: #4dff99;
    filter: drop-shadow(0 0 16px rgba(0, 200, 80, 0.7));
}

.proj-todo .proj-tech-tags span {
    border-color: rgba(0, 200, 80, 0.5);
}

/* Weather */
.proj-weather {
    background: linear-gradient(160deg, #001a2e 0%, #003d6b 40%, #0077cc 100%);
}

.proj-weather .proj-cover-bg {
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 171, 240, 0.35) 0%, transparent 70%);
}

.proj-weather .proj-icon {
    color: #7dd8ff;
    filter: drop-shadow(0 0 16px rgba(0, 171, 240, 0.8));
}

.proj-weather .proj-tech-tags span {
    border-color: rgba(0, 171, 240, 0.5);
}

/* Extension */
.extension-box .extension-preview {
    width: 100%;
    height: 380px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.extension-box .extension-preview .ae-logo {
    width: 85%;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 0 18px rgba(0, 171, 240, 0.5));
}

.extension-box:hover .extension-preview .ae-logo {
    transform: scale(1.1);
    filter: drop-shadow(0 0 28px rgba(0, 171, 240, 0.85));
}

/* DPD */
.daily-peak-box .daily-peak-preview {
    width: 100%;
    height: 380px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.daily-peak-box .daily-peak-preview .dpd-logo {
    width: 85%;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 0 18px rgba(0, 171, 240, 0.5));
}

.daily-peak-box:hover .daily-peak-preview .dpd-logo {
    transform: scale(1.1);
    filter: drop-shadow(0 0 28px rgba(0, 171, 240, 0.85));
}

.wip-badge {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    background: rgba(255, 200, 0, 0.15);
    color: #ffc800;
    border: 1px solid rgba(255, 200, 0, 0.5);
    border-radius: 2rem;
    padding: 0.1rem 0.8rem;
    margin-left: 0.8rem;
    vertical-align: middle;
    letter-spacing: 0.05rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--bg-deep);
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.footer-text p {
    font-size: 1.6rem;
    color: var(--text-muted);
}

.footer-iconTop a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border: .2rem solid var(--main-color);
    border-radius: .6rem;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 0 15px var(--main-glow-soft);
    transition: box-shadow 0.3s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 25px var(--main-glow);
}

.footer-iconTop a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--second-bg-color);
    z-index: -1;
    transition: 0.5s ease;
}

.footer-iconTop a:hover::before {
    width: 100%;
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--bg-color);
    transition: .5s;
}

.footer-iconTop a:hover i {
    color: var(--main-color);
}

/* Achievements */
.achievements {
    padding: 60px 10%;
    background-color: var(--second-bg-color);
    position: relative;
}

.achievements::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--main-glow-soft) 0%, transparent 60%);
    pointer-events: none;
}

.achievements .heading {
    text-align: center;
    font-size: 5rem;
    color: var(--text-color);
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.achievements .heading span {
    color: var(--main-color);
}

.achievement-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.achievement-card {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.2rem;
    padding: 2rem;
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 var(--glass-highlight);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--glass-border);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 0 25px var(--main-glow-soft),
        0 8px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 var(--glass-highlight);
    border-color: rgba(0, 171, 240, 0.35);
}

.achievement-card .icon {
    width: 60px;
    height: 60px;
    font-size: 3rem;
    background: var(--main-color);
    color: var(--bg-color);
    padding: 1.4rem;
    border-radius: 50%;
    margin-right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
    box-shadow: 0 0 20px var(--main-glow-soft);
}

.achievement-card .icon svg,
.achievement-card .icon svg path {
    fill: #000000;
    transition: fill 0.3s ease;
}

.achievement-card .icon i {
    color: #000000;
    transition: color 0.3s ease;
}

.light-mode .achievement-card .icon svg,
.light-mode .achievement-card .icon svg path {
    fill: #ffffff;
}

.light-mode .achievement-card .icon i {
    color: #ffffff;
}

.achievement-card .icon img {
    width: 65%;
    height: 65%;
    object-fit: contain;
}

.achievement-card .info h3 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.achievement-card .info p {
    color: var(--text-muted);
    opacity: 0.8;
    font-size: 1.5rem;
}

.achievement-card .bx-link-external {
    font-size: 1.6rem;
    color: var(--main-color);
    margin-left: 0.8rem;
    vertical-align: middle;
}

.cp-prof {
    background: var(--second-bg-color);
    padding: 5rem 9%;
    color: var(--text-color);
}


/* ========== GRID BACKGROUND PATTERN ========== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 171, 240, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 171, 240, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

body.light-mode::before {
    background-image:
        linear-gradient(rgba(2, 136, 209, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2, 136, 209, 0.07) 1px, transparent 1px);
}

/* ========== CURSOR GLOW ========== */
.cursor-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(0, 171, 240, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: left, top;
}

body.light-mode .cursor-glow {
    background: radial-gradient(circle, rgba(2, 136, 209, 0.12) 0%, transparent 70%);
}

/* Ensure content sits above the grid */
.app {
    position: relative;
    z-index: 1;
}

/* ========== CP PROFILE DASHBOARD ========== */
.cp-prof {
    background: var(--second-bg-color);
    padding: 10rem 9% 5rem;
    min-height: 100vh;
    color: var(--text-color);
}

.cp-prof .heading {
    font-size: 5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.cp-live-dot {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background: #00e676;
    border-radius: 50%;
    margin-left: 1rem;
    vertical-align: middle;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.5); }
    50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(0, 230, 118, 0); }
}

/* Overview Stats Row */
.cp-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.cp-stat-card {
    background: var(--bg-color);
    border: 1px solid rgba(0, 171, 240, 0.15);
    border-radius: 1.2rem;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.4s ease;
}

.cp-stat-card:hover {
    border-color: var(--main-color);
    box-shadow: 0 0 20px rgba(0, 171, 240, 0.15);
    transform: translateY(-3px);
}

.cp-stat-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 1rem;
    background: rgba(0, 171, 240, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cp-stat-icon i {
    font-size: 2.4rem;
    color: var(--main-color);
}

.cp-stat-num {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.cp-stat-lbl {
    display: block;
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.55;
    font-weight: 400;
}

/* Skeleton pulse for loading */
.cp-stat-card.loading .cp-stat-num {
    animation: skelPulse 1.5s ease-in-out infinite;
    color: transparent !important;
    background: var(--second-bg-color);
    border-radius: 0.5rem;
    height: 2.4rem;
    width: 5rem;
}

@keyframes skelPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Platform Cards Grid */
.cp-platforms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.cp-platform-card {
    background: var(--bg-color);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem 2rem;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.cp-platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 1.5rem 1.5rem 0 0;
    transition: height 0.4s ease;
}

.cp-platform-card:hover {
    transform: translateY(-6px);
}

.cp-platform-card:hover::before {
    height: 5px;
}

/* Codeforces card theme */
.cp-card-cf { border-color: rgba(255, 60, 60, 0.2); }
.cp-card-cf::before { background: linear-gradient(90deg, #ff3c3c, #ff8c00); }
.cp-card-cf:hover { border-color: rgba(255, 60, 60, 0.5); box-shadow: 0 8px 40px rgba(255, 60, 60, 0.12); }

/* LeetCode card theme */
.cp-card-lc { border-color: rgba(255, 161, 22, 0.2); }
.cp-card-lc::before { background: linear-gradient(90deg, #ffa116, #f7c948); }
.cp-card-lc:hover { border-color: rgba(255, 161, 22, 0.5); box-shadow: 0 8px 40px rgba(255, 161, 22, 0.12); }

/* CodeChef card theme */
.cp-card-cc { border-color: rgba(106, 176, 76, 0.2); }
.cp-card-cc::before { background: linear-gradient(90deg, #6ab04c, #badc58); }
.cp-card-cc:hover { border-color: rgba(106, 176, 76, 0.5); box-shadow: 0 8px 40px rgba(106, 176, 76, 0.12); }

/* Card Header */
.cp-card-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.cp-platform-logo {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0.8rem;
    background: var(--second-bg-color);
    padding: 0.5rem;
}

.cp-logo-fallback {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.cp-logo-fallback.cf-fb { background: linear-gradient(135deg, #ff3c3c, #ff8c00); }
.cp-logo-fallback.lc-fb { background: linear-gradient(135deg, #ffa116, #f7c948); color: #000; }
.cp-logo-fallback.cc-fb { background: linear-gradient(135deg, #6ab04c, #badc58); }

.cp-card-title {
    display: flex;
    flex-direction: column;
}

.cp-card-title h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

.cp-handle {
    font-size: 1.3rem;
    color: var(--main-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.3s;
}

.cp-handle:hover { opacity: 0.75; }
.cp-handle i { font-size: 1.2rem; }

/* Rating Display */
.cp-rating-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cp-rating-big {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.8rem;
    transition: color 0.3s;
}

.cp-rank-badge {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 0.3rem 1.4rem;
    border-radius: 2rem;
    border: 2px solid;
    letter-spacing: 0.05rem;
    transition: all 0.3s;
}

/* Rating Bar */
.cp-rating-bar {
    width: 100%;
    height: 0.4rem;
    background: var(--second-bg-color);
    border-radius: 1rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.cp-rating-fill {
    height: 100%;
    border-radius: 1rem;
    width: 0%;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stats Grid inside card */
.cp-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.cp-detail {
    text-align: center;
    padding: 0.8rem 0.5rem;
    background: var(--second-bg-color);
    border-radius: 0.8rem;
}

.cp-detail-val {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.cp-detail-lbl {
    display: block;
    font-size: 1.05rem;
    color: var(--text-color);
    opacity: 0.5;
    font-weight: 400;
}

/* LeetCode Difficulty Breakdown */
.cp-difficulty-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.cp-diff-item {
    text-align: center;
    padding: 0.6rem 0.3rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(255,255,255,0.06);
}

.cp-diff-num {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.15rem;
}

.cp-diff-lbl {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    opacity: 0.7;
}

.cp-diff-easy .cp-diff-num { color: #00e676; }
.cp-diff-easy { border-color: rgba(0, 230, 118, 0.15); }
.cp-diff-medium .cp-diff-num { color: #ffa116; }
.cp-diff-medium { border-color: rgba(255, 161, 22, 0.15); }
.cp-diff-hard .cp-diff-num { color: #ff5252; }
.cp-diff-hard { border-color: rgba(255, 82, 82, 0.15); }

/* Visit Profile Button */
.cp-visit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem;
    border-radius: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.35s ease;
    border: 2px solid;
}

.cp-visit-btn i {
    font-size: 1.6rem;
    transition: transform 0.3s ease;
}

.cp-visit-btn:hover i {
    transform: translateX(4px);
}

.cp-card-cf .cp-visit-btn {
    color: #ff3c3c;
    border-color: rgba(255, 60, 60, 0.3);
}
.cp-card-cf .cp-visit-btn:hover {
    background: #ff3c3c;
    color: #fff;
    border-color: #ff3c3c;
}

.cp-card-lc .cp-visit-btn {
    color: #ffa116;
    border-color: rgba(255, 161, 22, 0.3);
}
.cp-card-lc .cp-visit-btn:hover {
    background: #ffa116;
    color: #000;
    border-color: #ffa116;
}

.cp-card-cc .cp-visit-btn {
    color: #6ab04c;
    border-color: rgba(106, 176, 76, 0.3);
}
.cp-card-cc .cp-visit-btn:hover {
    background: #6ab04c;
    color: #000;
    border-color: #6ab04c;
}

/* Card Loading Skeleton */
.cp-platform-card.loading .cp-rating-big {
    animation: skelPulse 1.5s ease-in-out infinite;
    color: transparent !important;
    background: var(--second-bg-color);
    border-radius: 0.8rem;
    height: 4.5rem;
    width: 60%;
    margin: 0 auto 0.8rem;
}

.cp-platform-card.loading .cp-rank-badge {
    animation: skelPulse 1.5s ease-in-out infinite;
    color: transparent !important;
    border-color: transparent !important;
    background: var(--second-bg-color);
    border-radius: 2rem;
    height: 2rem;
    width: 8rem;
}

.cp-platform-card.loading .cp-detail-val {
    animation: skelPulse 1.5s ease-in-out infinite;
    color: transparent !important;
    background: var(--second-bg-color);
    border-radius: 0.4rem;
    height: 1.7rem;
    width: 3rem;
    margin: 0 auto 0.2rem;
}

.cp-platform-card.loading .cp-diff-num {
    animation: skelPulse 1.5s ease-in-out infinite;
    color: transparent !important;
    background: var(--second-bg-color);
    border-radius: 0.4rem;
    height: 1.6rem;
    width: 2.5rem;
    margin: 0 auto 0.15rem;
}

/* Contest Highlights */
.cp-highlights {
    margin-bottom: 3rem;
}

.cp-sub-heading {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.cp-highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.cp-highlight-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-color);
    border: 1px solid rgba(0, 171, 240, 0.15);
    border-radius: 1.2rem;
    padding: 2rem;
    transition: all 0.4s ease;
}

.cp-highlight-card:hover {
    border-color: var(--main-color);
    box-shadow: 0 0 25px rgba(0, 171, 240, 0.12);
    transform: translateY(-4px);
}

.cp-highlight-icon {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    background: rgba(0, 171, 240, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cp-highlight-icon i {
    font-size: 2.8rem;
    color: var(--main-color);
}

.cp-highlight-info h4 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.cp-highlight-info p {
    font-size: 1.3rem;
    color: var(--text-color);
    opacity: 0.6;
    line-height: 1.5;
}

/* Last Updated */
.cp-last-updated {
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-color);
    opacity: 0.4;
    margin-top: 1rem;
}

.cp-last-updated .live-indicator {
    color: #00e676;
}

.cp-last-updated .cached-indicator {
    color: #ffa116;
}

/* ========== CP SECTION RESPONSIVE ========== */
@media (max-width: 1200px) {
    .cp-platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cp-platforms-grid .cp-platform-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }
}

@media (max-width: 991px) {
    .cp-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    .cp-platforms-grid {
        grid-template-columns: 1fr;
    }
    .cp-platforms-grid .cp-platform-card:last-child {
        max-width: 100%;
    }
    .cp-highlights-grid {
        grid-template-columns: 1fr;
    }
    .cp-prof {
        padding: 10rem 4% 5rem;
    }
}

@media (max-width: 480px) {
    .cp-overview {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .cp-stat-card {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    .cp-stat-icon {
        width: 4rem;
        height: 4rem;
    }
    .cp-stat-icon i {
        font-size: 2rem;
    }
    .cp-stat-num {
        font-size: 1.9rem;
    }
    .cp-rating-big {
        font-size: 3.5rem;
    }
    .cp-card-stats {
        gap: 0.6rem;
    }
    .cp-detail-val {
        font-size: 1.4rem;
    }
    .cp-prof .heading {
        font-size: 3.5rem;
    }
    .cp-sub-heading {
        font-size: 2.2rem;
    }
    .cp-highlight-card {
        padding: 1.5rem;
    }
}

/* ========== Light Mode Overrides for CP ========== */
.light-mode .cp-stat-card {
    background: #fff;
    border-color: rgba(2, 136, 209, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.light-mode .cp-platform-card {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.light-mode .cp-card-cf { border-color: rgba(255, 60, 60, 0.18); }
.light-mode .cp-card-lc { border-color: rgba(255, 161, 22, 0.18); }
.light-mode .cp-card-cc { border-color: rgba(106, 176, 76, 0.18); }

.light-mode .cp-detail {
    background: #f0f8ff;
}

.light-mode .cp-highlight-card {
    background: #fff;
    border-color: rgba(2, 136, 209, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.light-mode .cp-platform-logo {
    background: #f0f8ff;
}

.light-mode .cp-rating-bar {
    background: #e8f4fd;
}

.light-mode .cp-diff-item {
    border-color: rgba(0, 0, 0, 0.06);
    background: #f8fbff;
}

.light-mode .cp-stat-card.loading .cp-stat-num,
.light-mode .cp-platform-card.loading .cp-rating-big,
.light-mode .cp-platform-card.loading .cp-rank-badge,
.light-mode .cp-platform-card.loading .cp-detail-val,
.light-mode .cp-platform-card.loading .cp-diff-num {
    background: #e8f4fd;
}

/* ========== CUSTOM CURSOR GLOW (Desktop) ========== */
@media (hover: hover) and (pointer: fine) {
    .cursor-glow {
        position: fixed;
        width: 300px;
        height: 300px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(0, 171, 240, 0.06) 0%, transparent 70%);
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: opacity 0.3s ease;
        will-change: left, top;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    .bg-orb,
    .bg-particle,
    .bg-scanline,
    .home-img::before,
    .about-img::before {
        animation: none !important;
    }

    .cursor-glow {
        display: none !important;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }

    .home-content h1 {
        font-size: 4.5rem;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 4%;
    }

    section {
        padding: 10rem 4% 2rem;
    }

    .home {
        padding: 10rem 4% 4rem;
    }

    .home-img {
        margin-bottom: 2rem;
        padding-top: 2rem;
    }

    .home-img::before {
        width: 280px;
        height: 280px;
    }

    .home-img img {
        width: min(300px, 70vw);
        height: min(300px, 70vw);
    }

    .home-sci {
        justify-content: center;
        width: 100%;
    }

    .footer {
        padding: 2rem 4%;
    }
}

@media (max-width: 768px) {
    .header {
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--glass-border);
    }

    .header-right {
        gap: 1.5rem;
    }

    #menu-icon {
        display: block;
    }

    .theme-toggle {
        margin-left: 0;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        padding: 1rem 4%;
        background: var(--main-color);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .2);
        z-index: 1;
        transition: .25s ease;
        transition-delay: .25s;
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar.active {
        left: 0;
        transition-delay: 0s;
    }

    .navbar .active-nav {
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        z-index: -1;
        transition: .25s ease;
        transition-delay: 0s;
    }

    .navbar.active .active-nav {
        left: 0;
        transition-delay: .25s;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        transform: translateX(-20rem);
        transition: .25s ease;
        transition-delay: 0s;
        margin-left: 0;
    }

    .navbar.active a {
        transform: translateX(0);
        transition-delay: .25s;
    }

    .home-content h1 {
        font-size: 3.5rem;
    }

    .home-content .text-animate h3 {
        font-size: 2.8rem;
        justify-content: center;
    }

    .btn-box {
        width: 100%;
        flex-direction: column;
        align-items: center;
        height: auto;
        gap: 1.5rem;
    }

    .btn-box .btn {
        width: 100%;
        max-width: 20rem;
    }

    .home-content p {
        margin: 2rem 0;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .bg-orb--1 { width: 300px; height: 300px; }
    .bg-orb--2 { width: 250px; height: 250px; }
    .bg-orb--3 { width: 200px; height: 200px; }
    .bg-orb--4 { width: 150px; height: 150px; }
    .bg-orb--5 { width: 180px; height: 180px; }
}

@media (max-width: 480px) {
    .home-content h1 {
        font-size: 3rem;
    }

    .home-content .text-animate h3 {
        font-size: 2.2rem;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .home-content .text-animate h3 span {
        white-space: normal;
    }

    .home-sci a {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .home-img img {
        width: min(220px, 65vw);
        height: min(220px, 65vw);
    }

    .home-img::before {
        width: 200px;
        height: 200px;
    }

    .home-content p {
        font-size: 1.4rem;
    }

    .portfolio-container {
        grid-template-columns: 1fr;
    }

    .header-right {
        gap: 1rem;
    }

    #menu-icon {
        font-size: 3rem;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .theme-toggle i {
        font-size: 1.8rem;
    }

    .bg-grid { background-size: 40px 40px; }
}

@media (max-width: 462px) {
    .home-content h1 {
        font-size: 5.2rem;
    }

    .education {
        padding: 10rem 4% 5rem 5%;
    }

    .contact form .input-box .input-field {
        width: 100%;
    }

    .footer {
        flex-direction: column-reverse;
    }

    .footer p {
        margin-top: 2rem;
        text-align: center;
    }

    .timeline-items::before {
        left: 18px;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 0;
        padding-left: 50px;
        text-align: left;
    }

    .timeline-item:nth-child(even) {
        padding-left: 50px;
    }

    .timeline-dot {
        left: 8px;
    }

    .timeline-date {
        font-size: 16px;
    }

    .timeline-content {
        padding: 16px 18px;
        border-radius: 2rem;
    }

    .timeline-content h3 {
        font-size: 16px;
    }

    .timeline-content p {
        font-size: 13px;
        line-height: 20px;
    }
}

@media (max-width: 371px) {
    .home {
        justify-content: center;
    }

    .home-content {
        display: flex;
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .home-content h1 {
        font-size: 5rem;
    }
}

/* Keyframe animation */
@keyframes typing {

    0%,
    100% {
        width: 0;
    }

    30%,
    90% {
        width: 100%;
    }
}

@keyframes blinkCursor {
    50% {
        border-right-color: transparent;
    }
}

@keyframes showRight {
    100% {
        width: 0;
    }
}

@keyframes blinkUnderscore {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* GPA Info */
.gpa-info {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    border-left: 3px solid var(--main-color);
    animation: slideDown 0.3s ease-out;
}

.gpa-info p {
    margin: 0;
    color: var(--main-color);
    font-weight: 600;
    font-size: 1.5rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-content {
    cursor: pointer;
}
