﻿/* ============================================
   ANDREW JERRY V - PROFESSIONAL PORTFOLIO
   Modern Dark Theme with Premium Aesthetics
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: rgba(18, 18, 26, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);

    /* Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #06b6d4;
    --accent-pink: #ec4899;
    --accent-green: #10b981;

    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.4) 50%, rgba(236, 72, 153, 0.4) 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.1) 0px, transparent 50%);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(99, 102, 241, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-glow-purple: 0 0 60px rgba(139, 92, 246, 0.25);

    /* Spacing */
    --section-padding: clamp(4rem, 10vw, 8rem);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar - Dark Theme (Pure White) */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e0e0e0;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #ffffff var(--bg-primary);
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-mesh);
    z-index: -2;
    pointer-events: none;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    pointer-events: none;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--gradient-glow);
    filter: blur(100px);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
    animation: float-glow 20s ease-in-out infinite;
}

.bg-glow-1 {
    top: -200px;
    left: -200px;
}

.bg-glow-2 {
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

@keyframes float-glow {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, 50px) scale(1.1);
    }

    50% {
        transform: translate(0, 100px) scale(1);
    }

    75% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* Particles Canvas */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.gradient-text-animated {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899, #06b6d4, #6366f1);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-shift 3s linear infinite;
}

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

    100% {
        background-position: 200% center;
    }
}

.text-glow {
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.mono-text {
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-base);
}

.navbar.scrolled {
    padding: 0.75rem 2rem;
    background: rgba(10, 10, 15, 0.95);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* contain the absolute logo */
}

.nav-logo {
    position: absolute;
    left: 0;
    top: 60%;
    transform: translateY(-50%);
    z-index: 1001;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    pointer-events: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    padding: 0.6rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

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

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem 2rem;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav.active {
    display: flex;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-floating-badge.top-left {
        display: none;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content {
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

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

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-typing {
    font-size: 1.125rem;
    color: var(--text-muted);
    min-height: 3rem;
    margin-bottom: 2rem;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent-primary);
    margin-left: 2px;
    animation: blink 0.75s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image-container {
    position: relative;
    width: clamp(280px, 30vw, 400px);
    height: clamp(280px, 30vw, 400px);
}

.hero-image-ring {
    position: absolute;
    inset: -10px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: spin-slow 20s linear infinite;
    opacity: 0.7;
}

.hero-image-ring::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: var(--bg-primary);
    border-radius: 50%;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg-primary);
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-floating-badge {
    position: absolute;
    padding: 0.5rem 1rem;
    background: rgba(18, 18, 26, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    box-shadow: var(--shadow-lg);
}

.hero-floating-badge.top-left {
    top: 10%;
    left: -20%;
    animation-delay: -2s;
}

.hero-floating-badge.bottom-right {
    bottom: 10%;
    right: -20%;
}

.hero-floating-badge i {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.hero-floating-badge span {
    font-size: 0.875rem;
    font-weight: 500;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* Hero responsive */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image-wrapper {
        order: 1;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-floating-badge {
        display: none;
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
}

/* ============================================
   GLASS CARD
   ============================================ */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition-base);
}

.glass-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.glass-card-glow {
    position: relative;
}

.glass-card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: var(--gradient-primary);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: var(--transition-base);
    filter: blur(8px);
}

.glass-card-glow:hover::before {
    opacity: 0.3;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: var(--section-padding) 2rem;
    position: relative;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin: 1.5rem auto 0;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.about-card {
    padding: 1.5rem;
}

.about-card-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 1rem;
}

.about-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.about-card-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.about-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

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

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skills-column h3 {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skills-column h3 i {
    color: var(--accent-primary);
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 500;
    font-size: 0.9375rem;
}

.skill-percent {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.skill-bar-bg {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.pro-skill-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.pro-skill-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin: 0 auto 1rem;
    transition: var(--transition-base);
}

.pro-skill-card:hover .pro-skill-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
}

/* Professional Skills Icon Animations */
/* Team Collaboration - Users group together */
.pro-skill-card:nth-child(1):hover .pro-skill-icon i {
    animation: team-pulse 0.6s ease-in-out;
}

@keyframes team-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2) translateX(-3px);
    }

    50% {
        transform: scale(1.3);
    }

    75% {
        transform: scale(1.2) translateX(3px);
    }
}

/* Problem Solving - Puzzle piece clicks into place */
.pro-skill-card:nth-child(2):hover .pro-skill-icon i {
    animation: puzzle-click 0.5s ease-out;
}

@keyframes puzzle-click {
    0% {
        transform: rotate(-15deg) scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: rotate(10deg) scale(1.15);
    }

    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

/* Adaptability - Sync icon rotates */
.pro-skill-card:nth-child(3):hover .pro-skill-icon i {
    animation: sync-rotate 0.8s linear infinite;
}

@keyframes sync-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Critical Thinking - Brain pulses/glows */
.pro-skill-card:nth-child(4):hover .pro-skill-icon i {
    animation: brain-think 1s ease-in-out infinite;
}

@keyframes brain-think {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 transparent);
    }

    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    }
}

