@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #3B82F6;       /* Modern blue */
    --secondary: #10B981;     /* Teal accent */
    --text: #1F2937;
    --bg: #F9FAFB;
    --card-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    
    /* Dark theme */
    --dark-primary: #60A5FA;  /* Lighter blue for dark mode */
    --dark-secondary: #34D399; /* Lighter teal for dark mode */
    --dark-text: #F3F4F6;
    --dark-bg: #111827;
    --dark-card-bg: rgba(31, 41, 55, 0.7);
    --dark-glass-border: rgba(255, 255, 255, 0.1);
    --dark-glass-shadow: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: all 0.3s ease;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.866-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.866-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="rgba(0,0,0,0.03)" fill-rule="evenodd"/%3E%3C/svg%3E');
    background-attachment: fixed;
}

html[data-theme="dark"] {
    background: var(--dark-bg);
    color: var(--dark-text);
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.866-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.866-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="rgba(255,255,255,0.03)" fill-rule="evenodd"/%3E%3C/svg%3E');
    background-attachment: fixed;
}

.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text);
    padding: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector:hover {
    background: rgba(255, 255, 255, 0.2);
}

.language-selector option {
    background: var(--bg);
    color: var(--text);
}

html[data-theme="dark"] .glass-nav {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--dark-glass-border);
    box-shadow: 0 4px 30px var(--dark-glass-shadow);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.866-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.866-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd"/%3E%3C/svg%3E');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.5rem;
    opacity: 0.9;
}

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

.section {
    margin: 8rem 0;
    position: relative;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    min-height: 400px; /* Prevent layout shift while loading */
}

.projects-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-skeleton {
    background: var(--glass-bg);
    border-radius: 15px;
    padding: 1.5rem;
    height: 400px;
    animation: skeleton-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px var(--glass-shadow);
}

html[data-theme="dark"] .project-card {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-glass-border);
    box-shadow: 0 4px 30px var(--dark-glass-shadow);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.project-card img,
.project-image,
.project-video {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    max-width: 100%;
    border-radius: 1rem 1rem 0 0;
    background: transparent;
}

