/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --accent: #3B82F6;
    --accent-light: #EFF6FF;
    --bg-white: #FFFFFF;
    --bg-light: #F8FAFC;
    --border-color: #E2E8F0;
    
    /* Typography Colors */
    --text-dark: #0F172A;
    --text-muted: #475569;
    --text-light: #64748B;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --shadow-premium: 0 20px 40px -15px rgba(37, 99, 235, 0.08);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* ==========================================================================
   LAYOUT REUSABLES
   ========================================================================== */
.section-padding {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

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

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

.sub-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-dark) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: var(--radius-full);
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

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

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   PAGE COMPONENTS
   ========================================================================== */

/* Page Loader */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-white);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

#page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-circle-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loader-circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.loader-circle-bg {
    fill: none;
    stroke: var(--bg-light);
    stroke-width: 4;
}

.loader-circle-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 4;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
}

.loader-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
    animation: pulse-loader-text 1.5s infinite alternate ease-in-out;
}

@keyframes pulse-loader-text {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* Scroll Progress Bar */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1001;
}

#scroll-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.1s ease-out;
}

/* Dynamic slide down animation for navbar */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    z-index: 1000;
    transition: var(--transition-fast);
    transform: translateY(-100%);
    animation: slide-down 0.8s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-down {
    to { transform: translateY(0); }
}

#navbar.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    padding: 5px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-fast), left var(--transition-fast);
}

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

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

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1010;
}

.hamburger-menu .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-dark);
    transition: var(--transition-fast);
    border-radius: var(--radius-full);
}

/* Floating Socials */
.floating-socials {
    position: fixed;
    bottom: 40px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
}

.floating-socials a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.floating-socials a:hover {
    color: var(--bg-white);
    background-color: var(--primary);
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 8px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-dark) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.hero-tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.typing-container {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 24px;
    background: var(--bg-light);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.typed-txt {
    color: var(--primary);
    font-weight: 700;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

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

.image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
    z-index: 2;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: calc(var(--radius-lg) + 6px);
    background: linear-gradient(90deg, var(--primary), var(--accent), #10B981, var(--primary));
    background-size: 300% 300%;
    z-index: 0;
    animation: border-rotate 8s infinite linear;
}

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

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 6px solid var(--bg-white);
    position: relative;
    z-index: 1;
}

.circle-backdrop {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent), var(--primary));
    z-index: 1;
    opacity: 0.15;
    transition: var(--transition-smooth);
}

.image-wrapper:hover .circle-backdrop {
    transform: translate(8px, 8px);
}

.floating-shape {
    position: absolute;
    width: 44px;
    height: 44px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    z-index: 3;
    animation: float-shape 6s infinite alternate ease-in-out;
}

.shape-1 {
    top: 10%;
    left: -20px;
    animation-duration: 5s;
}

.shape-2 {
    bottom: 15%;
    right: -20px;
    animation-duration: 7s;
    color: var(--accent);
}

.shape-3 {
    top: 50%;
    right: -30px;
    animation-duration: 6s;
}

@keyframes float-shape {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(15deg); }
}

/* Scroll Down Mouse Animation */
.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-down-arrow p {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-light);
    border-radius: 12px;
    position: relative;
    display: block;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.6s ease-out infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 0; top: 5px; }
    30% { opacity: 1; }
    100% { opacity: 0; top: 18px; }
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--bg-light);
    padding: 24px;
}

.about-image img {
    border-radius: var(--radius-md);
    max-height: 400px;
    object-fit: contain;
}

.about-text {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition-smooth);
}

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

.stat-icon {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.skills-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.skills-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    box-sizing: border-box;
    pointer-events: none;
    transition: border-color 0.6s ease;
}

.skills-card:hover::after {
    border-color: rgba(37, 99, 235, 0.3);
}

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

.skills-card-header i {
    transition: transform 0.3s ease;
}

.skills-card:hover .skills-card-header i {
    transform: rotate(15deg) scale(1.1);
}

.skills-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.card-icon {
    font-size: 1.4rem;
    color: var(--primary);
}