.pro-skill-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pro-skill-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Tech Stack */
.tech-stack {
    margin-top: 3rem;
}

.tech-stack-header {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tech-stack-header i {
    color: var(--accent-primary);
}

.tech-stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-base);
}

.tech-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: var(--transition-base);
}

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

.tech-item:hover .tech-icon {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.tech-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Tech Stack Floating Animation */
@keyframes tech-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes tech-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }

    50% {
        box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.15);
    }
}

.tech-item {
    animation: tech-float 3s ease-in-out infinite;
}

.tech-item:nth-child(1) {
    animation-delay: 0s;
}

.tech-item:nth-child(2) {
    animation-delay: 0.2s;
}

.tech-item:nth-child(3) {
    animation-delay: 0.4s;
}

.tech-item:nth-child(4) {
    animation-delay: 0.6s;
}

.tech-item:nth-child(5) {
    animation-delay: 0.8s;
}

.tech-item:nth-child(6) {
    animation-delay: 1s;
}

.tech-item:nth-child(7) {
    animation-delay: 1.2s;
}

.tech-item:nth-child(8) {
    animation-delay: 1.4s;
}

.tech-item:nth-child(9) {
    animation-delay: 1.6s;
}

.tech-item:nth-child(10) {
    animation-delay: 1.8s;
}

.tech-icon {
    animation: tech-pulse 4s ease-in-out infinite;
}

.tech-item:hover {
    animation-play-state: paused;
}

.tech-item:hover .tech-icon {
    animation-play-state: paused;
}

/* Python Gradient (Official Blue + Yellow) */
.python-gradient {
    background: linear-gradient(150deg, #3776ab 50%, #ffd43b 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Add a multi‑colour gradient for the Java icon (similar to Python) */
.java-gradient {
    background: linear-gradient(180deg, #F44336 50%, #1565C0 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 640px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

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

    .tech-icon {
        font-size: 1rem; /* keep icon text readable */
    }
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-base);
    position: relative;
}

.project-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition-base);
}

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

.project-overlay-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
}

.project-overlay-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.25rem;
    line-height: 1.6;
    max-width: 320px;
    padding: 0 0.5rem;
}

