/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #059669;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(37, 99, 235, 0.2);
    --shadow-color: rgba(37, 99, 235, 0.1);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    
    /* Fonts */
    --font-primary: 'Orbitron', monospace;
    --font-secondary: 'Rajdhani', sans-serif;
    
    /* Spacing */
    --container-padding: 2rem;
    --section-padding: 5rem 0;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
}

/* Base Styles */
body {
    font-family: var(--font-secondary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
    padding: clamp(0.5rem, 3vw, 2rem);
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    box-sizing: border-box;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
    width: 100%;
    max-width: 400px;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

.loading-message {
    font-family: var(--font-primary);
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    margin: 0;
    display: block;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.loading-bar {
    width: min(200px, 80vw);
    height: 4px;
    background: rgba(37, 99, 235, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: var(--gradient-3);
    width: 0%;
    border-radius: 2px;
    animation: loading-progress 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loading-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Loading Screen Hidden State */
#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Loading Text Animations */
.loading-message {
    animation: fadeInOut 0.5s ease-in-out;
    overflow-wrap: break-word;
    text-overflow: ellipsis;
    white-space: normal;
}

.loading-text {
    overflow: hidden;
    width: 100%;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Particles Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px var(--shadow-color);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px var(--shadow-color);
}

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

.nav-logo {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo-text {
    position: relative;
    z-index: 2;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
    position: relative;
    letter-spacing: 0.3px;
    text-transform: capitalize;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--border-color);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.hamburger:hover {
    background: rgba(37, 99, 235, 0.2);
}

.hamburger .bar {
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    margin: 2px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 var(--container-padding);
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background: var(--gradient-3); }
    50% { background: var(--gradient-2); }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    min-height: clamp(50px, 8vw, 60px);
    color: var(--primary-color);
    line-height: 1.4;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
    background: #fff;
    color: var(--text-primary);
}

.btn i { opacity: 0.9; }

.btn:active { transform: translateY(0); }

.btn-primary {
    background: #ffffff;
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border-color: rgba(30, 41, 59, 0.15);
}

.btn-secondary:hover {
    background: rgba(30, 41, 59, 0.06);
    border-color: rgba(30, 41, 59, 0.25);
}

/* Profile Container */
.profile-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 30px var(--shadow-color);
    position: relative;
    z-index: 2;
}

.profile-ring {
    position: absolute;
    width: 350px;
    height: 350px;
    border: 2px solid transparent;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    animation: rotate 10s linear infinite;
}

.profile-ring::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--bg-primary);
    border-radius: 50%;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    position: relative;
    background: rgba(37, 99, 235, 0.05);
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 24px; }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--gradient-3);
    border-radius: 2px;
}

.section-title i {
    margin-right: 1rem;
    color: var(--primary-color);
}

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

/* MyAiTwin Section */
.ai-twin-container {
    max-width: 900px;
    margin: 0 auto;
}

.ai-twin-frame {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    backdrop-filter: blur(10px);
}

.frame-header {
    background: rgba(37, 99, 235, 0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.frame-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.close { background: #ff5f57; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #28ca42; }

.frame-title {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--primary-color);
}

.ai-twin-content {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-ai-twin {
    text-align: center;
    color: var(--text-secondary);
}

.ai-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

#ai-twin-iframe {
    width: 100%;
    height: 500px;
    border: none;
    background: transparent;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

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

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-skills h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.skill-name {
    font-weight: 600;
    color: var(--text-primary);
}

.skill-percentage {
    color: var(--primary-color);
    font-weight: 700;
}

.skill-bar {
    height: 8px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-3);
    border-radius: 4px;
    width: 0%;
    transition: width 1s ease-out;
}

/* Timeline */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--gradient-3);
}

.timeline-item {
    position: relative;
    margin: 3rem 0;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 2rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 1rem;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-item:nth-child(odd)::before {
    right: -8px;
}

.timeline-item:nth-child(even)::before {
    left: -8px;
}

.timeline-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.timeline-date {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.timeline-company {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Testimonials */
.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-item {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.testimonial-item.active {
    display: block;
    opacity: 1;
}

.testimonial-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    text-align: center;
}

.testimonial-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.author-linkedin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--bg-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 2px solid var(--primary-color);
}

.author-linkedin:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
    transform: scale(1.1);
}

.author-linkedin i {
    font-size: 1.5rem;
}

.author-name {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.author-title {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.testimonial-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* iTechNotes Section */
.itechnotes-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    text-align: center;
    margin-bottom: 3rem;
}

.blog-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-info h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-info p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

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

.feature-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    text-align: center;
    transition: all var(--transition-fast);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

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

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
}

.contact-method:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.1);
}

