/* =============================================
   GOOGLE FONTS IMPORT
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
    --color-primary: #8B5CF6;
    --color-secondary: #06B6D4;
    --color-bg-dark: #050505;
    --color-bg-medium: #0a0a0a;
    --color-bg-light: #111111;
    --color-text-primary: #ffffff;
    --color-text-secondary: #a1a1aa;
    --color-border: rgba(255, 255, 255, 0.1);
    
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Poppins', sans-serif;
    
    --spacing-xs: 0.75rem;
    --spacing-sm: 1.5rem;
    --spacing-md: 3rem;
    --spacing-lg: 6rem;
    --spacing-xl: 10rem;
    
    --radius-sm: 0.75rem;
    --radius-md: 1.25rem;
    --radius-lg: 2rem;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.7);
    --shadow-neon-violet: 0 0 30px rgba(139, 92, 246, 0.4);
    --shadow-neon-cyan: 0 0 30px rgba(6, 182, 212, 0.4);
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.05);
}

/* =============================================
   RESET & BASE STYLES
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::selection {
    background: var(--color-primary);
    color: white;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Normal button hovers without blur */
.btn:hover, button:hover {
    filter: brightness(1.1);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* =============================================
   CUSTOM CURSOR - DISABLED (USING BROWSER DEFAULT)
   ============================================= */

/* Hide custom cursor elements */
.custom-cursor-dot,
.custom-cursor-ring {
    display: none !important;
}

/* Use standard browser cursors only */
body, html {
    cursor: auto;
}

a, button, .btn, .nav-link {
    cursor: pointer;
}

.view-project-btn {
    cursor: pointer;
}

input, textarea {
    cursor: text;
}

/* Core Dot (Inner) - DISABLED */
.custom-cursor-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #06B6D4;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10002;
    transform: translate(-50%, -50%);
    opacity: 0;
    left: 50%;
    top: 50%;
    will-change: left, top;
    transition: transform 0.15s ease, opacity 0.2s ease;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.8), 0 0 20px rgba(6, 182, 212, 0.4);
    display: none;
}

/* Follower Ring (Outer) - DISABLED */
.custom-cursor-ring {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid #8B5CF6;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    opacity: 0;
    left: 50%;
    top: 50%;
    will-change: left, top, width, height;
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.3s ease,
                background 0.3s ease,
                border 0.3s ease;
    background: transparent;
    mix-blend-mode: normal;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
    display: none;
}

/* Hover State - Links & Buttons */
.custom-cursor-dot.hover {
    width: 0;
    height: 0;
    opacity: 0;
}

.custom-cursor-ring.hover {
    width: 60px;
    height: 60px;
    background: rgba(6, 182, 212, 0.3);
    border: 2px solid #06B6D4;
    opacity: 1;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
}

/* Click/Active State */
.custom-cursor-ring.click {
    animation: cursorClick 0.3s ease-out;
}

@keyframes cursorClick {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(0.8);
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.8);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Hide cursors when mouse leaves viewport */
.custom-cursor-dot.hidden,
.custom-cursor-ring.hidden {
    opacity: 0 !important;
}

/* =============================================
   CUSTOM SCROLLBAR
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-secondary), var(--color-primary));
}

/* =============================================
   PARTICLE CANVAS BACKGROUND
   ============================================= */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--color-bg-dark);
}

#particleCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Floating Color Blobs */
.color-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: blobFloat 20s infinite ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-primary), transparent);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--color-secondary), transparent);
    bottom: 20%;
    right: 15%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-primary), transparent);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* =============================================
   CONTAINER & UTILITY CLASSES
   ============================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

/* Buttons with Liquid Fill */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: var(--shadow-neon-violet);
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5);
    border-color: var(--color-primary);
}

.btn-secondary {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    color: var(--color-text-primary);
    border-color: var(--glass-border);
}

.btn-secondary::before {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-neon-violet);
}

/* =============================================
   NAVIGATION BAR
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 1rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    background: rgba(5, 5, 5, 0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    font-size: 0.95rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width var(--transition-normal);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--color-text-primary);
    transition: all var(--transition-normal);
    border-radius: 3px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* =============================================
   HERO SECTION - HOLLOW TEXT EFFECT
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
    font-weight: 400;
    animation: fadeInUp 0.8s var(--transition-spring) backwards;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    margin-bottom: var(--spacing-sm);
    font-weight: 900;
    letter-spacing: -0.03em;
    position: relative;
    -webkit-text-stroke: 2px var(--color-primary);
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s var(--transition-spring) 0.2s backwards;
}

.hero-title.filled {
    -webkit-text-fill-color: var(--color-primary);
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.7));
}

.cursor {
    animation: blink 1s infinite;
    color: var(--color-primary);
    font-weight: 300;
    font-size: 1.1em;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.8));
}

/* Increase space between first and last name in the typing effect */
#typedText {
    display: inline-block;
    /* larger gap between first and last name */
    word-spacing: 1.2rem;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s var(--transition-spring) 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s var(--transition-spring) 0.6s backwards;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--color-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    animation: pulseGlow 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

