/* ============================================================
   RIJOE CHACKO MATHEW — PORTFOLIO STYLESHEET
   Modern dark theme with glassmorphism, gradients & animations
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: blur(20px);

    --accent-1: #00d4ff;
    --accent-2: #7b2ff7;
    --accent-3: #ff6bd6;
    --gradient-main: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --gradient-hover: linear-gradient(135deg, var(--accent-2), var(--accent-3));

    --text-primary: #eaeaea;
    --text-secondary: #a0a0b0;
    --text-muted: #666680;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

    --nav-height: 80px;
    --section-padding: 100px 0;
    --container-width: 1200px;
    --border-radius: 16px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* ---- Utilities ---- */
.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.section-line {
    width: 80px;
    height: 4px;
    background: var(--gradient-main);
    margin: 0 auto 60px;
    border-radius: 2px;
}

/* ---- Theme Toggle Button ---- */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--accent-1);
    border-color: var(--accent-1);
    transform: rotate(30deg);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 25px rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 212, 255, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
}

.btn-outline:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 212, 255, 0.15);
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition);
}

#navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: all var(--transition);
}

.nav-logo:hover {
    color: var(--accent-1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-1);
    background: rgba(0, 212, 255, 0.08);
}

.nav-resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: var(--gradient-main);
    transition: all var(--transition);
}

.nav-resume-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.3);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.4s ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-links {
    text-align: center;
}

.mobile-link {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    padding: 16px 0;
    color: var(--text-secondary);
    transition: all var(--transition);
    transform: translateY(30px);
    opacity: 0;
}

.mobile-menu.active .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu.active li:nth-child(1) .mobile-link {
    transition-delay: 0.1s;
}

.mobile-menu.active li:nth-child(2) .mobile-link {
    transition-delay: 0.15s;
}

.mobile-menu.active li:nth-child(3) .mobile-link {
    transition-delay: 0.2s;
}

.mobile-menu.active li:nth-child(4) .mobile-link {
    transition-delay: 0.25s;
}

.mobile-menu.active li:nth-child(5) .mobile-link {
    transition-delay: 0.3s;
}

.mobile-menu.active li:nth-child(6) .mobile-link {
    transition-delay: 0.35s;
}

.mobile-menu.active li:nth-child(7) .mobile-link {
    transition-delay: 0.4s;
}

.mobile-menu.active li:nth-child(8) .mobile-link {
    transition-delay: 0.45s;
}

.mobile-link:hover {
    color: var(--accent-1);
}

.resume-mobile {
    color: var(--accent-1) !important;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#vanta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #0a0a1a 0%, #0d0d2b 30%, #0a0a0f 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}

.hero-greeting {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--accent-1);
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
    min-height: 2.5em;
}

.typed-prefix {
    color: var(--text-secondary);
}

.typed {
    color: var(--accent-1);
    font-weight: 600;
}

.typed-cursor {
    color: var(--accent-1);
}

.hero-desc {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-muted);
    border-radius: 14px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--accent-1);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease infinite;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }
}

.scroll-indicator p {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
    padding: var(--section-padding);
    background: var(--bg-secondary);
    position: relative;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
}

.image-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
}

.image-glow {
    position: absolute;
    inset: -8px;
    background: var(--gradient-main);
    border-radius: 20px;
    opacity: 0.6;
    filter: blur(20px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    border: 3px solid var(--glass-border);
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.8;
}

.about-text strong {
    color: var(--accent-1);
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.1);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: inline;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-1);
    display: inline;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   SKILLS
   ============================================================ */
#skills {
    padding: var(--section-padding);
    position: relative;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 28px;
}

.skill-card {
    text-align: center;
    padding: 36px 24px 28px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    transition: all 0.4s ease;
    cursor: default;
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.25);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.1);
    background: var(--bg-card-hover);
}

.skill-ring-container {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
}

.skill-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.5s ease;
}

.skill-icon-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    color: var(--accent-1);
}

.skill-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.skill-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================================
   PROJECTS
   ============================================================ */
#projects {
    padding: var(--section-padding);
    background: var(--bg-secondary);
    position: relative;
}

#projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-2), var(--accent-1), transparent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
}

.project-card {
    border-radius: var(--border-radius);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: rgba(123, 47, 247, 0.3);
    box-shadow: 0 25px 60px rgba(123, 47, 247, 0.12);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(123, 47, 247, 0.08) 100%);
    font-size: 3.5rem;
    color: var(--accent-1);
    transition: all 0.5s ease;
}

.project-card:hover .project-placeholder-img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Touch devices: always show overlay so project links are tappable */
@media (hover: none) {
    .project-overlay {
        opacity: 1;
        background: rgba(10, 10, 15, 0.6);
    }

    .project-link-btn {
        transform: translateY(0);
    }

    .skill-card {
        transform: none !important;
    }
}

.project-links {
    display: flex;
    gap: 16px;
}

.project-link-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    transition: all var(--transition);
    transform: translateY(20px);
}

.project-card:hover .project-link-btn {
    transform: translateY(0);
}