.method-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 50px;
    text-align: center;
}

.method-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.method-info a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
    font-family: var(--font-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.form-group label {
    position: absolute;
    top: 50%;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all var(--transition-fast);
    pointer-events: none;
    transform: translateY(-50%);
    background: transparent;
    padding: 0;
    z-index: 1;
}

.form-group textarea + label {
    top: 1rem;
    transform: translateY(0);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:valid + label,
.form-group textarea:valid + label,
.form-group input.has-value + label,
.form-group textarea.has-value + label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    background: var(--bg-primary);
    padding: 0 0.5rem;
    transform: translateY(0);
    border-radius: 4px;
}

/* Enhanced styling for better UX */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

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

/* Error states for form validation */
.form-group.error input,
.form-group.error textarea {
    border-color: #dc2626;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.form-group.error label {
    color: #dc2626;
}

/* Enhanced focus states */
.form-group input:focus,
.form-group textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
}

/* Smooth transitions for all form elements */
.form-group input,
.form-group textarea,
.form-group label {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
}

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

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

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

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transition: left var(--transition-fast);
        border-right: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
        width: 80%;
        text-align: center;
    }
    
    .nav-menu .nav-link {
        display: block;
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        text-transform: none;
        border-radius: 8px;
        border: 1px solid var(--border-color);
        background: rgba(37, 99, 235, 0.05);
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: rgba(37, 99, 235, 0.15);
        border-color: var(--primary-color);
        transform: none;
    }
    
    .nav-logo {
        font-size: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .profile-image {
        width: 250px;
        height: 250px;
    }
    
    .profile-ring {
        width: 300px;
        height: 300px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 1.5rem;
        transform: translateX(0);
    }
    
    .timeline-item,
    .timeline-item:nth-child(even),
    .timeline-item:nth-child(odd) {
        width: 100%;
        left: 0;
        text-align: left;
        padding-left: 3.5rem;
        padding-right: 1rem;
    }
    
    .timeline-item::before,
    .timeline-item:nth-child(odd)::before,
    .timeline-item:nth-child(even)::before {
        left: 1.5rem;
        right: auto;
        transform: translateX(-50%);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-features {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    /* Loading Screen Mobile Optimizations */
    .loading-content {
        padding: 0 0.5rem;
        max-width: 320px;
    }
    
    .loading-text {
        gap: 0.8rem;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 2px;
        margin-bottom: 1rem;
    }
    
    .loading-message {
        font-size: clamp(0.85rem, 5vw, 1.1rem) !important;
        padding: 0 0.5rem !important;
        line-height: 1.4 !important;
        max-width: 100% !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .loading-bar {
        width: min(180px, 85vw);
        height: 3px;
    }
}

/* AI Twin Popout */
.ai-popout-launcher {
    position: fixed;
    left: 50%;
    bottom: 82px; /* align visually near hint bar */
    transform: translateX(calc(-50% + 220px)); /* sit to the right of centered hint */
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1210;
    overflow: hidden;
    animation: bob 3s ease-in-out infinite, glow 4s ease-in-out infinite;
}

.ai-popout-launcher img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ai-popout-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(37, 99, 235, 0.3);
    animation: ai-pulse 2s infinite;
    pointer-events: none;
}

@keyframes ai-pulse {
    0% { transform: scale(0.95); opacity: 1; }
    70% { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(0.95); opacity: 0; }
}

/* Innovative Launcher Aura and Orbiting Spark */
.ai-popout-launcher {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ai-popout-launcher:hover {
    transform: translateX(-50%) scale(1.04);
    box-shadow: 0 16px 40px rgba(37,99,235,0.25);
}
.ai-popout-launcher::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary-color), var(--secondary-color), var(--accent-color), var(--primary-color));
    animation: rotate-halo 10s linear infinite;
    opacity: 0.6;
    -webkit-mask: radial-gradient(farthest-side, transparent 70%, #000 72%);
            mask: radial-gradient(farthest-side, transparent 70%, #000 72%);
}
.ai-popout-launcher::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 12px rgba(37,99,235,0.7);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg) translateX(48px);
    transform-origin: center center;
    animation: orbit-spark 6s linear infinite, spark-flicker 1.8s ease-in-out infinite;
}

