/* ===========================
   PRELOADER
   =========================== */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    z-index: 2;
}

.preloader-logo {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.preloader-counter {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-variant-numeric: tabular-nums;
}

.preloader-counter span {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.1s linear;
}

.preloader-curtain {
    position: fixed;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--bg-dark);
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.18, 1);
}

.preloader-curtain.top {
    top: 0;
    transform-origin: top;
}

.preloader-curtain.bottom {
    bottom: 0;
    transform-origin: bottom;
}

#preloader.curtain-open .preloader-curtain.top {
    transform: scaleY(0);
}

#preloader.curtain-open .preloader-curtain.bottom {
    transform: scaleY(0);
}

/* ===========================
   CUSTOM CURSOR
   =========================== */
#cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
}

#cursor-ring {
    position: fixed;
    width: 28px;
    height: 28px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cursor-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

#cursor-ring.hover {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
    backdrop-filter: blur(4px);
}

#cursor-ring.hover #cursor-label {
    opacity: 1;
}

#cursor-ring.click {
    transform: translate(-50%, -50%) scale(0.8);
}

@media (hover: none) and (pointer: coarse) {
    #cursor-dot, #cursor-ring { display: none; }
}

/* ===========================
   PROGRESS BAR
   =========================== */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s linear;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-dark: #0f172a;
    --bg-light: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

@media (hover: none) and (pointer: coarse) {
    body { cursor: auto; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   NAVIGATION
   =========================== */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1f3a 100%);
}

.hero::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    left: var(--mouse-x, 50%);
    top: var(--mouse-y, 50%);
    transition: left 0.3s ease-out, top 0.3s ease-out;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-greeting {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: gradientShift 6s ease infinite;
}

.hero-title {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    min-height: 2.5rem;
}

#typing-cursor {
    color: var(--primary-color);
    animation: blink 0.8s step-end infinite;
    font-weight: 100;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-3px);
}

.hero-image {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

/* Profile Picture Styling */
.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 70px rgba(99, 102, 241, 0.5);
}

/* Animated gradient border */
.image-wrapper::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    z-index: 0;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator a {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    position: relative;
}

.scroll-indicator span {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

/* ===========================
   SECTIONS
   =========================== */
section {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

section > .container,
section > .section-title {
    position: relative;
    z-index: 1;
}

/* Subtle grid overlay on sections */
section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
}

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

/* ===========================
   ABOUT SECTION
   =========================== */
.about {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.7));
}

.about::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/about-bg.jpg') center/cover no-repeat;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

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

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

.stat-item h3 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===========================
   SKILLS SECTION
   =========================== */
.skills {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.93), rgba(15, 23, 42, 0.7));
}

.skills::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: url('../images/skills-bg.jpg') center/cover no-repeat;
    transform: translate(-50%, -50%) rotate(-90deg);
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category i {
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    border-radius: 50px;
}

.skill-tag i,
.skill-tag span {
    position: relative;
    z-index: 1;
}

.skill-tag i {
    font-size: 1rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), 0 8px 25px rgba(99, 102, 241, 0.15);
}

.skill-tag:hover::before {
    opacity: 1;
}

.skill-tag:hover i {
    color: white;
}

.skill-tag::after {
    content: attr(data-level);
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.skill-tag:hover::after {
    opacity: 1;
    transform: scale(1);
}



/* ===========================
   PROJECTS SECTION
   =========================== */
.projects {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.6));
}

.projects::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/projects-bg.jpg') center/cover no-repeat;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
}

.carousel-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto;
    position: relative;
}

.carousel-track-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    gap: 0.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    flex: 0 0 calc(50% - 0.75rem);
    min-width: 0;
}

/* Flip Card */
.flip-card {
    perspective: 1000px;
    aspect-ratio: 1;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.95));
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
}

.flip-hint {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
    opacity: 0.7;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 2;
}

.flip-card:hover .flip-hint {
    opacity: 1;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
}

.flip-card-back .project-title {
    font-size: 1.15rem;
    margin: 0;
}

.flip-card-back .project-year {
    align-self: flex-start;
}

.flip-card-back .project-description {
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    -webkit-line-clamp: 6;
    flex: none;
}

.flip-card-back .project-tech {
    gap: 0.4rem;
}

.flip-card-back .project-tech .tech-item {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

.flip-card-back .project-links-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.flip-card-back .project-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
}

.carousel-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.carousel-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: var(--primary-color);
}

.carousel-counter {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Project card styles now use .flip-card (see above) */

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.skill-category,
.cert-card,
.award-card,
.volunteer-card,
.contact-form input,
.contact-form textarea {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.skill-category,
.cert-card,
.award-card,
.volunteer-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-title {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.project-year {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.project-links-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.tech-label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.tech-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
}

.tech-item:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Responsive Design for Projects */
@media (max-width: 768px) {
    .flip-card-back {
        padding: 1rem;
    }

    .flip-card-back .project-title {
        font-size: 1rem;
    }

    .flip-card-back .project-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 5;
    }

    .project-link {
        width: 100%;
        justify-content: center;
    }

    .project-links-group {
        width: 100%;
    }

    .project-links-group .project-link {
        flex: 1;
    }

    .project-tech {
        gap: 0.5rem;
    }

    .carousel-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .carousel-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        z-index: 3;
    }

    .carousel-prev {
        left: 0;
    }

    .carousel-next {
        right: 0;
    }

    .carousel-btn:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .carousel-slide {
        flex: 0 0 100%;
    }

    .carousel-track-wrapper {
        margin: 0;
        padding: 0;
    }
}

/* ===========================
   EDUCATION SECTION
   =========================== */
.education {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.93), rgba(15, 23, 42, 0.65));
}

