/* ==========================================
   Krishna Gupta - Premium Web Experience
   ========================================== */

/* Theme variables */
:root {
    --primary-color: #6366f1; /* Indigo */
    --primary-light: #818cf8;
    --secondary-color: #06b6d4; /* Cyan */
    --accent-color: #10b981; /* Emerald */
    --gradient-hero: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #10b981 100%);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-normal: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
}

/* Dark Theme (Default) */
body.dark-theme {
    --bg-primary: #080c14;
    --bg-secondary: #0b0f19;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.06);
    --card-bg: rgba(17, 24, 39, 0.6);
    --card-hover-bg: rgba(31, 41, 55, 0.75);
    --glass-bg: rgba(11, 15, 25, 0.45);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: rgba(0, 0, 0, 0.4);
}

/* Light Theme */
body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 0, 0, 0.06);
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-hover-bg: rgba(255, 255, 255, 0.9);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: rgba(0, 0, 0, 0.05);
}

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

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

ul {
    list-style: none;
}

/* 3D Background Canvas */
#three-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    background-color: transparent;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-bar {
    width: 60px;
    height: 4px;
    background: var(--gradient-hero);
    margin: 0 auto;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-top: -35px;
    margin-bottom: 45px;
}

/* Glass Cards & 3D Tilt */
[data-tilt] {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.15s ease-out;
}

.glass-card, .featured-cert-card, .visual-card, .timeline-content, .project-card, .cert-card, .profile-card, .contact-form-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover, .featured-cert-card:hover, .visual-card:hover, .timeline-content:hover, .project-card:hover, .cert-card:hover, .profile-card:hover, .contact-form-container:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 40px var(--glass-shadow), 0 0 15px rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-hero);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-download-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
    border-radius: 20px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.btn-download-sm:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.btn-block {
    width: 100%;
}

/* Theme Toggle Float */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 105px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--gradient-hero);
    color: white;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    font-size: 1.3rem;
    transition: transform var(--transition-normal);
}

.theme-toggle:hover {
    transform: scale(1.15) rotate(15deg);
}

/* Sticky Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    z-index: 999;
    transition: background-color var(--transition-normal), box-shadow var(--transition-normal), height var(--transition-normal);
}

.navbar.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px var(--glass-shadow);
    height: 70px;
}

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

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-hero);
    transition: width var(--transition-normal);
}

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

.nav-hamburger {
    display: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding-top: 150px;
    padding-bottom: 100px;
    min-height: 95vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 50px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.4; }
    100% { transform: scale(0.9); opacity: 1; }
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 50px;
}

/* Featured Credentials Grid */
.featured-certs-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.featured-certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 16px;
    max-width: 680px;
}

.featured-cert-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.featured-cert-card i {
    font-size: 1.8rem;
    transition: transform var(--transition-normal), filter var(--transition-normal);
}