@keyframes rotate-halo {
    to { transform: rotate(360deg); }
}
@keyframes orbit-spark {
    to { transform: translate(-50%, -50%) rotate(360deg) translateX(48px); }
}

/* Multi-ripple pulse waves */
.ai-popout-pulse::before,
.ai-popout-pulse::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(37,99,235,0.25);
    transform: scale(0.85);
    opacity: 0.6;
    animation: ripple 2.2s ease-out infinite;
}
.ai-popout-pulse::after {
    animation-delay: 1.1s;
}
@keyframes ripple {
    0%   { transform: scale(0.85); opacity: 0.6; }
    70%  { opacity: 0.15; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes bob {
    0%, 100% { transform: translateX(calc(-50% + 220px)) translateY(0); }
    50% { transform: translateX(calc(-50% + 220px)) translateY(-4px); }
}

@keyframes glow {
    0%   { box-shadow: 0 12px 30px rgba(0,0,0,0.18), 0 0 0 rgba(37,99,235,0); }
    50%  { box-shadow: 0 14px 36px rgba(0,0,0,0.22), 0 0 24px rgba(37,99,235,0.35); }
    100% { box-shadow: 0 12px 30px rgba(0,0,0,0.18), 0 0 0 rgba(37,99,235,0); }
}

@keyframes spark-flicker {
    0%, 100% { box-shadow: 0 0 10px rgba(37,99,235,0.5); opacity: 0.8; transform: translate(-50%, -50%) rotate(0deg) translateX(48px) scale(1); }
    50%      { box-shadow: 0 0 16px rgba(37,99,235,0.9); opacity: 1; transform: translate(-50%, -50%) rotate(180deg) translateX(48px) scale(1.2); }
}

@media (max-width: 768px) {
    .ai-popout-launcher {
        left: 50%;
        bottom: 12px;
        transform: translateX(-50%);
        width: 64px;
        height: 64px;
        animation: none;
    }
}

/* Desktop: move launcher to right-center for higher visibility */
@media (min-width: 1024px) {
    .ai-popout-launcher {
        right: 24px;
        left: auto;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        width: 72px;
        height: 72px;
        animation: bob-right 3s ease-in-out infinite, glow 4s ease-in-out infinite;
    }
    .ai-popout-launcher:hover {
        transform: translateY(-50%) scale(1.05);
    }
    .ai-popout-launcher::after {
        transform: translate(-50%, -50%) rotate(0deg) translateX(44px);
    }
    @keyframes bob-right {
        0%, 100% { transform: translateY(-50%) translateX(0); }
        50% { transform: translateY(-50%) translateX(-4px); }
    }
}

.ai-popout {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, 92vw);
    height: min(640px, 80vh);
    display: none;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    z-index: 1290;
    overflow: hidden;
}

.ai-popout.show { display: flex; }
.ai-popout.minimized {
    display: flex;
    width: 320px;
    height: 64px;
    bottom: 16px;
    left: 50%;
    top: auto;
    transform: translateX(-50%);
    border-radius: 16px;
    overflow: hidden;
}
.ai-popout.minimized .ai-popout-header { cursor: pointer; height: 100%; border: none; background: rgba(37, 99, 235, 0.08); }
.ai-popout.minimized .ai-popout-body { display: none; }
.ai-popout.minimized .ai-popout-resize { display: none; }
.ai-popout.minimized .ai-popout-close { display: none; }
.ai-popout:not(.minimized) .ai-popout-close { display: inline-flex; }
.ai-popout.minimized .ai-popout-title::after {
    content: '• active';
    margin-left: 8px;
    color: var(--accent-color);
    font-weight: 700;
}

/* Minimized restore chip on mobile */
.ai-popout.minimized .ai-popout-header::after { content: ''; display: none; }
@media (min-width: 769px) {
    .ai-popout.minimized .ai-popout-header::after { content: 'Click to restore'; }
}

/* Creative confirmation overlay */
.ai-popout-confirm {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.ai-popout-confirm.show { display: flex; }
.ai-popout-confirm-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    width: min(360px, 92%);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.ai-popout-confirm-card .confirm-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}
.ai-popout-confirm-card h3 { margin-bottom: 8px; font-family: var(--font-primary); }
.ai-popout-confirm-card p { color: var(--text-secondary); margin-bottom: 16px; }
.ai-popout-confirm-card .confirm-actions { display: flex; gap: 10px; justify-content: center; }

.ai-popout-header {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 14px;
    background: rgba(37, 99, 235, 0.08);
    border-bottom: 1px solid var(--border-color);
    cursor: move;
}

.ai-popout-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-primary);
    color: var(--primary-color);
    font-weight: 700;
}