.education::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/education-bg.jpg') center/cover no-repeat;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.certifications-section {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #0f1f3a 50%, #0f172a 100%);
}

.volunteer-section {
    position: relative;
    background: linear-gradient(135deg, #0a1628 0%, #0f172a 50%, #0a1628 100%);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 1rem;
}

.timeline-marker {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-dark);
}

.timeline-content {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
    transform: translateX(5px);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.institution {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.duration {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.details {
    color: var(--text-secondary);
}

.subsection-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.certs-carousel {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 780px;
    margin: 0 auto 1rem;
    position: relative;
}

.certs-track-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
}

.certs-track {
    display: flex;
    gap: 0.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.certs-slide {
    flex: 0 0 calc(50% - 0.75rem);
    min-width: 0;
}

.cert-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cert-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25);
}

.cert-image {
    height: 180px;
    overflow: hidden;
    background: var(--bg-dark);
}

.cert-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cert-card:hover .cert-image img {
    transform: scale(1.05);
}

.cert-content {
    padding: 1.5rem;
    text-align: center;
}

.cert-content i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cert-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cert-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.cert-year {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.certs-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.certs-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    transform: scale(1.1);
}

.certs-btn i {
    pointer-events: none;
}

.certs-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
}

.certs-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.certs-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.certs-dot:hover {
    background: var(--primary-color);
}

.volunteer-card {
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.volunteer-card:hover {
    transform: translateY(-5px);
    border-color: var(--success-color);
}

.volunteer-image {
    height: 200px;
    overflow: hidden;
    background: var(--bg-dark);
}

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

.volunteer-content {
    padding: 2rem;
    text-align: center;
}

.volunteer-content i {
    font-size: 3rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.volunteer-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.volunteer-year {
    color: var(--text-muted);
}

/* ===========================
   AWARDS SECTION
   =========================== */
.awards {
    background: linear-gradient(135deg, #0f172a 0%, #1a0f17 50%, #0f172a 100%);
    position: relative;
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

.award-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.award-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25);
    border-color: var(--primary-color);
}

.award-image {
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
}

.award-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.award-card:hover .award-image img {
    transform: scale(1.05);
}

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

.award-content i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    display: block;
}

.award-content h4 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.award-role {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.award-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.award-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.award-link:hover {
    background: var(--primary-color);
    color: white;
}

.award-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}



/* ===========================
   CONTACT SECTION
   =========================== */
.contact {
    position: relative;
    background: var(--bg-dark);
}

.contact-description {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(30, 41, 59, 0.8);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #0f0f1a 50%, #0f172a 100%);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* ===========================
   BACK TO TOP
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* ===========================
   SECTION DIVIDERS
   =========================== */
.section-divider {
    position: relative;
    width: 100%;
    height: 60px;
    overflow: hidden;
    line-height: 0;
    background: var(--bg-dark);
}

.section-divider svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.section-divider.flipped svg {
    transform: rotateX(180deg);
}

.divider-fill {
    fill: var(--bg-light);
}

.divider-fill-alt {
    fill: var(--bg-dark);
}

.section-divider + .about .divider-fill,
.section-divider + .skills .divider-fill,
.section-divider + .projects .divider-fill,
.section-divider + .education .divider-fill,
.section-divider + .awards .divider-fill,
.section-divider + .certifications-section .divider-fill {
    fill: var(--bg-light);
}

.section-divider + .about,
.section-divider + .skills,
.section-divider + .projects,
.section-divider + .education,
.section-divider + .awards,
.section-divider + .certifications-section,
.section-divider + .volunteer-section {
    margin-top: 0;
}

/* ===========================
   CLICKABLE CARDS & LINKS
   =========================== */
.project-card-link,
.cert-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card-link:hover,
.cert-card-link:hover {
    text-decoration: none;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
}
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .image-wrapper {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .hero-name {
        font-size: 2.5rem;
    }

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

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

    .social-links {
        justify-content: center;
    }

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

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

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    section {
        padding: 60px 0;
    }

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

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

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

    .hero-buttons {
        flex-direction: column;
    }

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

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

    .certs-carousel {
        flex-direction: column;
        gap: 0.75rem;
    }

    .certs-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        z-index: 3;
    }

    .certs-prev {
        left: 0;
    }

    .certs-next {
        right: 0;
    }

    .certs-btn:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .certs-slide {
        flex: 0 0 100%;
    }

    .certs-dots {
        margin-top: 0.5rem;
    }
}

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

    .award-image {
        height: 130px;
    }

    .award-content {
        padding: 1rem 1.25rem;
    }

    .award-content h4 {
        font-size: 1rem;
    }

    .award-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 1.8rem;
    }

    .image-wrapper {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .section-divider {
        height: 40px;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ===========================
   SCROLL REVEAL
   =========================== */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===========================
   RESUME BUTTON
   =========================== */
.btn-resume {
    background: transparent;
    color: var(--success-color);
    border: 2px solid var(--success-color);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.btn-resume:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}