.scroll-down:hover {
    transform: translateX(-50%) scale(1.1);
}

.scroll-down span {
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.arrow-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: -2px;
}

.chevron {
    position: relative;
    width: 28px;
    height: 8px;
    opacity: 0;
    animation: chevronMove 3s ease-out infinite;
}

.chevron:before,
.chevron:after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
}

.chevron:before {
    left: 0;
    transform: skewY(30deg);
}

.chevron:after {
    right: 0;
    width: 50%;
    transform: skewY(-30deg);
}

.chevron:nth-child(1) {
    animation-delay: 0s;
}

.chevron:nth-child(2) {
    animation-delay: 0.15s;
}

.chevron:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes chevronMove {
    0% {
        opacity: 0;
        transform: translateY(-15px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(15px);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px) rotateX(10deg) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
    }
}

/* =============================================
   ABOUT SECTION - BLOB MASKED IMAGES
   ============================================= */
.about {
    padding: var(--spacing-xl) 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        var(--color-bg-medium);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.3;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: stretch;
}

.about-text {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: var(--spacing-sm);
}

.about-intro {
    font-size: 1.25rem;
    color: var(--color-text-primary);
    font-weight: 500;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* Wrapper that provides the rounded gradient border and preserves rounding on the image */
.profile-photo-wrap {
    display: flex;
    width: 100%;
    max-width: 500px;
    height: 100%;
    border-radius: var(--radius-lg);
    padding: 4px; /* border thickness */
    background: linear-gradient(180deg, rgba(139,92,246,0.18), rgba(6,182,212,0.12));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 0 30px rgba(139,92,246,0.06);
}

.profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 4px);
    border: none;
    box-shadow: inset 0 0 50px rgba(139, 92, 246, 0.06);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow:
        0 25px 80px rgba(139, 92, 246, 0.3),
        inset 0 0 60px rgba(139, 92, 246, 0.15);
}