.ai-popout-controls { display: flex; gap: 6px; }
.ai-popout-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}
.ai-popout-btn:hover { background: rgba(37,99,235,0.08); }

.ai-popout-body { position: relative; flex: 1; }
.ai-popout-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.ai-popout-body iframe {
    width: 100%;
    height: 100%;
    background: transparent;
}

.ai-popout-resize {
    position: absolute;
    width: 14px;
    height: 14px;
    right: 6px;
    bottom: 6px;
    cursor: nwse-resize;
    border-right: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    border-radius: 2px;
}

.ai-popout-cta { text-align: center; margin-top: 1rem; }

@media (max-width: 480px) {
    .ai-popout { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 94vw; height: 78vh; }
    .ai-popout-launcher { bottom: 12px; width: 56px; height: 56px; }
}

/* Command Palette (Cmd/Ctrl+K) */
.cmdk-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 2rem;
    z-index: 1300;
}
.cmdk-overlay.show { display: flex; }

.cmdk {
    width: min(720px, 96vw);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25);
    overflow: hidden;
}

.cmdk-header {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
}
.cmdk-header i { color: var(--primary-color); }
.cmdk-header input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 8px 6px;
}
.cmdk-esc { color: var(--text-muted); background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 6px; }

.cmdk-list {
    max-height: 50vh;
    overflow-y: auto;
    display: grid;
    gap: 6px;
    padding: 10px;
}
.cmdk-section-title { color: var(--text-muted); font-size: 0.8rem; padding: 6px 8px; }
.cmdk-item {
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
}
.cmdk-item:hover, .cmdk-item.active { background: rgba(37,99,235,0.08); border-color: var(--border-color); }

.cmdk-footer { border-top: 1px solid var(--border-color); padding: 10px 12px; background: rgba(255,255,255,0.6); }
.cmdk-shortcuts { display: flex; gap: 1rem; color: var(--text-muted); font-size: 0.85rem; flex-wrap: wrap; }
.cmdk-shortcuts kbd { background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 6px; }

/* Hotkey Hint */
.hotkey-hint {
    position: fixed;
    left: 50%;
    bottom: 88px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 10px 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px var(--shadow-color);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    z-index: 1200;
    transition: all 0.35s ease;
}
.hotkey-hint.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.hotkey-hint.dim {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    pointer-events: none;
}

/* Desktop vs Mobile subtitle variants */
.subtitle-desktop { display: inline; }
.subtitle-mobile { display: none; }

@media (max-width: 768px) {
    .subtitle-desktop { display: none; }
    .subtitle-mobile { display: inline; }
    /* Hide hotkey hint on mobile */
    #hotkey-hint { display: none !important; }
}
.hotkey-hint kbd {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
}
.hotkey-hint .hint-close {
    margin-left: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .testimonial-content {
        padding: 2rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
    
    .profile-ring {
        width: 250px;
        height: 250px;
    }
    
    /* Loading Screen Extra Small Mobile */
    .loading-content {
        max-width: 280px;
        padding: 0 0.25rem;
    }
    
    .loading-text {
        gap: 0.6rem;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 2px;
        margin-bottom: 0.8rem;
    }
    
    .loading-message {
        font-size: clamp(0.75rem, 6vw, 1rem) !important;
        line-height: 1.3 !important;
        padding: 0 0.25rem !important;
        max-width: 100% !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .loading-bar {
        width: min(160px, 90vw);
        height: 2px;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1200px) {
    .loading-content {
        max-width: 500px;
    }
    
    .loading-text {
        gap: 1.2rem;
    }
    
    .loading-spinner {
        width: 70px;
        height: 70px;
        border-width: 4px;
        margin-bottom: 2rem;
    }
    
    .loading-message {
        font-size: 1.3rem;
        padding: 0 1rem;
    }
    
    .loading-bar {
        width: 250px;
        height: 5px;
    }
}
