/* ================================================================
   PALLAM VAMSI — PORTFOLIO CSS
   Full animated, interactive, glassmorphism design
================================================================ */

/* --- RESET & BASE ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #060610;
    --bg2:      #0a0a18;
    --bg3:      #0e0e20;
    --surface:  #12122a;
    --surface2: #181830;
    --glass:    rgba(255,255,255,0.04);
    --glass2:   rgba(255,255,255,0.07);
    --border:   rgba(255,255,255,0.07);
    --border2:  rgba(255,255,255,0.13);

    --accent:   #6c63ff;
    --accent2:  #a78bfa;
    --accent3:  #38bdf8;
    --pink:     #f472b6;
    --green:    #34d399;
    --orange:   #fb923c;

    --text:     #e2e8f0;
    --text2:    #94a3b8;
    --text3:    #4a5568;

    --grad1: linear-gradient(135deg, #6c63ff 0%, #a78bfa 100%);
    --grad2: linear-gradient(135deg, #38bdf8 0%, #6c63ff 100%);
    --grad3: linear-gradient(135deg, #f472b6 0%, #6c63ff 100%);
    --grad4: linear-gradient(135deg, #34d399 0%, #38bdf8 100%);

    --radius:    12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow:    0 4px 30px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 60px rgba(0,0,0,0.7);
    --glow:      0 0 40px rgba(108,99,255,0.25);
    --transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    --bounce:    cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* ================================================================
   CUSTOM CURSOR
================================================================ */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s ease, opacity 0.3s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(108,99,255,0.6);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, width 0.3s var(--spring), height 0.3s var(--spring), border-color 0.3s;
}

.cursor-ring.hovering {
    width: 56px;
    height: 56px;
    border-color: var(--accent);
    background: rgba(108,99,255,0.05);
}

/* ================================================================
   SCROLL PROGRESS
================================================================ */
.scroll-progress-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    z-index: 9999;
    background: transparent;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--grad1);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(108,99,255,0.8);
}

/* ================================================================
   GLOBAL BACKGROUND CANVAS
================================================================ */
#global-canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.4;
}

/* ================================================================
   FLOATING ORBS
================================================================ */
.orb-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}

.orb-1 {
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(108,99,255,0.15) 0%, transparent 70%);
    top: -20%;
    left: -15%;
    animation: orbFloat 25s ease-in-out infinite;
}

.orb-2 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(56,189,248,0.12) 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation: orbFloat 30s ease-in-out infinite reverse;
    animation-delay: -10s;
}

.orb-3 {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(244,114,182,0.1) 0%, transparent 70%);
    top: 50%;
    left: 40%;
    animation: orbFloat 20s ease-in-out infinite;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(30px,-40px) scale(1.05); }
    66%      { transform: translate(-20px,20px) scale(0.95); }
}

/* ================================================================
   SCROLLBAR
================================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ================================================================
   CONTAINER
================================================================ */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================================
   GLASS CARD
================================================================ */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%);
    pointer-events: none;
}

/* ================================================================
   BUTTONS
================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    position: relative;
    user-select: none;
    overflow: hidden;
    transition: transform 0.2s var(--spring), box-shadow 0.3s ease;
}

.btn-primary {
    background: var(--grad1);
    color: #fff;
    box-shadow: 0 4px 24px rgba(108,99,255,0.4);
}

.btn-primary .btn-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #a78bfa 0%, #6c63ff 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover .btn-bg { opacity: 1; }
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 36px rgba(108,99,255,0.6);
}
.btn-primary:active { transform: translateY(0) scale(0.96); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border2);
    transition: transform 0.2s var(--spring), border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent2);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(108,99,255,0.2);
}
.btn-outline:active { transform: translateY(0) scale(0.96); }

.btn-full { width: 100%; justify-content: center; margin-top: 20px; }

.btn-text { position: relative; z-index: 1; }

/* ================================================================
   NAVBAR
================================================================ */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 18px 0;
    transition: var(--transition);
}

#navbar.scrolled {
    background: rgba(6,6,16,0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.3rem;
    font-weight: 900;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    font-family: 'Fira Code', monospace;
}

.logo-bracket {
    opacity: 0.6;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links .nav-item {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text2);
    transition: var(--transition);
    position: relative;
}

.nav-links .nav-item::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--grad1);
    border-radius: 2px;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-links .nav-item:hover { color: var(--text); }
.nav-links .nav-item:hover::after,
.nav-links .nav-item.active::after { width: 60%; left: 20%; }
.nav-links .nav-item.active { color: var(--text); }

.nav-links .nav-cta {
    background: var(--grad1);
    color: #fff !important;
    padding: 9px 22px;
    border-radius: 50px;
    margin-left: 8px;
    font-weight: 600;
}