.project-overlay-tags {
    font-size: 0.8125rem;
    color: var(--accent-tertiary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.project-overlay-buttons {
    display: flex;
    gap: 0.75rem;
}

.project-overlay-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.project-overlay-btn.primary {
    background: white;
    color: #0a0a0f;
}

.project-overlay-btn.primary:hover {
    background: var(--accent-primary);
    color: white;
}

.project-overlay-btn.secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.project-overlay-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.project-overlay-btn:hover {
    transform: translateY(-2px);
}

.project-content {
    padding: 1.25rem 1.5rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.project-title {
    font-size: 1.0625rem;
    font-weight: 600;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    white-space: nowrap;
}

.project-tag.ongoing {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

/* ============================================
   FIGMA SECTION
   ============================================ */
.figma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.figma-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-base);
}

.figma-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.figma-preview {
    height: 250px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.figma-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.figma-card:hover .figma-preview img {
    transform: scale(1.05);
}

.figma-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.figma-content {
    padding: 1.25rem 1.5rem;
}

.figma-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.figma-title {
    font-size: 1.0625rem;
    font-weight: 600;
}

.figma-type {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.figma-type.app {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.figma-type.web {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

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

/* ============================================
   GITHUB SECTION
   ============================================ */
.github-section {
    background: var(--bg-secondary);
}

.github-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.github-header h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.github-header h3 i {
    font-size: 1.5rem;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.github-btn:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.github-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.github-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.github-chart,
.github-stats {
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 1.5rem;
    overflow: hidden;
}

.github-chart img,
.github-stats img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

@media (max-width: 968px) {
    .github-grid {
        grid-template-columns: 1fr;
    }

    .GitHub-Data {
        display: none;
    }
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-intro h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.contact-intro p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    transition: var(--transition-base);
}

.contact-icon.location {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
    color: var(--accent-primary);
}

.contact-icon.email {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    color: var(--accent-secondary);
}

.contact-icon.phone {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.05));
    color: var(--accent-tertiary);
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
}

.contact-item-text h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-item-text p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Contact Links (clickable) */
a.contact-link {
    text-decoration: none;
    cursor: pointer;
}

a.contact-link:hover {
    border-color: var(--border-accent);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

a.contact-link:hover .contact-icon {
    transform: scale(1.15);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: var(--transition-base);
}

.social-link.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.social-link.github:hover {
    background: #333;
    border-color: #333;
    color: white;
}

.social-link.figma:hover {
    background: linear-gradient(135deg, #f24e1e, #a259ff, #1abcfe);
    border-color: white;
    color: white;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 2rem 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.footer-divider {
    height: 1px;
    background: var(--border-subtle);
    margin-bottom: 1.5rem;
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================
   CV VIEWER
   ============================================ */
.cv-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.cv-viewer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cv-viewer-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.cv-viewer-header {
    padding: 1rem 1.5rem;
    background: var(--gradient-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cv-viewer-header h3 {
    font-weight: 600;
}

/* Make CV viewer header title white in light theme */
[data-theme="light"] .cv-viewer-header h3 {
    color: white;
}

.cv-viewer-actions {
    display: flex;
    gap: 0.5rem;
}

.download-cv-btn {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--accent-primary);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.download-cv-btn:hover {
    transform: translateY(-2px);
}

.close-cv-viewer {
    padding: 0.5rem 1rem;
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.close-cv-viewer:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cv-viewer-content {
    height: calc(90vh - 60px);
}

.cv-viewer-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   ANIMATIONS & UTILITIES
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 {
    transition-delay: 0.1s;
}

.fade-in-delay-2 {
    transition-delay: 0.2s;
}

.fade-in-delay-3 {
    transition-delay: 0.3s;
}

.fade-in-delay-4 {
    transition-delay: 0.4s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Responsive utilities */
@media (max-width: 480px) {
    .hero {
        padding: 6rem 1rem 3rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   PROJECT PLACEHOLDER
   ============================================ */
.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   CONTACT SECTION OVERFLOW FIX
   ============================================ */
.contact-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    min-width: 0;
}

.contact-item-text {
    min-width: 0;
    overflow: hidden;
}

.contact-item-text h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.contact-item-text p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    white-space: nowrap;
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(0, 0, 0, 0.03);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(99, 102, 241, 0.3);

    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px -12px rgba(0, 0, 0, 0.2);

    --gradient-mesh: radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
}

[data-theme="light"] .bg-glow {
    opacity: 0.2;
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.9);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .project-overlay {
    background: rgba(255, 255, 255, 0.97);
}

[data-theme="light"] .project-overlay-title {
    color: #1e293b;
}

[data-theme="light"] .project-overlay-desc {
    color: #475569;
}

[data-theme="light"] .project-overlay-btn.primary {
    background: var(--accent-primary);
    color: white;
}

[data-theme="light"] .project-overlay-btn.secondary {
    border-color: rgba(0, 0, 0, 0.2);
    color: #1e293b;
}

/* Light Theme Scrollbar (Pure Black) */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #f8fafc;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

[data-theme="light"] {
    scrollbar-color: var(--accent-primary) #f8fafc;
}

/* Theme toggle cursor on hero image */
.hero-image {
    cursor: pointer;
}

.hero-image::after {
    content: '\f186';
    font-family: 'Font Awesome 6 Free';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .hero-image::after {
    content: '\f185';
}

.hero-image:hover::after {
    opacity: 1;
}

/* Light theme floating badges */
[data-theme="light"] .hero-floating-badge {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

[data-theme="light"] .hero-floating-badge span {
    color: #1e293b;
}

/* Taller project cards */
.project-image {
    height: 260px;
}

/* Mobile responsive improvements */
@media (max-width: 640px) {
    .hero-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-image-container {
        width: 220px;
        height: 220px;
    }

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

    .project-image {
        height: 200px;
    }

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

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

    .contact-info {
        grid-template-columns: 1fr;
    }

    .contact-item-text p {
        white-space: normal;
        word-break: break-word;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .tech-stack-grid {
        gap: 1rem;
    }

    .tech-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

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

/* Hide skill percentages */
.skill-percent {
    display: none;
}

/* Fix mobile menu z-index */
.mobile-nav {
    z-index: 9999;
}

.mobile-menu-toggle {
    z-index: 10000;
}

/* Mobile view adjustments */
@media (max-width: 768px) {

    /* Hide about image on mobile */
    .about-image {
        display: none;
    }

    /* Compact professional skills */
    .professional-skills {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .pro-skill-card {
        padding: 1rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        text-align: left;
    }

    .pro-skill-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1rem;
        margin: 0;
    }

    .pro-skill-title {
        margin: 0;
        font-size: 0.8125rem;
    }

    .pro-skill-text {
        display: none;
    }

    /* About cards compact on mobile */
    .about-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .about-card {
        padding: 1rem;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }

    .about-card-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 1.25rem;
        margin: 0;
    }

    .about-card-title {
        margin: 0;
        font-size: 0.9375rem;
    }

    .about-card-text {
        display: none;
    }

    /* Taller project cards on mobile */
    .project-image {
        height: 280px;
    }

    .project-overlay {
        padding: 1.5rem;
    }

    .project-overlay-title {
        font-size: 1.125rem;
    }

    .project-overlay-desc {
        font-size: 0.8125rem;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .project-overlay-tags {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }

    .project-overlay-buttons {
        flex-wrap: wrap;
    }

    /* Mobile menu toggle styling */
    .mobile-menu-toggle {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: var(--bg-glass);
        border: 1px solid var(--border-subtle);
        transition: all 0.2s ease;
    }

    .mobile-menu-toggle:hover {
        background: rgba(99, 102, 241, 0.1);
        border-color: var(--accent-primary);
    }
}

/* Light theme hamburger menu fix */
[data-theme="light"] .mobile-menu-toggle {
    color: #1e293b;
}

[data-theme="light"] .mobile-menu-toggle:hover {
    color: var(--accent-primary);
}

[data-theme="light"] .mobile-nav {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .mobile-nav .nav-link {
    color: #1e293b;
}

[data-theme="light"] .mobile-nav .nav-link:hover {
    color: var(--accent-primary);
}

/* Disable hover effects for the Tech Stack glass‑card only */
.tech-stack .glass-card:hover {
    /* Cancel any transform, shadow, or background changes on hover */
    transform: none !important;
    box-shadow: none !important;
    /* If a background‑color change is defined elsewhere, reset it */
    background-color: inherit !important;
}

/* Mobile view: stop tech‑stack animations and hide background mesh */
@media (max-width: 768px) {
    /* Hide the animated background mesh */
    .bg-mesh {
        display: none;
    }
    .particles {
        display: none;
    }
    /* Disable tech‑stack floating and pulse animations */
    .tech-item,
    .tech-icon {
        animation: none !important;
    }

    .tech-item:hover .tech-icon,
    .tech-item:hover .tech-icon {
        animation: none !important;
        animation-play-state: paused !important;
    }
}
/* Make project images scale with the screen */
.project-image {
  width: 100%;
  height: auto;        /* preserve aspect ratio */
  max-width: 600px;    /* max size on large screens */
  object-fit: cover;   /* helps if image container is smaller */
}

/* Optional smaller max on very small screens */
@media (max-width: 640px) {
  .project-image {
    max-width: 100%;   /* full width on mobile */
  }
}