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

:root {
    --accent-color: #36cfc9;
    --background-color: #121212;
    --glass-panel-bg: rgba(255, 255, 255, 0.03);
    --glass-panel-border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: auto;
    height: -webkit-fill-available; /* For iOS Safari */
}

body {
    font-family: 'Arial', sans-serif;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100); /* Use custom property */
    min-height: -webkit-fill-available; /* For iOS Safari */
    overscroll-behavior: none;
    background: #000 !important; /* Ensure black background always */
}

/* Low performance mode: tone down costly visual effects */
.low-perf .glass-panel,
.low-perf .skill-card,
.low-perf .skill-category-group,
.low-perf .user-count-badge,
.low-perf .stat-badge {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

.low-perf #word-cloud,
.low-perf #word-cloud.highlight,
.low-perf .cloud-word,
.low-perf .final-word,
.low-perf .moving-word,
.low-perf .exiting-word {
    animation: none !important;
    text-shadow: none !important;
    filter: none !important;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    height: calc(var(--vh, 1vh) * 100); /* Use custom property */
    z-index: -1;
    background-color: #000 !important;
    background: #000 !important;
    will-change: transform; /* Optimize for animation */
}

.container {
    position: relative;
    min-height: calc(var(--vh, 1vh) * 100); /* Use custom property */
    min-height: -webkit-fill-available; /* For iOS Safari */
    height: 100%; /* Keep existing height if present */
    width: 100%;
    overflow-x: hidden;
}

.content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: calc(var(--vh, 1vh) * 100);
    z-index: 1;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1rem 0;
    border-radius: 10px;
    position: sticky;
    top: 1rem;
    z-index: 10;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
}

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

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Mobile navbar fixes */
.nav-container {
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    z-index: 20;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    /* Hide the navbar itself when in hamburger mode */
    .navbar {
        display: none !important;
    }

    .nav-container {
        justify-content: flex-end;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100dvh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(20, 20, 20, 0.95);
        backdrop-filter: blur(10px);
        transition: right 0.3s ease;
        z-index: 10;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .nav-links a {
        font-size: 1.25rem;
    }

    .hero {
        padding-top: 0.5rem;
    }
}

/* Section Styling */
.section {
    margin: 4rem 0;
    scroll-margin-top: 100px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
    contain: paint;
}

/* Projects section should be visible by default without animation */
#projects.section {
    opacity: 1;
    transform: translateY(0);
    transition: none;
}

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

h1 {
    position: relative;
    z-index: 2;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--accent-color);
    text-shadow: none;
    filter: none;
    box-shadow: none;
    animation: none;
}

/* Specific override for the name in the header to ensure no glow */
h1 .highlight {
    color: var(--accent-color);
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
    animation: none !important;
    will-change: auto !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
}

/* Direct targeting of the name highlight with highest specificity */
.name-highlight {
    color: var(--accent-color) !important;
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
    animation: none !important;
    will-change: auto !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
    border: none !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    outline: none !important;
    mix-blend-mode: normal !important;
    display: inline !important;
}

/* Override any parent element effects */
h1 .name-highlight::before,
h1 .name-highlight::after {
    display: none !important;
    content: none !important;
}

/* Special styling for the word-cloud element only */
#word-cloud.highlight {
    color: var(--accent-color);
    text-shadow: 0 0 5px rgba(100, 255, 218, 0.3);
    will-change: opacity;
    cursor: pointer;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 8px rgba(100, 255, 218, 0.5));
}

/* Hero Section */
.hero {
    position: relative;
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
    z-index: 1;
}