.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover { transform: translateY(-2px); box-shadow: var(--glow); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ================================================================
   HERO
================================================================ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 24px 80px;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
}

/* Hero badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(52,211,153,0.08);
    border: 1px solid rgba(52,211,153,0.25);
    color: var(--green);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.84rem;
    font-weight: 500;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.badge-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(52,211,153,0.15), transparent);
    animation: badgeGlow 2s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
    from { opacity: 0.5; }
    to   { opacity: 1; }
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--green);
}

@keyframes pulse {
    0%,100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--green); }
    50%      { opacity: 0.6; transform: scale(0.85); box-shadow: 0 0 2px var(--green); }
}

/* Hero name */
.hero-name {
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: 20px;
}

.name-line {
    display: block;
    overflow: hidden;
}

.name-first {
    display: inline-block;
    color: var(--text);
}

.name-last {
    display: inline-block;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: unset;
}

.glitch::before {
    color: var(--pink);
    animation: glitch1 4s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    left: -2px;
}

.glitch::after {
    color: var(--accent3);
    animation: glitch2 4s infinite;
    clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
    left: 2px;
}

@keyframes glitch1 {
    0%,90%,100% { transform: none; opacity: 0; }
    91%         { transform: skewX(1deg) translateX(-2px); opacity: 0.7; }
    93%         { transform: skewX(-1deg) translateX(2px); opacity: 0.7; }
    95%         { transform: none; opacity: 0; }
}

@keyframes glitch2 {
    0%,90%,100% { transform: none; opacity: 0; }
    92%         { transform: skewX(-1deg) translateX(2px); opacity: 0.7; }
    94%         { transform: skewX(1deg) translateX(-2px); opacity: 0.7; }
    96%         { transform: none; opacity: 0; }
}

/* Hero title typed */
.hero-title {
    font-family: 'Fira Code', monospace;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--accent2);
    margin-bottom: 28px;
    min-height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.title-prefix {
    color: var(--text3);
    font-size: 0.9em;
}

.cursor-blink {
    color: var(--accent);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

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

.hero-desc {
    font-size: 1.1rem;
    color: var(--text2);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.85;
}

.highlight {
    color: var(--accent2);
    font-weight: 600;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--grad1);
    border-radius: 1px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 44px;
}

/* Socials */
.hero-socials {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.social-link {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text2);
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

.social-link svg { width: 20px; height: 20px; }

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(108,99,255,0.5);
}

.social-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateX(-50%) translateY(4px);
}

.social-link:hover .social-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text3);
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 2;
}