.project-link-btn:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    color: #000;
    transform: translateY(0) scale(1.1) !important;
}

.project-info {
    padding: 24px;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent-1);
    border: 1px solid rgba(0, 212, 255, 0.15);
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
#experience {
    padding: var(--section-padding);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-2), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 60px;
}

.timeline-item.left {
    left: 0;
    text-align: right;
    padding-right: 60px;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    top: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: 3px solid var(--bg-primary);
    z-index: 2;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.timeline-item.left .timeline-dot {
    right: -9px;
}

.timeline-item.right .timeline-dot {
    left: -9px;
}

.timeline-content {
    padding: 28px;
    transition: all var(--transition);
}

.timeline-content:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.08);
}

.timeline-date {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-1);
    margin-bottom: 12px;
}

.timeline-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent-1);
    margin-bottom: 12px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.timeline-item.left .timeline-tags {
    justify-content: flex-end;
}

.timeline-tags span {
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(123, 47, 247, 0.1);
    color: var(--accent-2);
    border: 1px solid rgba(123, 47, 247, 0.15);
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
    padding: var(--section-padding);
    background: var(--bg-secondary);
    text-align: center;
    position: relative;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-3), transparent);
}

.contact-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 48px;
}

.social-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.social-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    border-color: transparent;
    color: #fff;
}

.social-icon[data-color="#0A66C2"]:hover {
    background: #0A66C2;
    box-shadow: 0 10px 30px rgba(10, 102, 194, 0.4);
}

.social-icon[data-color="#f0f0f0"]:hover {
    background: #333;
    box-shadow: 0 10px 30px rgba(240, 240, 240, 0.2);
}

.social-icon[data-color="#E4405F"]:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 10px 30px rgba(228, 64, 95, 0.4);
}

.social-icon[data-color="#1877F2"]:hover {
    background: #1877F2;
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.4);
}

.social-icon[data-color="#1DA1F2"]:hover {
    background: #1DA1F2;
    box-shadow: 0 10px 30px rgba(29, 161, 242, 0.4);
}

.contact-email-btn {
    margin-top: 10px;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    padding: 30px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-inner {
    text-align: center;
}

.footer-inner p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-note {
    margin-top: 6px;
}

.heart {
    color: #ff4757;
    display: inline-block;
    animation: heartBeat 1.5s ease infinite;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
    }

    .timeline-item .timeline-dot {
        left: 11px !important;
        right: auto !important;
    }

    .timeline-item.left .timeline-tags {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
        --section-padding: 70px 0;
    }

    .nav-links {
        display: none;
    }

    .nav-resume-btn {
        display: none;
    }

    .hamburger {
        display: flex;
        margin-left: 10px;
    }

    .mobile-link {
        font-size: 1.5rem;
        padding: 12px 0;
    }

    .hero-name {
        font-size: clamp(1.8rem, 8vw, 3.5rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .about-grid {
        gap: 30px;
    }

    .image-wrapper {
        width: 220px;
        height: 220px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-card {
        padding: 22px 14px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .skill-card {
        padding: 24px 16px 20px;
    }

    .skill-ring-container {
        width: 90px;
        height: 90px;
    }

    .skill-icon-center {
        font-size: 1.8rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .education-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        padding: 24px 20px;
    }

    .timeline-content {
        padding: 22px 18px;
    }

    .social-icons {
        gap: 14px;
    }

    .social-icon {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }

    .section-title {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

    .section-line {
        margin-bottom: 40px;
    }

    .contact-desc {
        font-size: 1rem;
        padding: 0 10px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 60px 0;
    }

    .container {
        width: 92%;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 18px 10px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .image-wrapper {
        width: 180px;
        height: 180px;
    }

    .hero-greeting {
        font-size: 0.9rem;
    }

    .hero-desc {
        font-size: 0.9rem;
        padding: 0 10px;
    }

    .scroll-indicator {
        margin-top: 30px;
    }

    .about-text p {
        font-size: 0.95rem;
    }

    .timeline-content h3 {
        font-size: 1.05rem;
    }

    .timeline-content p {
        font-size: 0.85rem;
    }

    .education-info h3 {
        font-size: 1.05rem;
    }

    .education-info p {
        font-size: 0.85rem;
    }

    .project-info h3 {
        font-size: 1.05rem;
    }

    .project-info p {
        font-size: 0.85rem;
    }

    .mobile-link {
        font-size: 1.3rem;
        padding: 10px 0;
    }

    .footer-inner p {
        font-size: 0.85rem;
    }
}

/* ============================================================
   SELECTION & SCROLLBAR
   ============================================================ */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent-1), var(--accent-2));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--accent-2), var(--accent-3));
}

/* ============================================================
   LOADING ANIMATION (before Vanta loads)
   ============================================================ */
.hero-content {
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   EDUCATION
   ============================================================ */
#education {
    padding: var(--section-padding);
    background: var(--bg-secondary);
    position: relative;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.education-card {
    display: flex;
    gap: 24px;
    padding: 32px;
    transition: all var(--transition);
}

.education-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.08);
}