.skills-card-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.skill-bar-bg {
    width: 100%;
    height: 8px;
    background-color: var(--bg-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.skill-bar-progress {
    width: 0%; /* Driven by JS for animation */
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 1.5s cubic-bezier(0.1, 0.8, 0.25, 1);
}

/* ==========================================================================
   EXPERIENCE SECTION
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 40px auto 0;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
    border-radius: var(--radius-full);
}

.timeline-progress-line {
    position: absolute;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    top: 0;
    left: 50%;
    margin-left: -1.5px;
    height: 0%; /* Animate via GSAP */
    z-index: 1;
    border-radius: var(--radius-full);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    right: -9px;
    background-color: var(--bg-white);
    border: 4px solid var(--primary);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: var(--transition-fast);
    animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.left-item {
    left: 0;
}

.right-item {
    left: 50%;
}

.right-item .timeline-dot {
    left: -9px;
}

.timeline-content {
    padding: 30px;
    background-color: var(--bg-white);
    position: relative;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.timeline-content:hover ~ .timeline-dot,
.timeline-item:hover .timeline-dot {
    background-color: var(--primary);
    transform: scale(1.2);
}

.timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--accent-light);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.timeline-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.company-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 16px;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.timeline-bullets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-bullets li {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-bullets li i {
    color: var(--primary);
    font-size: 0.9rem;
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.1s ease;
}

.project-card:hover {
    box-shadow: 0 20px 35px rgba(37, 99, 235, 0.1);
    border-color: var(--accent);
}

.project-img-wrapper {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(37, 99, 235, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 2;
}

.project-links {
    display: flex;
    gap: 16px;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.project-icon-btn {
    width: 48px;
    height: 48px;
    background-color: var(--bg-white);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.project-icon-btn:hover {
    background-color: var(--primary);
    color: var(--bg-white);
    transform: scale(1.1);
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.08) translateZ(10px);
}

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

.project-card:hover .project-links {
    transform: translateY(0);
}

.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.project-tech-tags span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--accent-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.project-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.project-description {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.project-card-footer {
    display: flex;
    gap: 12px;
}

.btn-card {
    flex: 1;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-card-primary {
    background-color: var(--primary);
    color: var(--bg-white);
}

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

.btn-card-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-muted);
}

.btn-card-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--accent-light);
}

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

.cert-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}

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

.cert-icon-bg {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background-color: var(--accent-light);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cert-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.cert-issuer {
    font-size: 0.78rem;
    color: var(--text-light);
}

/* ==========================================================================
   EDUCATION SECTION
   ========================================================================== */
.education-timeline {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.edu-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 24px;
    align-items: flex-start;
    transition: var(--transition-smooth);
}

.edu-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.edu-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background-color: var(--accent-light);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.edu-details {
    flex-grow: 1;
}

.edu-period {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.edu-details h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.edu-inst {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.edu-badge-score {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 4px 16px;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 40px;
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
}

.info-card:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.info-icon-bg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-white);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.info-details h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.info-details p,
.info-details a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.info-details a:hover {
    color: var(--primary);
}

/* Contact Form */
.contact-form-panel {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    font-family: inherit;
    font-size: 0.92rem;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-submit {
    align-self: flex-start;
    padding: 14px 32px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.footer {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-dark) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    display: inline-block;
}

.footer-logo span {
    color: var(--primary);
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 30px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.footer-socials a:hover {
    background-color: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.footer-divider {
    height: 1px;
    background-color: var(--border-color);
    margin-bottom: 24px;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */
#back-to-top {
    position: fixed;
    bottom: 40px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--bg-white);
    border: none;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

#back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-4px);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   PREMIUM INTERACTIONS & CURSOR
   ========================================================================== */
#custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 99999;
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    display: none; /* Controlled by JS to show on desktops */
}
#custom-cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 99999;
    display: none;
}
#custom-cursor.hovered {
    width: 44px;
    height: 44px;
    background-color: rgba(37, 99, 235, 0.1);
    border-color: var(--accent);
}

@media (pointer: fine) {
    body {
        cursor: none;
    }
    a, button, .nav-link, .project-card, .cert-card, .info-card, input, textarea, select {
        cursor: none;
    }
    #custom-cursor, #custom-cursor-dot {
        display: block;
    }
}

/* Background Gradient Blobs */
.bg-blobs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.04;
    animation: float-blobs 20s infinite alternate ease-in-out;
}
.blob-1 {
    top: 10%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: var(--primary);
}
.blob-2 {
    bottom: 10%;
    right: 15%;
    width: 500px;
    height: 500px;
    background: var(--accent);
    animation-delay: -5s;
}
.blob-3 {
    top: 40%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: #10B981;
    animation-delay: -10s;
}
@keyframes float-blobs {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(100px, 50px) scale(1.2) rotate(360deg); }
}

/* Button Shine Effect */
.btn-primary::after, .btn-submit::after, .btn-card-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
}
.btn-primary:hover::after, .btn-submit:hover::after, .btn-card-primary:hover::after {
    animation: shine 0.85s ease-in-out forwards;
}
@keyframes shine {
    100% {
        left: 150%;
    }
}

/* Form inputs focus state */
.form-group input, .form-group textarea {
    transition: border-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}

/* Certificate flips */
.cert-card {
    perspective: 1000px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.cert-card:hover {
    transform: rotateX(8deg) rotateY(-8deg) translateY(-5px);
    border-color: var(--primary);
}
.cert-icon-bg i {
    transition: transform 0.3s ease;
}
.cert-card:hover .cert-icon-bg i {
    transform: scale(1.1) rotate(15deg);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
    body {
        cursor: default !important;
    }
    #custom-cursor, #custom-cursor-dot {
        display: none !important;
    }
    .image-wrapper::before, .floating-shape, .bg-blob {
        animation: none !important;
    }
    .project-card, .cert-card {
        transform: none !important;
        perspective: none !important;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Laptop / Small Desktop (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certificates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

/* Tablet (max-width: 768px) */
@media screen and (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }
    
    /* Navbar Hamburger Menu Toggle */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-white);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.05);
        flex-direction: column;
        padding: 80px 40px;
        transition: right var(--transition-smooth);
        z-index: 1005;
        gap: 24px;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    /* Hamburger Active Animation */
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero layout stack */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 20px;
    }
    
    .hero-content {
        align-items: center;
        order: 2;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 20px;
    }
    
    .image-wrapper {
        width: 260px;
        height: 260px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* About stack */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .about-image {
        order: 1;
    }
    
    .about-content {
        order: 2;
    }
    
    /* Timeline Central Line Adjust */
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .left-item, .right-item {
        left: 0;
    }
    
    .timeline-dot {
        left: 22px !important;
        right: auto;
    }
    
    /* Contact Stack */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    /* Floating Socials Hidden (Shown in footer/hero instead) */
    .floating-socials {
        display: none;
    }
}

/* Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .edu-card {
        flex-direction: column;
        gap: 16px;
    }
    
    .contact-form-panel {
        padding: 24px;
    }
}