.scroll-mouse {
    width: 22px;
    height: 36px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 11px;
    display: flex;
    justify-content: center;
    padding: 4px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollWheel 2.2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%   { transform: translateY(0); opacity: 1; }
    80%  { transform: translateY(14px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* Floating code snippets */
.floating-code {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    background: rgba(26,26,46,0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--text3);
    backdrop-filter: blur(8px);
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.fc-1 { top: 20%; left: 5%; animation: floatCode 7s ease-in-out infinite; }
.fc-2 { top: 60%; right: 4%; animation: floatCode 9s ease-in-out infinite reverse; animation-delay: -2s; }
.fc-3 { bottom: 20%; left: 8%; animation: floatCode 6s ease-in-out infinite; animation-delay: -4s; }

@keyframes floatCode {
    0%,100% { transform: translateY(0) rotate(-1deg); opacity: 0.6; }
    50%      { transform: translateY(-12px) rotate(1deg); opacity: 1; }
}

.code-keyword { color: var(--accent2); }
.code-var     { color: var(--accent3); }
.code-str     { color: var(--green); }

/* ================================================================
   HERO ANIMATE-IN
================================================================ */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s var(--spring);
}

.animate-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================================
   SECTIONS
================================================================ */
section { padding: 110px 0; }

section:nth-of-type(even):not(#hero) {
    background: linear-gradient(180deg, transparent, var(--bg2) 20%, var(--bg2) 80%, transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

.section-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease 0.2s, transform 0.7s var(--spring) 0.2s;
}

.section-subtitle {
    color: var(--text2);
    font-size: 1.05rem;
    margin-top: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.reveal-section.in-view .section-tag,
.reveal-section.in-view .section-title,
.reveal-section.in-view .section-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* Reveal items */
.reveal-item {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s var(--spring);
}

.reveal-section.in-view .reveal-item { opacity: 1; transform: translateY(0); }

.reveal-item[data-delay="1"] { transition-delay: 0.1s; }
.reveal-item[data-delay="2"] { transition-delay: 0.2s; }
.reveal-item[data-delay="3"] { transition-delay: 0.3s; }
.reveal-item[data-delay="4"] { transition-delay: 0.4s; }
.reveal-item[data-delay="5"] { transition-delay: 0.5s; }
.reveal-item[data-delay="6"] { transition-delay: 0.6s; }

/* ================================================================
   ABOUT
================================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 52px;
    align-items: start;
}

.about-text p {
    color: var(--text2);
    font-size: 1.06rem;
    margin-bottom: 20px;
    line-height: 1.85;
}

.about-text strong { color: var(--text); }
.text-accent { color: var(--accent2); font-weight: 600; }

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 36px;
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: var(--glow); }
.stat-card:hover::after { opacity: 0.06; }

.stat-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--accent);
}

.stat-icon svg { width: 22px; height: 22px; }

.stat-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-plus {
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    font-weight: 800;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.about-card {
    border-radius: var(--radius-xl);
    padding: 32px;
    position: sticky;
    top: 90px;
    transition: var(--transition);
}

.about-card:hover { box-shadow: var(--glow), var(--shadow); }

.card-glow {
    position: absolute;
    top: -30%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(108,99,255,0.2), transparent 70%);
    pointer-events: none;
    animation: cardGlow 5s ease-in-out infinite alternate;
}

@keyframes cardGlow {
    from { transform: translate(0,0); }
    to   { transform: translate(-20px, 20px); }
}

.about-info-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 4px;
}

.info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.info-item:hover { background: rgba(255,255,255,0.03); }

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    color: var(--accent);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(108,99,255,0.1);
    border-radius: 8px;
}

.info-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 3px;
}

.info-value {
    display: block;
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 500;
}

/* ================================================================
   SKILLS
================================================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-category {
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.skill-category:hover::before { transform: scaleX(1); }
.skill-category:hover {
    border-color: var(--border2);
    transform: translateY(-6px);
    box-shadow: var(--shadow), 0 0 30px rgba(108,99,255,0.1);
}

.skill-cat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.skill-cat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108,99,255,0.12);
    border-radius: 12px;
    color: var(--accent);
    flex-shrink: 0;
    transition: var(--transition);
}

.skill-category:hover .skill-cat-icon {
    background: var(--accent);
    color: #fff;
    transform: rotate(5deg) scale(1.1);
}

.skill-cat-icon svg { width: 22px; height: 22px; }

.skill-category h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: rgba(108,99,255,0.08);
    border: 1px solid rgba(108,99,255,0.18);
    color: var(--accent2);
    padding: 4px 13px;
    border-radius: 50px;
    font-size: 0.79rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
}

.tag:hover {
    background: rgba(108,99,255,0.18);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108,99,255,0.2);
}

.skill-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--grad1);
    border-radius: 2px;
    width: 0%;
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ================================================================
   PROJECTS
================================================================ */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    padding: 8px 0;
}

.proj-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.proj-card:hover {
    border-color: var(--border2);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(108,99,255,0.1);
}

.proj-cover {
    height: 170px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.proj-cover-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0,0,0,0.2), transparent 50%);
}

.proj-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.08);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.proj-card:hover .proj-hover-overlay { opacity: 1; }

.proj-cover-icon {
    z-index: 2;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    transition: transform 0.4s var(--spring), box-shadow 0.4s ease;
}

.proj-cover-icon svg { width: 36px; height: 36px; }

.proj-card:hover .proj-cover-icon {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.proj-num {
    position: absolute;
    bottom: -18px;
    right: 18px;
    font-family: 'Fira Code', monospace;
    font-size: 5.5rem;
    font-weight: 900;
    color: rgba(255,255,255,0.12);
    z-index: 1;
    line-height: 1;
    user-select: none;
    transition: transform 0.4s ease;
}

.proj-card:hover .proj-num { transform: scale(1.05); }

.proj-live-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0,0,0,0.35);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    z-index: 3;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse 2s infinite;
}

.proj-info {
    padding: 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.proj-title {
    font-size: 1.22rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.proj-desc {
    font-size: 0.9rem;
    color: var(--text2);
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.tech-badge {
    background: rgba(56,189,248,0.08);
    border: 1px solid rgba(56,189,248,0.18);
    color: var(--accent3);
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 500;
    font-family: 'Fira Code', monospace;
    transition: var(--transition);
}

.tech-badge:hover {
    background: rgba(56,189,248,0.16);
    border-color: var(--accent3);
}

.proj-actions { display: flex; gap: 12px; margin-top: auto; }

.proj-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.proj-btn-live {
    background: rgba(52,211,153,0.08);
    color: var(--green);
    border-color: rgba(52,211,153,0.2);
}

.proj-btn-live:hover {
    background: var(--green);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(52,211,153,0.35);
}

.proj-btn-gh {
    background: var(--surface2);
    color: var(--text);
    border-color: var(--border);
}

.proj-btn-gh:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-2px);
}

/* ================================================================
   EDUCATION / TIMELINE
================================================================ */
.timeline {
    position: relative;
    padding-left: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-track {
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
}

.timeline-fill {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 0%;
    background: var(--grad1);
    border-radius: 2px;
    transition: height 0.15s linear;
    box-shadow: 0 0 12px rgba(108,99,255,0.6);
}

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

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -47px;
    top: 16px;
    width: 18px;
    height: 18px;
}

.dot-core {
    position: absolute;
    inset: 3px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(108,99,255,0.6);
}

.dot-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(108,99,255,0.4);
    border-radius: 50%;
    animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
    0%,100% { transform: scale(1); opacity: 0.4; }
    50%      { transform: scale(1.6); opacity: 0; }
}