.education-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.education-info {
    flex: 1;
}

.education-date {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-1);
    margin-bottom: 12px;
}

.education-info h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.education-info h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent-1);
    margin-bottom: 12px;
}

.education-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
}

.education-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.education-tags span {
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(123, 47, 247, 0.1);
    color: var(--accent-2);
    border: 1px solid rgba(123, 47, 247, 0.15);
}

/* ============================================================
   THEME TRANSITION
   ============================================================ */
body.theme-transitioning,
body.theme-transitioning * {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}

/* ============================================================
   LIGHT MODE THEME
   ============================================================ */
[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e8edf2;
    --bg-card: rgba(255, 255, 255, 0.88);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --glass-border: rgba(30, 64, 120, 0.1);
    --glass-blur: blur(12px);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --accent-1: #0284c7;
    --accent-2: #6366f1;
    --accent-3: #a855f7;
    --gradient-main: linear-gradient(135deg, #0284c7, #6366f1);
    --gradient-hover: linear-gradient(135deg, #6366f1, #a855f7);
}

[data-theme="light"] #vanta-bg {
    background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 30%, #f0f4f8 100%);
}

[data-theme="light"] .hero-content {
    text-shadow: 0 1px 4px rgba(240, 244, 248, 0.9);
}

[data-theme="light"] .hero-content .gradient-text {
    text-shadow: none;
}

[data-theme="light"] .hero-content .btn,
[data-theme="light"] .hero-content .btn * {
    text-shadow: none;
}

[data-theme="light"] .hero-desc,
[data-theme="light"] .hero-greeting,
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .typed-prefix {
    text-shadow: 0 1px 8px rgba(240, 244, 248, 0.95), 0 0 24px rgba(240, 244, 248, 0.8);
}

[data-theme="light"] #navbar {
    background: rgba(240, 244, 248, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="light"] #navbar.scrolled {
    background: rgba(240, 244, 248, 0.95);
    border-bottom: 1px solid rgba(30, 64, 120, 0.08);
    box-shadow: 0 1px 12px rgba(2, 132, 199, 0.08);
}

[data-theme="light"] .mobile-menu {
    background: rgba(240, 244, 248, 0.98);
}

[data-theme="light"] .skill-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(30, 64, 120, 0.08);
    box-shadow: 0 1px 8px rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .skill-card:hover {
    box-shadow: 0 8px 32px rgba(2, 132, 199, 0.14);
    border-color: rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .ring-bg {
    stroke: rgba(30, 64, 120, 0.08);
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(30, 64, 120, 0.08);
    box-shadow: 0 1px 8px rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .stat-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(30, 64, 120, 0.08);
    box-shadow: 0 1px 8px rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .project-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(30, 64, 120, 0.08);
    box-shadow: 0 1px 8px rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 8px 32px rgba(2, 132, 199, 0.12);
}

[data-theme="light"] .project-placeholder-img {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.07) 0%, rgba(99, 102, 241, 0.07) 100%);
}

[data-theme="light"] .project-tags span,
[data-theme="light"] .timeline-tags span,
[data-theme="light"] .education-tags span {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .timeline-dot {
    border-color: var(--bg-primary);
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.35);
}

[data-theme="light"] .timeline-date,
[data-theme="light"] .education-date {
    background: rgba(2, 132, 199, 0.1);
}

[data-theme="light"] .education-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(30, 64, 120, 0.08);
    box-shadow: 0 1px 8px rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .education-icon {
    background: linear-gradient(135deg, #0284c7, #6366f1);
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .btn-outline {
    border-color: rgba(30, 64, 120, 0.15);
    color: var(--text-primary);
}

[data-theme="light"] .btn-outline:hover {
    border-color: #0284c7;
    color: #0284c7;
}

[data-theme="light"] .btn-primary {
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3);
}

[data-theme="light"] .nav-resume-btn {
    background: linear-gradient(135deg, #0284c7, #6366f1);
    color: #fff;
}

[data-theme="light"] .social-icon {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(30, 64, 120, 0.1);
    color: #334155;
    box-shadow: 0 1px 6px rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .social-icon[data-color="#f0f0f0"]:hover {
    background: #1e293b;
    color: #fff;
}

[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(30, 64, 120, 0.12);
    color: #f59e0b;
}

[data-theme="light"] .back-to-top {
    background: linear-gradient(135deg, #0284c7, #6366f1);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

[data-theme="light"] #footer {
    border-top-color: rgba(30, 64, 120, 0.08);
}

[data-theme="light"] #contact::before {
    background: linear-gradient(90deg, transparent, #0284c7, #a855f7, transparent);
}

[data-theme="light"] .contact-email-btn {
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.25);
}

[data-theme="light"] .section-line {
    background: linear-gradient(135deg, #0284c7, #6366f1);
}

[data-theme="light"] ::selection {
    background: rgba(2, 132, 199, 0.2);
    color: #0f172a;
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f0f4f8;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(#0284c7, #6366f1);
}