.tagline {
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.tagline-prefix-keep {
    display: inline-block;
}

.tagline-prefix-hide {
    display: inline-block;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cta-buttons {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.resume-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resume-btn i {
    font-size: 1.1rem;
}

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

.primary:hover {
    background-color: #4cd3a9;
    transform: translateY(-3px);
}

.secondary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.secondary:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-3px);
}

/* About Section */
.about-content {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 0 0 300px;
    width: 300px;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background-color: rgba(40, 40, 40, 0.8);
}

.about-photo {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: block;
}

/* Projects Section */
.projects-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 2px 5px rgba(100, 255, 218, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    content-visibility: auto;
    contain-intrinsic-size: 300px 420px;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

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

/* Prevent cropping for projects that opt out */
.project-image.no-crop img {
    object-fit: contain;
}

/* Disable hover zoom when no-crop is enabled */
.project-card:hover .project-image.no-crop img {
    transform: none;
}

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

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Tri-split thirds layout for special project image */
/* Circular pie-style tri-split */
.tri-pie-wrapper {
    display: grid;
    place-items: center;
    height: auto;
    aspect-ratio: 1 / 1;
}

.tri-pie {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: block;
}

.tri-pie-image {
    cursor: pointer;
    transition: opacity 0.25s ease, filter 0.25s ease;
}

.tri-pie-image.dimmed {
    opacity: 0;
    pointer-events: none;
}

.tri-pie-image.active {
    filter: brightness(1.08);
}


/* Ensure badges stay above */
.project-image .user-count-badge,
.project-image .date-badge,
.project-image .stat-badge {
    z-index: 3;
}

.project-content h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.project-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

.project-links {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

.btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn.small i {
    font-size: 0.85rem;
}

.btn.small:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* Style for the Live Demo button */
.project-links a.btn.small:not(.secondary) {
    background: linear-gradient(135deg, var(--accent-color), #4cd3a9);
    color: #000;
    font-weight: 600;
    padding-left: 1rem;
    padding-right: 1rem;
    box-shadow: 0 2px 8px rgba(100, 255, 218, 0.3);
    position: relative;
    overflow: hidden;
}

.project-links a.btn.small:not(.secondary)::before {
    content: '▶';
    margin-right: 5px;
    font-size: 0.75rem;
}

.project-links a.btn.small:not(.secondary):hover {
    background: linear-gradient(135deg, #4cd3a9, var(--accent-color));
    box-shadow: 0 4px 10px rgba(100, 255, 218, 0.4);
}

.error-message {
    text-align: center;
    color: #ff6b6b;
    grid-column: 1 / -1;
    padding: 2rem;
}

/* Skills Section */
.skills-categories {
    column-count: 1;
    column-gap: 1rem;
    margin-top: 1rem;
    content-visibility: auto;
    contain: content;
    contain-intrinsic-size: 1200px 800px;
}

/* Pre-warm rendering for skills to avoid lag when entering viewport */
.skills-categories.prewarm {
    content-visibility: visible;
}

.skill-category-group {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-radius: 10px;
    padding: 0.75rem;
    transition: all 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 1rem;
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    position: relative;
    z-index: 4;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-3px) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    --dot-interaction-type: "push";
    --dot-interaction-radius: 120;
    --dot-interaction-strength: 0.8;
}

/* Remove hover effect for skill category groups */
.skill-category-group:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-3px) !important;
    z-index: 4;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

/* Make About Me always look like a hovered skill category group, but darker and less grey */
#about {
    background-color: rgba(5, 5, 5, 0.34) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    transform: translateY(-3px) !important;
    z-index: 4;
}

.category-header {
    padding: 0.5rem 0.5rem 0;
    margin-bottom: 0.5rem;
}

.category-header h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-header h3 i {
    color: var(--accent-color);
}

.category-skills {
    display: flex;
    flex-direction: column;
}

.category-skills .skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0 0.5rem 0.5rem;
}

.skill-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: rgba(20, 20, 20, 0.8) !important;
    border-radius: 8px;
    transition: all 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 5;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25) !important;
    /* Add solid object class properties always */
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    --dot-interaction-type: "push";
    --dot-interaction-radius: 80;
    --dot-interaction-strength: 1;
    content-visibility: auto;
    contain-intrinsic-size: 1000px 80px;
}

/* Remove hover effect for skill cards */
.skill-card:hover {
    background-color: rgba(20, 20, 20, 0.8) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25) !important;
    z-index: 5;
    position: relative;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.skill-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.skill-content {
    flex: 1;
}

.skill-content h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.skill-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

.tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--accent-color);
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

/* Media Queries for Skills Section */
@media (min-width: 768px) {
    .skills-categories {
        column-count: 2;
    }
}