.timeline-content {
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: rgba(108,99,255,0.3);
    transform: translateX(6px);
    box-shadow: var(--glow);
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.timeline-main h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    margin-top: 6px;
}

.timeline-company {
    font-size: 0.88rem;
    color: var(--accent2);
    font-weight: 500;
}

.timeline-badge {
    display: inline-block;
    background: rgba(108,99,255,0.1);
    border: 1px solid rgba(108,99,255,0.2);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Fira Code', monospace;
    margin-bottom: 6px;
}

.timeline-badge.primary-badge {
    background: rgba(108,99,255,0.2);
    border-color: rgba(108,99,255,0.4);
}

.timeline-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.timeline-date {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text3);
    white-space: nowrap;
    background: var(--surface2);
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid var(--border);
}

.timeline-grade {
    font-size: 0.84rem;
    color: var(--text2);
    white-space: nowrap;
}

.timeline-grade strong { color: var(--accent2); }

.timeline-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text3);
    font-size: 0.83rem;
    margin-top: 4px;
}

/* ================================================================
   CONTACT
================================================================ */
.contact-wrapper { max-width: 700px; margin: 0 auto; }

.contact-cta {
    border-radius: var(--radius-xl);
    padding: 44px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-cta-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(108,99,255,0.2), transparent 70%);
    pointer-events: none;
    animation: ctaGlow 6s ease-in-out infinite alternate;
}

@keyframes ctaGlow {
    from { opacity: 0.6; transform: translateX(-50%) scale(1); }
    to   { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

.contact-cta-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.contact-cta-text {
    color: var(--text2);
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Icon-only contact buttons */
.contact-icon-btn {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass2);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text2);
    transition: var(--transition);
    flex-shrink: 0;
    overflow: visible;
}

.contact-icon-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(108,99,255,0.5);
}

.contact-icon-btn svg {
    flex-shrink: 0;
}

/* Tooltip shown on hover */
.contact-icon-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow);
}

.contact-icon-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--border2);
}

.contact-icon-btn:hover .contact-icon-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ================================================================
   FOOTER
================================================================ */
footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 24px 0;
}

.footer-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 900;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Fira Code', monospace;
    margin-bottom: 4px;
}

footer p { color: var(--text3); font-size: 0.82rem; }
footer strong { color: var(--text2); }

.footer-quote {
    font-style: italic;
    color: var(--text3);
    font-size: 0.78rem;
    opacity: 0.7;
}

/* ================================================================
   BACK TO TOP
================================================================ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    background: var(--grad1);
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 500;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s var(--spring), box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 28px rgba(108,99,255,0.6);
}

/* ================================================================
   MAGNETIC BUTTON EFFECT
================================================================ */
.magnetic { position: relative; }

/* ================================================================
   ANIMATIONS
================================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ================================================================
   NAV ACTIVE LINK
================================================================ */
.nav-item.active {
    color: var(--text) !important;
}

/* ================================================================
   GRADIENT TEXT UTILITY
================================================================ */
.gradient-text {
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1024px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid  { grid-template-columns: 1fr; }
    .about-card  { position: static; }
}

@media (max-width: 768px) {
    body { cursor: auto; }

    .cursor-dot, .cursor-ring { display: none; }

    .nav-links {
        flex-direction: column;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(6,6,16,0.97);
        backdrop-filter: blur(24px);
        align-items: center;
        justify-content: center;
        gap: 28px;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.4s ease, visibility 0.4s;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links .nav-item { font-size: 1.5rem; }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .skills-grid { grid-template-columns: 1fr; }

    .about-stats { grid-template-columns: repeat(3, 1fr); }

    .timeline-header { flex-direction: column; gap: 10px; }
    .timeline-meta { align-items: flex-start; }

    .contact-cta { padding: 32px 24px; }

    .floating-code { display: none; }

    .hero-name { letter-spacing: -2px; }

    .fc-1, .fc-2, .fc-3 { display: none; }
}

@media (max-width: 480px) {
    section { padding: 80px 0; }

    .about-stats { grid-template-columns: 1fr; }

    .hero-actions { flex-direction: column; align-items: center; }

    .proj-grid { grid-template-columns: 1fr; }

    .back-to-top { bottom: 20px; right: 20px; }
}