.project-card:hover img,
.project-card:hover .project-image,
.project-card:hover .project-video {
    /* No scaling to avoid cropping */
    transform: none;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

/* Tech tags styling */
.project-tech {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

html[data-theme="dark"] .tech-tag {
    background: rgba(96, 165, 250, 0.1);
    color: var(--dark-primary);
    border-color: rgba(96, 165, 250, 0.2);
}

.tech-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

html[data-theme="dark"] .tech-tag:hover {
background: var(--dark-primary);
color: var(--dark-bg);
}

/* Project links styling */
.project-links {
display: flex;
gap: 1rem;
margin-top: 1rem;
}

.btn-demo, .btn-github {
padding: 8px 12px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
font-weight: 500;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 4px;
text-decoration: none;
min-width: 80px;
justify-content: center;
background: none;
font-family: inherit;
}

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

.btn-github {
    background: var(--text);
    color: white;
}

html[data-theme="dark"] .btn-demo {
    background: var(--dark-primary);
}

html[data-theme="dark"] .btn-github {
    background: var(--dark-text);
    color: var(--dark-bg);
}

.btn-demo:hover, .btn-github:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Enhanced Glassmorphism Skills */
.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    min-height: 200px; /* Prevent layout shift while loading */
}

/* Skills skeleton loading */
.skills-skeleton {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.skill-skeleton {
    background: var(--glass-bg);
    border-radius: 25px;
    padding: 0.8rem 1.5rem;
    height: 40px;
    width: 120px;
    animation: skeleton-pulse 1.5s ease-in-out infinite alternate;
}

.skill-item {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px var(--glass-shadow);
}

html[data-theme="dark"] .skill-item {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-glass-border);
    box-shadow: 0 4px 30px var(--dark-glass-shadow);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.skill-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-name i {
    font-size: 1.4rem;
}

.skill-bar {
    height: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

html[data-theme="dark"] .skill-bar {
    background: rgba(255, 255, 255, 0.05);
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 5px;
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.5, 1);
}

.skill-percentage {
    text-align: right;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

/* Enhanced Timeline for Experience */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 2rem auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 24px;
    height: 24px;
    right: -12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50px;
    object-fit: cover;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -12px;
}

.timeline-content {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 30px var(--glass-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

html[data-theme="dark"] .timeline-content {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-glass-border);
    box-shadow: 0 4px 30px var(--dark-glass-shadow);
}

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

.timeline-date {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Enhanced Contact Form */
.contact-form {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 4rem 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.866-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.866-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z" fill="rgba(0,0,0,0.03)" fill-rule="evenodd"/%3E%3C/svg%3E');
    opacity: 0.5;
    z-index: 0;
}

.glass-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 1rem;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.8rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.hero .image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    /* Prevent layout shift */
    aspect-ratio: 1 / 1;
    display: block;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.form-group label {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    pointer-events: none;
    font-weight: 500;
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:valid ~ label {
    top: -0.7rem;
    left: 0.8rem;
    font-size: 0.8rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 0.2rem 0.8rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.underline::before {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus ~ .underline::before,
.form-group textarea:focus ~ .underline::before {
    left: 0;
}

.submit-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.submit-btn:hover::before {
    left: 100%;
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Theme Toggle Button */
.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--glass-shadow);
}

.theme-btn:hover {
    transform: rotate(30deg);
    box-shadow: 0 5px 15px var(--glass-shadow);
}

html[data-theme="dark"] .theme-btn {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--dark-glass-border);
    box-shadow: 0 2px 10px var(--dark-glass-shadow);
}

/* Animations */
.animate-slide {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.3s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-content {
        padding: 2rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-dot {
        left: 21px;
        right: auto;
    }
    
    .section {
        margin: 4rem 0;
    }
    
    .section h2 {
        font-size: 2rem;
    }
}

/* Chatbot Widget Styling */
.chatbot-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    height: 400px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px var(--glass-shadow);
    z-index: 999;
    transition: all 0.3s ease;
}

html[data-theme="dark"] .chatbot-widget {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-glass-border);
    box-shadow: 0 4px 30px var(--dark-glass-shadow);
}

.chat-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

html[data-theme="dark"] .chat-header {
    background: linear-gradient(135deg, var(--dark-primary), var(--dark-secondary));
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
}

#chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.message {
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    max-width: 80%;
    word-break: break-word;
}

.user-message {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.2rem;
}

html[data-theme="dark"] .user-message {
    background: var(--dark-primary);
}

.bot-message {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 0.2rem;
}

html[data-theme="dark"] .bot-message {
    background: rgba(255, 255, 255, 0.05);
    color: var(--dark-text);
}

.chat-input {
    display: flex;
    padding: 0.8rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

html[data-theme="dark"] .chat-input {
    border-top: 1px solid var(--dark-glass-border);
    background: rgba(0, 0, 0, 0.1);
}

.chat-input input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

html[data-theme="dark"] .chat-input input {
    background: rgba(255, 255, 255, 0.05);
    color: var(--dark-text);
}

.chat-input input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .chat-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-input button {
    width: 40px;
    height: 40px;
    margin-left: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

html[data-theme="dark"] .chat-input button {
    background: var(--dark-primary);
}

.chat-input button:hover {
    transform: scale(1.1);
}

.chatbot-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 998;
    transition: all 0.3s ease;
}

html[data-theme="dark"] .chatbot-toggle-btn {
    background: linear-gradient(135deg, var(--dark-primary), var(--dark-secondary));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.chatbot-toggle-btn:hover {
    transform: scale(1.1);
}

/* Image styling */
.image {
    border-radius: 50%;  /* Changed from 50px to 50% for a perfect circle */
    height: 120px;      /* Reduced size further */
    width: 120px;       /* Reduced size further */
    display: block;
    margin: 0 auto 1.5rem;
    object-fit: cover;
}

/* Spinner animation for loading states */
.spin {
    animation: spin 1s linear infinite;
}

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

/* Project media container for images and videos */
.project-media {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
    border-radius: 1rem 1rem 0 0;
    display: block;
    background: transparent;
    padding: 0;
}

.project-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.6s ease;
    display: block;
}

.project-card:hover .project-image {
    transform: scale(1.03);
}

/* Video styling */
.project-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 1rem 1rem 0 0;
    display: block;
}

.video-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
    background: transparent;
}

.video-container iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 1rem 1rem 0 0;
    display: block;
}

/* Hover effects for video containers */
.project-card:hover .video-container {
    transform: scale(1.02);
}

/* Project URL display styles */
.project-url-display {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

html[data-theme="dark"] .project-url-display {
    background: linear-gradient(135deg, var(--dark-primary), var(--dark-secondary));
}

.url-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 90%;
}

.url-container.no-url {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.url-icon {
    width: 24px;
    height: 24px;
    color: white;
    opacity: 0.9;
}

.url-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.url-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-url-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    word-break: break-all;
    transition: all 0.3s ease;
}

.project-url-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Responsive adjustments for URL display */
@media (max-width: 768px) {
    .url-container {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .project-url-link {
        font-size: 0.8rem;
    }
}