.cert-icon-aws { color: #ff9900; filter: drop-shadow(0 0 4px rgba(255, 153, 0, 0.2)); }
.cert-icon-ibm { color: #054ada; filter: drop-shadow(0 0 4px rgba(5, 74, 218, 0.2)); }
.cert-icon-hp { color: #0096d6; filter: drop-shadow(0 0 4px rgba(0, 150, 214, 0.2)); }

.featured-cert-card[data-brand="aws"]:hover {
    border-color: rgba(255, 153, 0, 0.4);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.12), 0 0 10px rgba(255, 153, 0, 0.08);
}
.featured-cert-card[data-brand="ibm"]:hover {
    border-color: rgba(5, 74, 218, 0.4);
    box-shadow: 0 8px 25px rgba(5, 74, 218, 0.12), 0 0 10px rgba(5, 74, 218, 0.08);
}
.featured-cert-card[data-brand="hp"]:hover {
    border-color: rgba(0, 150, 214, 0.4);
    box-shadow: 0 8px 25px rgba(0, 150, 214, 0.12), 0 0 10px rgba(0, 150, 214, 0.08);
}

.featured-cert-card:hover i {
    transform: scale(1.12) rotate(-5deg);
    filter: drop-shadow(0 0 8px currentColor);
}

.featured-cert-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.featured-cert-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Hero Visual (Mock Code Card) */
.hero-visual {
    display: flex;
    justify-content: center;
}

.visual-card {
    width: 100%;
    max-width: 450px;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.code-header {
    background: #111827;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #f59e0b; }
.code-dot.green { background: #10b981; }

.code-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.code-body {
    padding: 24px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e5e7eb;
}

.code-keyword { color: #f472b6; }
.code-class { color: #60a5fa; }
.code-method { color: #fbbf24; }
.code-str { color: #34d399; }
.code-comment { color: #9ca3af; font-style: italic; }

/* About Section */
.about-section {
    padding: 100px 0;
    background-color: transparent;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
}

.about-p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.about-info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.8rem;
    font-family: var(--font-heading);
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.about-socials {
    display: flex;
    gap: 16px;
}

.about-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-normal);
}

.about-socials a:hover {
    color: #fff;
    background: var(--gradient-hero);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Stats Cards */
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.03) translateZ(15px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.12), 0 0 15px rgba(6, 182, 212, 0.08);
}

.stat-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    transition: transform 0.4s ease, color 0.4s ease;
    z-index: 2;
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(8deg);
    color: var(--primary-light);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
    z-index: 2;
}

.stat-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Skills Section */
.skills-section {
    padding: 100px 0;
}

.skills-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tab-btn:hover, .tab-btn.active {
    background: var(--gradient-hero);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.skills-tab-content {
    min-height: 250px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn var(--transition-normal);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 24px;
}

.skill-card {
    padding: 30px;
}

.skill-card:hover {
    transform: translateY(-5px) translateZ(15px);
}

.skill-icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    display: inline-block;
    margin-bottom: 16px;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.skill-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    font-size: 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--primary-light);
}

/* Experience Section - Timeline */
.experience-section {
    padding: 100px 0;
    background: transparent;
}

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

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

.timeline-item {
    padding: 20px 0 20px 80px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    left: 23px;
    top: 25px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    z-index: 2;
}

.timeline-date {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 6px;
}

.timeline-content {
    padding: 24px 30px;
}

.timeline-content:hover {
    transform: translateY(-3px) translateZ(10px);
}

.timeline-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.timeline-header h3 {
    font-size: 1.25rem;
}

.company-badge {
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.location-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.timeline-role {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline-bullets {
    padding-left: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.timeline-bullets li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.timeline-bullets li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Projects Section */
.projects-section {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 30px;
}

.project-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px) translateZ(15px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.project-type {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-links {
    display: flex;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.project-links a:hover {
    color: var(--primary-color);
}

.project-title {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-stack span {
    font-size: 0.75rem;
    background: rgba(6, 182, 212, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Certifications Section */
.certifications-section {
    padding: 100px 0;
    background: transparent;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 30px;
}

.cert-card-container {
    perspective: 1000px;
    height: 340px;
    margin-bottom: 10px;
}

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

.cert-card-container:hover .cert-card-flipper {
    transform: rotateY(180deg);
}

.cert-card-front, .cert-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cert-card-front {
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    z-index: 2;
    transform: rotateY(0deg);
}

.cert-front-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.cert-card-back {
    background: var(--card-hover-bg);
    transform: rotateY(180deg);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.cert-back-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.cert-name-back {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-light);
}

.cert-media {
    background: var(--gradient-accent);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cert-badge-icon {
    font-size: 3.5rem;
    color: white;
}

.cert-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cert-issuer {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.cert-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.cert-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

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

/* Education & Coursework */
.education-section {
    padding: 100px 0;
}

.edu-course-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
}

.education-list h3, .coursework-list h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.edu-card {
    position: relative;
    padding-left: 30px;
    margin-bottom: 30px;
}

.edu-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    left: 0;
    top: 8px;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.edu-period {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 4px;
    display: block;
}

.edu-card h4 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.edu-degree {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 6px;
}

.edu-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.course-tags span {
    font-size: 0.85rem;
    background: rgba(255,255,255,0.03);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.profile-card {
    padding: 24px;
    position: relative;
}

.profile-card:hover {
    transform: translateY(-3px) translateZ(10px);
}

.quote-icon {
    font-size: 1.8rem;
    color: var(--primary-light);
    opacity: 0.2;
    position: absolute;
    top: 15px;
    left: 15px;
}

.quote-text {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.quote-author {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: transparent;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-detail-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-detail-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.contact-detail-item p {
    margin-bottom: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-form-container {
    padding: 40px;
}

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

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

.form-group label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(8, 12, 20, 0.6);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}

.form-feedback {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    text-align: center;
}

.form-feedback.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-feedback.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.hidden {
    display: none;
}

/* Footer */
.footer {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.footer-socials a:hover {
    color: var(--primary-color);
}

/* Scroll-reveal physics styling */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

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

/* Responsive Rules */
@media (max-width: 991px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-description {
        margin: 0 auto 35px auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .featured-certs-grid {
        margin: 0 auto;
    }
    
    .about-grid, .edu-course-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-stats {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }
    
    .nav-hamburger {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        transition: left var(--transition-normal);
        border-top: 1px solid var(--border-color);
        z-index: 998;
        overflow-y: auto;
    }
    
    .nav-menu.open {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.6rem);
        line-height: 1.25;
    }
    
    .about-info-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::after {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-dot {
        left: 13px;
    }
}

@media (max-width: 576px) {
    .featured-certs-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .contact-form-container {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   8. AI Chatbot Widget Styles
   ========================================================== */
.ai-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: var(--font-body);
}

.ai-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(6, 182, 212, 0.3);
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
}

.ai-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px 0 rgba(6, 182, 212, 0.5);
}

.ai-chat-toggle:active {
    transform: scale(0.95);
}

.chat-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
}

.ai-chat-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 380px;
    height: 520px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: 0 16px 48px 0 var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: bottom right;
}

.ai-chat-window.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    display: flex !important; /* Keep container layout so transition is smooth */
}

/* Header */
.chat-header {
    background: rgba(8, 12, 20, 0.7);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.chat-header-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chat-header-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.chat-close-btn:hover {
    color: #ef4444;
}

/* Messages area */
.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(8, 12, 20, 0.3);
}

.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
}

.chat-message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.chat-message.user {
    align-self: flex-end;
    background: var(--gradient-accent);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

/* Typing loading indicator */
.chat-message.bot.typing {
    display: flex;
    gap: 4px;
    padding: 12px 18px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Quick replies buttons */
.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    align-self: flex-start;
}

.quick-reply-btn {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: background var(--transition-normal), color var(--transition-normal);
}

.quick-reply-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Input area */
.chat-input-bar {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(8, 12, 20, 0.6);
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-bar input {
    flex-grow: 1;
    background: rgba(8, 12, 20, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    color: white;
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--transition-normal);
}

.chat-input-bar input:focus {
    border-color: var(--primary-color);
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: transform var(--transition-normal);
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Responsive adjustment for chatbot */
@media (max-width: 480px) {
    .ai-chat-widget {
        bottom: 20px;
        right: 20px;
    }
    .ai-chat-window {
        width: calc(100vw - 40px);
        height: 480px;
        bottom: 70px;
    }
}