.image-placeholder { 
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid;
    border-image: linear-gradient(180deg, rgba(255,255,255,0.2), transparent) 1;
    clip-path: path('M 0 50 Q 0 0, 50 0 L 350 0 Q 400 0, 400 50 L 400 350 Q 400 400, 350 400 L 50 400 Q 0 400, 0 350 Z');
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 0 50px rgba(139, 92, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* =============================================
   PROJECTS SECTION - 3D TILT CARDS
   ============================================= */
.projects {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-dark);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
    opacity: 0.3;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    align-items: stretch;
}

.project-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid;
    border-image: linear-gradient(180deg, rgba(255,255,255,0.2), transparent) 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover::before {
    opacity: 1;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139, 92, 246, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover::after {
    opacity: 1;
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.project-image .image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-bg-dark), var(--color-bg-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    clip-path: inset(0 round 0);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(6, 182, 212, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: white;
    width: 50px;
    height: 50px;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
    pointer-events: auto;
}

.project-link:hover {
    transform: scale(1.1);
}

.project-info {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.project-description {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
    flex-grow: 0;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: auto;
    padding-bottom: var(--spacing-md);
}

.project-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.view-project-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    cursor: pointer !important;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    z-index: 10;
    text-align: center;
    width: 100%;
    height: 52px;
}

.view-project-btn * {
    cursor: pointer !important;
    pointer-events: none;
}

.view-project-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.view-project-btn:hover::before {
    opacity: 1;
}

.view-project-btn span {
    position: relative;
    z-index: 1;
}

.view-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.tag {
    padding: 0.375rem 0.875rem;
    background: rgba(139, 92, 246, 0.1);
    color: var(--color-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* =============================================
   SKILLS SECTION
   ============================================= */
.skills {
    padding: var(--spacing-xl) 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        var(--color-bg-medium);
    position: relative;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.3;
}

.skills-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    align-items: stretch;
}

.skill-category {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
}

.skill-category:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
    transform: translateY(-5px);
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.skill-item {
    margin-bottom: 1.4rem;
}

.skill-item:last-child {
    margin-bottom: 0;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.skill-percentage {
    color: var(--color-primary);
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer-skill 2s infinite;
}

@keyframes shimmer-skill {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-dark);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
    opacity: 0.3;
}

.contact-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-lg);
}

.contact-form {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
}

.contact-form:hover {
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.info-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    transition: all var(--transition-normal);
}

.info-card:hover {
    transform: translateX(8px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    background: var(--glass-hover);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.info-card:hover .info-icon {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.info-text h4 {
    margin-bottom: 0.25rem;
    color: var(--color-text-primary);
}

.info-text p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.35rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: all var(--transition-normal);
    position: relative;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.social-link svg {
    position: relative;
    z-index: 1;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover {
    color: white;
    transform: translateY(-8px) scale(1.1);
    box-shadow: var(--shadow-neon-violet);
    border-color: transparent;
}

.github-qr-card {
    margin-top: 0.75rem;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
}

.github-qr-card h4 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
    color: var(--color-text-primary);
}

.github-qr-card p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.github-qr-frame {
    width: 176px;
    height: 176px;
    margin: 0.9rem auto 0.65rem;
    padding: 8px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 10px 24px rgba(0, 0, 0, 0.45);
}

.github-qr {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: crisp-edges;
}

.github-qr-hint {
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    color: var(--color-secondary) !important;
}

/* =============================================
   OTP VERIFICATION STYLES
   ============================================= */
.email-verify-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch; /* Makes the button match the input's height */
}

.btn-otp {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 1.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
}

.btn-otp:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5);
    filter: brightness(1.1);
}

.btn-otp:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.verify-status, 
.otp-timer {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Resend OTP row ─────────────────────────────────────────────── */
.resend-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    animation: fadeSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.resend-label {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

.btn-resend {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-primary);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-secondary);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(6, 182, 212, 0.4);
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.btn-resend:hover {
    color: var(--color-primary);
    text-decoration-color: rgba(139, 92, 246, 0.6);
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.4));
}

/* ── OTP shake on wrong entry ────────────────────────────────────── */
@keyframes otpShake {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-6px); }
    30%       { transform: translateX(6px); }
    45%       { transform: translateX(-5px); }
    60%       { transform: translateX(5px); }
    75%       { transform: translateX(-3px); }
    90%       { transform: translateX(3px); }
}

.otp-shake {
    animation: otpShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border-color: #f87171 !important;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.35) !important;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background: var(--color-bg-medium);
    padding: var(--spacing-md) 0;
    text-align: center;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.3;
}

/* =============================================
   BACK TO TOP BUTTON
   ============================================= */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-neon-violet);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6);
    border-color: var(--color-primary);
}

/* =============================================
   SCROLL REVEAL - STAGGERED WITH SPRING
   ============================================= */
[data-scroll-reveal] {
    opacity: 0;
    transform: translateY(50px) rotateX(10deg) scale(0.95);
    transition: all var(--transition-spring);
}

[data-scroll-reveal].revealed {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
    .github-qr-frame {
        width: 156px;
        height: 156px;
        padding: 7px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--color-bg-light);
        width: 100%;
        text-align: center;
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md) 0;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-card {
        max-width: 100%;
    }
    
    .project-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-project-btn {
        width: 100%;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .profile-photo {
        max-width: 300px;
    }
    
    .scroll-down {
        display: none;
    }

    .about,
    .projects,
    .skills,
    .research,
    .certifications {
        padding-bottom: var(--spacing-lg);
    }

    .chevron {
        width: 20px;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    body {
        cursor: default;
    }
    
    .custom-cursor {
        display: none;
    }
    
    /* Fix word spacing on mobile */
    #typedText {
        word-spacing: 0.8rem;
    }
}