@media (min-width: 1200px) {
    .skills-categories {
        column-count: 2;
    }
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: stretch;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-form-container {
    flex: 2;
    min-width: 300px;
    width: 100%;
}

.contact-form {
    width: 100%;
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--highlight-color, #36cfc9);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.thank-you-container {
    width: 100%;
    height: 100%;
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
    }
    
    .contact-info {
        margin-bottom: 2rem;
    }
    
    .contact-form-container {
        width: 100%;
    }
    
    /* Fix for mobile form padding and overflow */
    .contact-form {
        padding: 1rem;
    }
    
    .glass-panel {
        padding: 1.5rem;
    }
    
    #contact .glass-panel {
        padding: 1.5rem 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .content {
        padding: 0 1rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

/* Frosted glass panels */
.glass-panel {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 15px;
    border: 1px solid var(--glass-panel-border);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform, opacity, background-color;
    contain: paint;
}

/* Remove hover effect for glass panels */
.glass-panel:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Solid objects for background interaction */
.solid-object {
    position: relative;
    background-color: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    z-index: 2;
}

/* Controls panel */
.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.controls.visible {
    display: flex;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.close-button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.fps-counter {
    font-family: monospace;
    font-size: 14px;
    color: #fff;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.checkbox-group label {
    cursor: pointer;
}

label {
    min-width: 150px;
}

input[type="range"] {
    width: 100px;
}

span {
    min-width: 30px;
    text-align: right;
}

/* Project user information */
.project-users {
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-users h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-users h4 i {
    color: var(--accent-color);
}

.user-count, .user-growth {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.user-count span, .user-growth span {
    font-weight: bold;
    color: var(--accent-color);
}

/* Testimonials */
.testimonials-container {
    margin: 1rem 0;
}

.testimonial {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    font-size: 0.9rem;
}

.testimonial-author span {
    font-size: 0.8rem;
    opacity: 0.7;
}

.testimonial-text {
    font-size: 0.9rem;
    font-style: italic;
    line-height: 1.4;
    margin: 0;
}

.view-testimonials-btn, .view-comments-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    margin-top: 0.5rem;
}

/* Feedback */
.project-feedback {
    margin: 1rem 0;
}

.feedback-ratings {
    margin-bottom: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.rating-label {
    font-size: 0.85rem;
    min-width: auto;
}

.rating-value {
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--accent-color);
}

.rating-stars {
    color: gold;
    font-size: 0.85rem;
}

.feedback-comment {
    font-size: 0.9rem;
    font-style: italic;
    margin: 0.5rem 0;
}

/* Case study */
.case-study {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.case-study h5 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.case-study p {
    font-size: 0.9rem;
    margin: 0;
}

/* User count badge */
.user-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--accent-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--accent-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Stat badge for project stats (images processed, etc.) */
.stat-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    min-width: 60px;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-weight: bold;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.95em; /* Slightly smaller than normal text */
    line-height: 1.2;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-badge .stat-text {
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-badge .stat-value {
    font-size: 1em;
    font-weight: 700;
    margin: 0 2px;
    letter-spacing: 0.01em;
    vertical-align: baseline;
}

.user-count-badge:hover {
    transform: scale(1.05);
    background-color: rgba(0, 0, 0, 0.8);
}

.user-count-badge i {
    font-size: 0.8rem;
}

/* Demographics */
.demographics {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.demographic-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.8rem;
}

.demographic-item h5 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demographic-item h5 i {
    font-size: 0.85rem;
}

.regions-list, .industries-list, .institutions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.region-tag, .industry-tag, .institution-tag {
    background: rgba(100, 255, 218, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.age-range, .user-type {
    font-size: 0.9rem;
    color: #fff;
}

/* User info toggle */
.user-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.toggle-user-info-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toggle-user-info-btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.toggle-user-info-btn i {
    transition: transform 0.3s ease;
}

.toggle-user-info-btn.active i {
    transform: rotate(180deg);
}

.user-info-summary {
    margin-bottom: 0.8rem;
}

/* User statistics summary */
.user-stats-summary {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Moving word animation */
.moving-word, .exiting-word {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    /* Remove all glow and animation for moving/exit words */
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
    animation: none !important;
    will-change: transform, opacity;
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
    transition: opacity 0.5s ease-in-out;
    text-align: center;
    transform: translate(-50%, 0);
}

.moving-word {
    position: absolute;
    will-change: transform, left, top;
}

/* Style for the final word that stays visible */
.final-word {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    /* Remove all glow and animation for the selected word in the middle by default */
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
    animation: none !important;
    will-change: transform, opacity;
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
    color: var(--accent-color);
    font-weight: bold;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    text-align: center;
    transform: translate(-50%, 0);
}

/* Glow for final word when all words are flying to it */
.final-word.glow {
    text-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color), 0 0 30px var(--accent-color);
    filter: drop-shadow(0 0 16px var(--accent-color));
    animation: pulse-highlight 1.2s infinite alternate;
}

.moving-word::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.4;
    filter: blur(6px);
    color: var(--accent-color);
    transform: translateY(2px) translateX(-2px);
    z-index: -1;
}

/* Add the same after effect to the final word */
.final-word::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.4;
    filter: blur(6px);
    color: var(--accent-color);
    transform: translateY(2px) translateX(-2px);
    z-index: -1;
}

/* Adjust the word cloud span to better handle the animation */
#word-cloud {
    display: inline-block;
    min-width: 120px;
    text-align: center;
    position: relative;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
    padding: 0 5px;
    font-weight: bold;
    font-size: 2rem;
    border-bottom: 2px solid transparent;
    will-change: opacity;
    line-height: 1;
    vertical-align: middle;
    color: var(--accent-color);
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
}

/* Enhance the highlighted word in the cloud */
.cloud-word.highlighted {
    color: var(--accent-color);
    font-weight: bold;
    transform: scale(1.5);
    z-index: 100 !important;
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
    animation: pulse-highlight 2s infinite;
    will-change: transform, opacity, text-shadow;
}

@keyframes pulse-highlight {
    0% {
        text-shadow: 0 0 5px var(--accent-color-transparent);
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 15px var(--accent-color), 0 0 20px rgba(255, 255, 255, 0.3);
        opacity: 1;
        transform: scale(1.15);
    }
    100% {
        text-shadow: 0 0 5px var(--accent-color-transparent);
        opacity: 0.8;
        transform: scale(1);
    }
}

/* Word Cloud Animation */
#word-cloud:hover {
    transform: scale(1.05);
    border-bottom: 2px solid var(--accent-color);
}

#word-cloud:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#word-cloud:hover:after {
    transform: scaleX(1);
}

.word-animation {
    animation: pulse 2s infinite;
}

.word-animation.paused {
    animation-play-state: paused;
}

.word-exit {
    animation: fadeOut 0.5s forwards;
}

.word-entrance {
    animation: fadeIn 0.5s forwards;
}

@keyframes pulse {
    0% {
        color: var(--accent-color);
        text-shadow: 0 0 5px rgba(100, 255, 218, 0.1);
    }
    50% {
        color: #4cd3a9;
        text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
    }
    100% {
        color: var(--accent-color);
        text-shadow: 0 0 5px rgba(100, 255, 218, 0.1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

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

/* Word Cloud Indicator */
.word-cloud-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 0.7em;
    color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#word-cloud:hover .word-cloud-indicator {
    opacity: 1;
    animation: spin 2s infinite linear;
}

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

/* Word Cloud Visualization */
.word-cloud-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
    border-radius: var(--border-radius);
    background: none !important;
    filter: none !important;
    box-shadow: none !important;
}

.word-cloud-wrapper.glass-panel {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
    box-shadow: none !important;
}

.word-cloud-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Make cloud words visible on top of the glass background */
.cloud-word {
    position: absolute;
    color: var(--accent-color);
    font-weight: 500;
    white-space: nowrap;
    transform-origin: center;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
    pointer-events: auto;
    user-select: none;
    letter-spacing: 0.5px;
    will-change: transform, opacity, left, top;
    opacity: 0.7; /* Increased opacity for better visibility */
    z-index: 3; /* Ensure words appear above the glass background */
}

.cloud-word:hover {
    transform: scale(1.2);
    color: var(--accent-color);
    opacity: 1;
    text-shadow: 0 0 10px var(--accent-color-transparent), 0 0 15px rgba(255, 255, 255, 0.5);
}

.cloud-word.highlighted {
    /* Remove all glow and animation for the selected word in the middle */
    animation: none !important;
    filter: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 5px rgba(100, 255, 218, 0.5));
    }
    to {
        filter: drop-shadow(0 0 12px rgba(100, 255, 218, 0.8));
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(3px, 5px) rotate(1deg);
    }
    50% {
        transform: translate(0, 8px) rotate(0deg);
    }
    75% {
        transform: translate(-3px, 5px) rotate(-1deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* Responsive adjustments for word cloud */
@media (max-width: 768px) {
    .cloud-word {
        font-size: 0.8em !important;
    }
}

/* Ripple Effect */
/* Ripple effect removed */
.word-ripple { display: none !important; }

/* Word Trail Effect */
.word-trail {
    position: absolute;
    pointer-events: none;
    z-index: 998;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(100, 255, 218, 0.5);
    will-change: transform, opacity, left, top;
    filter: blur(3px);
    color: var(--accent-color);
    line-height: 1;
    vertical-align: middle;
    display: inline-block;
    transition: opacity 0.5s ease-in-out;
    text-align: center;
    transform: translate(-50%, 0);
}

/* Complete override for the hero section to remove all glow effects */
.hero h1,
.hero h1 *,
.hero h1 span,
.hero h1 span.highlight,
.hero h1 span.name-highlight {
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
    animation: none !important;
    will-change: auto !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
    border: none !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    outline: none !important;
    mix-blend-mode: normal !important;
    display: inline !important;
    -webkit-text-shadow: none !important;
    -moz-text-shadow: none !important;
    -webkit-filter: none !important;
    -moz-filter: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
}

/* Preserve the word cloud styling */
#word-cloud,
#word-cloud.highlight,
.tagline #word-cloud {
    text-shadow: 0 0 5px rgba(100, 255, 218, 0.3) !important;
    filter: drop-shadow(0 0 8px rgba(100, 255, 218, 0.5)) !important;
    animation: pulse 2s infinite !important;
    will-change: opacity !important;
    cursor: pointer !important;
}

/* Date badge */
.date-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.date-badge i {
    font-size: 0.9rem;
    color: #ffdd57;
}

/* Date filter button with icon */
.filter-btn i {
    margin-right: 5px;
}

.filter-btn[data-filter="date"] {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.filter-btn[data-filter="date"]:hover {
    transform: translateY(-2px);
}

/* Tag filters */
.tag-filters {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping to ensure single row */
    gap: 8px;
    margin-bottom: 10px; /* Reduced from 20px to 10px */
    padding: 0 20px;
    overflow-x: auto; /* Add horizontal scrolling if needed */
    scrollbar-width: thin; /* For Firefox */
    -ms-overflow-style: none; /* For IE and Edge */
    position: relative;
    justify-content: center; /* Center the tags */
    padding-top: 5px; /* Add padding at top to prevent cutoff */
    padding-bottom: 5px; /* Add padding at bottom to prevent cutoff */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.tag-filters::-webkit-scrollbar {
    display: none;
}

.tag-filter-btn {
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #ccc;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
    white-space: nowrap; /* Prevent button text from wrapping */
    flex-shrink: 0; /* Prevent buttons from shrinking */
    position: relative; /* For the hover effect */
}

.tag-filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.tag-filter-btn.active {
    background-color: rgba(79, 192, 141, 0.2);
    border-color: rgba(79, 192, 141, 0.5);
    color: #4fc08d;
}

.tag-filter-btn .count {
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 2px 6px;
    margin-left: 5px;
}

/* Add these styles to your existing CSS file */
.thank-you-container {
    text-align: center;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.checkmark-container {
    margin-top: 2rem;
}

.checkmark-container i {
    font-size: 5rem;
    color: #4CAF50;
    animation: fade-in 0.5s ease-in-out;
}

@keyframes fade-in {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

/* Add to your existing CSS */
.spinner {
    margin-left: 8px;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.contact-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

/* Add these styles to fix contact links */
.contact-links {
    margin-top: 1.5rem;
}

.contact-links a {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-color, white);
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-word;
}

.contact-links a:hover {
    color: var(--highlight-color, #36cfc9);
}

.contact-links i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    min-width: 1.5rem;
    text-align: center;
    color: var(--highlight-color, #36cfc9);
    flex-shrink: 0;
}

/* Responsive adjustments for about section */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        align-items: center;
    }
    
    .about-text {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .about-image {
        width: 250px;
        height: 250px;
    }
}

/* Loading indicator for skills section */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    width: 100%;
}

.loading-indicator i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.loading-indicator p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Familiarity Section */
.familiarity-section {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
}

.familiarity-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
    transition: color 0.3s ease;
    border-radius: 4px;
}

.familiarity-toggle:hover, .familiarity-toggle.active {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.familiarity-toggle i.fa-lightbulb {
    color: #ffcc00;
}

.toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.familiarity-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.familiarity-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 0.5rem;
}

.familiarity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.familiar-item {
    background-color: rgba(255, 255, 218, 0.03);
    border: 1px solid rgba(255, 255, 218, 0.15);
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.familiar-item:hover {
    background-color: rgba(255, 255, 218, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.familiar-item:hover .familiar-name i {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.familiar-name {
    color: rgba(255, 255, 218, 0.9);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.familiar-name i {
    color: #ffcc00;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.familiar-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
    padding-left: 25px; /* Align text with the icon */
}