@media (max-width: 480px) {
    .github-qr-frame {
        width: 136px;
        height: 136px;
        padding: 6px;
    }

    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-logo {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero {
        min-height: 100vh;
        padding: 5rem 0 3rem;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2rem);
        -webkit-text-stroke: 1.5px var(--color-primary);
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.7rem 1.25rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .email-verify-row {
        flex-direction: column;
    }
    
    .btn-otp {
        padding: 0.8rem;
        width: 100%;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-title {
        font-size: 1.25rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .tag {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
    }
    
    .skills-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .skill-name {
        font-size: 0.9rem;
    }
    
    .skill-percentage {
        font-size: 0.85rem;
    }
    
    .profile-photo {
        max-width: 250px;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 0.7rem;
    }
    
    .chevron {
        width: 18px;
        height: 6px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .footer {
        font-size: 0.8rem;
        padding: 1.5rem 0;
    }
    
    /* Adjust typed text spacing for small screens */
    #typedText {
        word-spacing: 0.6rem;
    }
}

@media print {
    .navbar,
    .back-to-top,
    .scroll-down,
    .animated-background,
    .custom-cursor {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* =============================================
   RESEARCH + CERTIFICATIONS SECTION
   ============================================= */
.section-kicker {
    text-align: center;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.research {
    padding: var(--spacing-xl) 0 calc(var(--spacing-xl) + 2.5rem);
    background:
        radial-gradient(circle at 12% 24%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 88% 76%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        var(--color-bg-medium);
    position: relative;
}

.research::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.3;
}

.research-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr);
    gap: var(--spacing-md);
    transition: all var(--transition-normal);
}

.research-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
    transform: translateY(-5px);
}

.research-main {
    display: flex;
    flex-direction: column;
}

.research-domain {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.32rem 0.78rem;
    border-radius: 20px;
    border: 1px solid rgba(6, 182, 212, 0.35);
    background: rgba(6, 182, 212, 0.12);
    color: var(--color-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.research-title {
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.research-abstract {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.research-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    align-content: start;
}

.research-metric {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.research-metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.research-metric:hover::before {
    width: 100%;
}

.research-metric:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-neon-violet);
}

.research-metric:hover .metric-label,
.research-metric:hover .metric-value {
    color: var(--color-text-primary);
}

.metric-value {
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.metric-label {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

.certifications {
    padding: var(--spacing-xl) 0 calc(var(--spacing-xl) + 2.5rem);
    background:
        radial-gradient(circle at 15% 25%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 82% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        var(--color-bg-dark);
    position: relative;
}

.certifications::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
    opacity: 0.3;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    align-items: stretch;
}

.cert-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 820px;
    margin: 0 auto;
    line-height: 1.75;
}

.cert-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.25rem;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: flex-start;
    gap: 1rem;
    min-height: 126px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.cert-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.65), rgba(6, 182, 212, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.cert-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 88% 12%, rgba(6, 182, 212, 0.12), transparent 42%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    z-index: -1;
}

.cert-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 14px 34px rgba(139, 92, 246, 0.22);
    transform: translateY(-6px);
}

.cert-card:hover::before,
.cert-card:hover::after {
    opacity: 1;
}

.cert-icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(139, 92, 246, 0.26);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.12), 0 8px 18px rgba(0, 0, 0, 0.25);
    transition: all var(--transition-normal);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.cert-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
    transition: transform var(--transition-normal), filter var(--transition-normal);
}

.cert-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(139, 92, 246, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: var(--radius-sm);
    color: #fff;
}

.cert-icon-box:hover .cert-thumb {
    transform: scale(1.1);
    filter: brightness(0.6);
}

.cert-icon-box:hover .cert-thumb-overlay {
    opacity: 1;
}

.cert-card:hover .cert-icon-box {
    transform: scale(1.06);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: inset 0 0 24px rgba(6, 182, 212, 0.16), 0 10px 22px rgba(0, 0, 0, 0.3);
}

/* PDF variant — gradient background instead of image */
.cert-icon-pdf {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.14));
    flex-direction: column;
    gap: 2px;
}

.cert-pdf-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: rgba(139, 92, 246, 0.9);
    transition: color var(--transition-normal);
}

.cert-pdf-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(139, 92, 246, 0.8);
    transition: color var(--transition-normal);
}

.cert-icon-pdf:hover .cert-pdf-icon,
.cert-icon-pdf:hover .cert-pdf-label {
    color: transparent;
}

.cert-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.cert-name {
    font-size: 1.03rem;
    color: var(--color-text-primary);
    margin-bottom: 0.4rem;
    font-weight: 700;
    line-height: 1.35;
}

.cert-issuer {
    font-size: 0.87rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .research-card {
        grid-template-columns: 1fr;
    }

    .research-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .research-metrics {
        grid-template-columns: 1fr;
    }

    .cert-subtitle {
        font-size: 0.95rem;
    }

    .cert-card {
        grid-template-columns: 52px minmax(0, 1fr);
        min-height: 108px;
        padding: 1rem 1rem;
    }

    .cert-icon-box {
        width: 52px;
        height: 52px;
        min-width: 52px;
    }
}
