/* Base Styles - Data Analytics Theme with Light/Dark Mode Support */
:root {
    /* Light Mode (Default) */
    --primary-color: #4361ee;      /* Vibrant blue - primary brand color */
    --primary-color-rgb: 67, 97, 238; /* RGB values for primary color */
    --secondary-color: #3a0ca3;    /* Deep purple - secondary brand color */
    --accent-color: #4cc9f0;       /* Bright cyan - for highlights and accents */
    --dark-color: #2b2d42;         /* Deep navy - for dark sections */
    --light-color: #f8f9fa;        /* Light gray - for light sections */
    --text-color: #2b2d42;         /* Dark navy - main text */
    --text-light: #6c757d;         /* Medium gray - secondary text */
    --background-color: #ffffff;   /* White - main background */
    --card-bg: #ffffff;            /* White - card background */
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Shadow */
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, #4361ee, #3a0ca3); /* Blue to purple gradient */
    --gradient-accent: linear-gradient(135deg, #4361ee, #4cc9f0);  /* Blue to cyan gradient */
    --chart-color-1: #4361ee;      /* Data visualization color 1 */
    --chart-color-2: #3a0ca3;      /* Data visualization color 2 */
    --chart-color-3: #4cc9f0;      /* Data visualization color 3 */
    --chart-color-4: #7209b7;      /* Data visualization color 4 */
    --chart-color-5: #f72585;      /* Data visualization color 5 */
    
    /* Animation variables */
    --animation-duration: 0.8s;
    --animation-timing: cubic-bezier(0.25, 0.1, 0.25, 1);
    --stagger-delay: 0.1s;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary-color: #4cc9f0;      /* Bright cyan - primary brand color in dark mode */
    --primary-color-rgb: 76, 201, 240; /* RGB values for primary color in dark mode */
    --secondary-color: #7209b7;    /* Vibrant purple - secondary brand color */
    --accent-color: #4361ee;       /* Vibrant blue - for highlights and accents */
    --dark-color: #f8f9fa;         /* Light color for dark mode text */
    --light-color: #212529;        /* Dark gray for sections in dark mode */
    --text-color: #f8f9fa;         /* Light color for text in dark mode */
    --text-light: #adb5bd;         /* Light gray - secondary text */
    --background-color: #121212;   /* Very dark gray - main background */
    --card-bg: #1e1e1e;            /* Dark gray - card background */
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Darker shadow for dark mode */
    --gradient-primary: linear-gradient(135deg, #4cc9f0, #7209b7); /* Cyan to purple gradient */
    --gradient-accent: linear-gradient(135deg, #4cc9f0, #4361ee);  /* Cyan to blue gradient */
    --chart-color-1: #4cc9f0;      /* Data visualization color 1 */
    --chart-color-2: #7209b7;      /* Data visualization color 2 */
    --chart-color-3: #4361ee;      /* Data visualization color 3 */
    --chart-color-4: #f72585;      /* Data visualization color 4 */
    --chart-color-5: #80ffdb;      /* Data visualization color 5 */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: calc(100% - 40px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--dark-color);
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::before {
    content: '<';
    position: absolute;
    left: -30px;
    color: var(--secondary-color);
    opacity: 0.4;
    font-weight: 300;
}

.section-title::after {
    content: '/>';
    position: absolute;
    right: -40px;
    bottom: 0;
    color: var(--accent-color);
    opacity: 0.4;
    font-weight: 300;
}

.section-title span {
    position: relative;
    z-index: 1;
}

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

section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.primary-btn:hover {
    background: #5649c0;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .navbar {
    background-color: rgba(30, 30, 30, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.theme-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.theme-toggle button:hover {
    background-color: rgba(var(--primary-color-rgb), 0.2);
}

.theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: inline-block;
    color: var(--accent-color);
}

.sound-toggle {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.sound-toggle button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
    cursor: pointer;
    transition: var(--transition);
}

.sound-toggle button:hover,
.sound-toggle button:focus-visible {
    background: rgba(var(--primary-color-rgb), 0.2);
    outline: 3px solid rgba(var(--primary-color-rgb), 0.2);
    outline-offset: 2px;
}

.sound-on-icon {
    display: none;
}

.sound-toggle button[aria-pressed="true"] .sound-off-icon {
    display: none;
}

.sound-toggle button[aria-pressed="true"] .sound-on-icon {
    display: inline-block;
}

.sound-status {
    position: fixed;
    right: 50%;
    bottom: 22px;
    z-index: 1100;
    width: max-content;
    max-width: calc(100vw - 120px);
    padding: 6px 9px;
    border-radius: 6px;
    color: var(--text-color);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translate(50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sound-status.is-announcing {
    opacity: 1;
    transform: translate(50%, 0);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: var(--transition);
    background-color: var(--dark-color);
}

/* Hero Section */
.hero {
    padding-top: 150px;
    padding-bottom: 100px;
    background: linear-gradient(135deg, var(--light-color) 0%, #c3e0f5 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--light-color) 0%, #1a1a2e 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(52, 152, 219, 0.1) 0%, transparent 150px),
        radial-gradient(circle at 80% 70%, rgba(26, 188, 156, 0.1) 0%, transparent 150px);
    z-index: 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    min-width: 0;
    max-width: 650px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
    line-height: 1.2;
}

.hero-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 500;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

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

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

.profile-img-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow);
}

.profile-img-placeholder i {
    font-size: 150px;
    color: white;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 5px solid white;
    position: relative;
}

.profile-img::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--gradient-accent);
    z-index: -1;
    opacity: 0.7;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-img img:hover {
    transform: scale(1.05);
}

/* About Section */
.about {
    background-color: var(--light-color);
    position: relative;
    overflow: hidden;
}

/* Add data visualization patterns to the about section for analytics theme */
.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(var(--primary-color-rgb), 0.1) 0%, transparent 150px),
        radial-gradient(circle at 80% 70%, rgba(var(--primary-color-rgb), 0.1) 0%, transparent 150px);
    z-index: 0;
    opacity: 0.7;
}

.about::after {
    content: '';
    position: absolute;
    bottom: 50px;
    left: 50px;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(circle, rgba(26, 188, 156, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 1;
    max-width: 980px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-light);
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.highlight-item {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.highlight-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.highlight-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.highlight-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.highlight-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Skills Section */
.skills {
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(var(--primary-color-rgb), 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--primary-color-rgb), 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
}

.skills::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background-image: 
        radial-gradient(circle at center, rgba(var(--primary-color-rgb), 0.05) 0%, transparent 70%);
    z-index: 0;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
}

.skill-item span {
    font-weight: 500;
    flex: 1;
}

.skill-level {
    width: 100px;
    height: 8px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

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

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--chart-color-1), var(--chart-color-3));
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skill-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(255, 255, 255, 0.1) 5px,
        rgba(255, 255, 255, 0.1) 10px
    );
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Projects Section */
.projects {
    background-color: var(--light-color);
    position: relative;
    overflow: hidden;
}

/* Data visualization background pattern */
.projects::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        linear-gradient(to right, rgba(var(--primary-color-rgb), 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--primary-color-rgb), 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.05;
    pointer-events: none;
}

/* Add data points pattern */
.projects::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: radial-gradient(circle at center, 
        rgba(var(--primary-color-rgb), 0.2) 1px, 
        transparent 1px);
    background-size: 20px 20px;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    z-index: 1;
    border-top: 3px solid var(--primary-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Data analytics style cards with chart-like elements */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background-image: 
        linear-gradient(45deg, transparent 50%, rgba(var(--primary-color-rgb), 0.1) 50%);
    z-index: -1;
}

.project-image {
    height: 150px;
    background: var(--gradient-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Add data visualization pattern to project images */
.project-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(0deg, transparent 0%, transparent 90%, rgba(255, 255, 255, 0.1) 90%, rgba(255, 255, 255, 0.1) 100%),
        linear-gradient(90deg, transparent 0%, transparent 90%, rgba(255, 255, 255, 0.1) 90%, rgba(255, 255, 255, 0.1) 100%);
    background-size: 20px 20px;
    opacity: 0.3;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 30% 20%, rgba(52, 152, 219, 0.4) 0%, transparent 50px),
        radial-gradient(circle at 70% 80%, rgba(26, 188, 156, 0.4) 0%, transparent 50px);
}

.project-image i {
    font-size: 4rem;
    color: white;
    transition: all 0.5s ease;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.project-card:hover .project-image i {
    transform: scale(1.1) rotate(5deg);
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
}

.project-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 25px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
    min-height: 80px; /* Ensure consistent height for project descriptions */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.project-tags span {
    background: rgba(var(--primary-color-rgb), 0.1);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
    border-left: 2px solid var(--primary-color);
}

[data-theme="dark"] .project-tags span {
    background-color: rgba(var(--primary-color-rgb), 0.2);
}

.project-tags span:hover {
    background: rgba(var(--primary-color-rgb), 0.2);
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    gap: 20px;
    margin-top: auto;
    padding-top: 10px;
}

.project-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--accent-color);
}

.project-link i {
    margin-left: 5px;
    transition: var(--transition);
}

.project-link:hover i {
    transform: translateX(5px);
}

.recent-project {
    border-top-color: var(--accent-color);
}

.recent-project .project-image {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color) 58%, var(--accent-color));
}

.live-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;
    color: #fff;
    background: rgba(24, 31, 64, 0.42);
    backdrop-filter: blur(5px);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.live-badge i {
    margin-right: 5px;
    font-size: 0.48rem;
    color: #80ffdb;
    text-shadow: 0 0 8px #80ffdb;
}

.live-link {
    padding: 9px 14px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 6px;
    background: rgba(var(--primary-color-rgb), 0.08);
}

.live-link:hover,
.live-link:focus-visible {
    color: #fff;
    background: var(--primary-color);
}

/* Playful data companion */
.data-companion {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.companion-button {
    position: relative;
    width: 62px;
    height: 62px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    background: var(--gradient-primary);
    box-shadow: 0 10px 30px rgba(var(--primary-color-rgb), 0.35);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.companion-button:hover,
.companion-button:focus-visible {
    transform: translateY(-4px) rotate(-3deg);
    box-shadow: 0 14px 34px rgba(var(--primary-color-rgb), 0.45);
    outline: 3px solid rgba(var(--primary-color-rgb), 0.25);
    outline-offset: 3px;
}

.robot-antenna {
    position: absolute;
    left: 29px;
    top: -10px;
    width: 3px;
    height: 12px;
    background: var(--primary-color);
}

.robot-antenna::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent-color);
    box-shadow: 0 0 9px var(--accent-color);
}

.robot-face {
    position: absolute;
    inset: 13px 9px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
}

.robot-eye {
    position: absolute;
    top: 12px;
    width: 7px;
    height: 9px;
    border-radius: 50%;
    background: var(--secondary-color);
}

.robot-eye:first-child { left: 10px; }
.robot-eye:nth-child(2) { right: 10px; }

.robot-smile {
    position: absolute;
    left: 14px;
    bottom: 8px;
    width: 16px;
    height: 7px;
    border-bottom: 3px solid var(--primary-color);
    border-radius: 0 0 50% 50%;
}

.companion-bubble {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: max-content;
    max-width: min(220px, calc(100vw - 40px));
    padding: 9px 12px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: 10px 10px 2px 10px;
    color: var(--text-color);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.data-companion.is-chatting .companion-bubble {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.party-trigger {
    width: 100%;
    min-height: 36px;
    margin-top: 7px;
    padding: 6px 9px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 6px;
    color: #fff;
    background: var(--gradient-primary);
    font: 600 0.72rem 'Poppins', sans-serif;
    cursor: pointer;
}

.party-trigger:hover,
.party-trigger:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.data-companion.is-chatting .companion-button {
    animation: robotWiggle 0.55s ease;
}

.data-companion.is-near-contact {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
}

/* Single-entry timelines use the full content axis instead of an empty two-sided rail. */
.experience .timeline,
.education .timeline {
    max-width: 720px;
}

.experience .timeline::after,
.education .timeline::after {
    left: 0;
    transform: none;
}

.experience .timeline-item,
.education .timeline-item,
.experience .timeline-item:nth-child(even),
.education .timeline-item:nth-child(even) {
    left: 0;
    width: 100%;
    padding: 0 0 0 28px;
}

.experience .timeline-item:nth-child(odd) .timeline-dot,
.experience .timeline-item:nth-child(even) .timeline-dot,
.education .timeline-item:nth-child(odd) .timeline-dot,
.education .timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
    right: auto;
}

@media (min-width: 1101px) {
    .projects .project-card:last-child:nth-child(odd) {
        grid-column: 2;
    }
}

.sparkle {
    position: absolute;
    color: var(--accent-color);
    opacity: 0;
    pointer-events: none;
}

.sparkle-one { top: -8px; right: -8px; }
.sparkle-two { top: 8px; left: -12px; }
.sparkle-three { right: -12px; bottom: 2px; }

.data-companion.is-chatting .sparkle {
    animation: sparklePop 0.7s ease both;
}

.data-companion.is-chatting .sparkle-two { animation-delay: 0.1s; }
.data-companion.is-chatting .sparkle-three { animation-delay: 0.2s; }

@keyframes robotWiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-8deg) translateY(-3px); }
    55% { transform: rotate(8deg) translateY(-5px); }
    75% { transform: rotate(-4deg); }
}

@keyframes sparklePop {
    0% { opacity: 0; transform: scale(0.3) rotate(0); }
    45% { opacity: 1; transform: scale(1.25) rotate(45deg); }
    100% { opacity: 0; transform: scale(0.7) translateY(-9px) rotate(90deg); }
}

.data-party-layer {
    position: fixed;
    inset: 0;
    z-index: 890;
    overflow: hidden;
    pointer-events: none;
}

.data-particle {
    position: absolute;
    left: var(--party-x);
    top: var(--party-y);
    color: var(--particle-color);
    font-size: var(--particle-size);
    font-weight: 700;
    opacity: 0;
    text-shadow: 0 0 8px currentColor;
    animation: dataParticleBurst 1.35s ease-out var(--particle-delay) forwards;
}

@keyframes dataParticleBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
    }
    18% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(
            calc(-50% + var(--particle-dx)),
            calc(-50% + var(--particle-dy))
        ) scale(1.15) rotate(var(--particle-rotation));
    }
}

/* Dashboard Card Specific Styles */
.dashboard-card {
    position: relative;
    overflow: visible; /* Allow dashboard to expand outside card boundaries */
}

.dashboard-card .project-image {
    background: var(--gradient-accent); /* Use accent gradient for dashboard */
}

.dashboard-container {
    margin-top: 25px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    border: 2px solid rgba(var(--primary-color-rgb), 0.2);
}

.dashboard-container:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Dark mode adjustments for dashboard */
[data-theme="dark"] .dashboard-container {
    border-color: rgba(var(--primary-color-rgb), 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .dashboard-container:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Tableau responsive adjustments */
.tableauPlaceholder {
    width: 100% !important;
}

.tableauViz {
    width: 100% !important;
}

/* Dashboard toggle button enhancement */
.toggle-dashboard {
    position: relative;
    padding: 8px 16px;
    border-radius: 25px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

.toggle-dashboard:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.3);
}

/* Mobile responsiveness for dashboard */
@media (max-width: 768px) {
    .dashboard-container {
        margin: 15px -15px 0 -15px; /* Extend to card edges on mobile */
        border-radius: 10px;
    }
    
    .tableauPlaceholder {
        min-height: 400px;
    }
}

/* Dashboard Modal Styles */
.dashboard-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.dashboard-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 15px;
    width: 95%;
    height: 95%;
    max-width: 1400px;
    max-height: 900px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.4s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--gradient-primary);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
    background: var(--background-color);
}

#modalDashboard {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: var(--background-color);
}

#modalDashboard .tableauPlaceholder {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
}

#modalDashboard .tableauViz {
    width: 100% !important;
    height: 100% !important;
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 98%;
        height: 98%;
        margin: 1%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}

/* Dashboards Section */
.dashboards {
    padding: 100px 0;
    background: var(--background-color);
    position: relative;
}

.dashboards::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(var(--primary-color-rgb), 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(var(--accent-color), 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.dashboards .container {
    position: relative;
    z-index: 1;
}

.dashboards .section-title {
    margin-bottom: 60px;
}

/* Dashboard specific project cards styling */
.dashboards .project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    border-top: 4px solid var(--accent-color);
}

.dashboards .project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dashboards .project-image {
    background: var(--gradient-accent);
    height: 160px;
}

.dashboards .project-image i {
    font-size: 4.5rem;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

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

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

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

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--accent-color);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

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

.timeline-content {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

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

.experience-role {
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 5px;
    margin-bottom: 10px;
}

.experience-list {
    list-style: disc;
    margin-left: 20px;
    margin-top: 10px;
}

.experience-list li {
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

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

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

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

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.contact-item p {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.social-link:hover {
    transform: translateY(-5px);
    background: var(--accent-color);
}

.contact-form {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

/* Form status messages */
.form-status {
    margin-bottom: 15px;
}

.form-success, 
.form-error {
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-top: 10px;
    display: none;
}

.form-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-left: 3px solid #2ecc71;
}

.form-error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-left: 3px solid #e74c3c;
}

[data-theme="dark"] .form-success {
    background-color: rgba(46, 204, 113, 0.2);
}

[data-theme="dark"] .form-error {
    background-color: rgba(231, 76, 60, 0.2);
}

/* Button loading state */
.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: inline-block;
}

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

/* Footer */
.footer {
    background-color: var(--bg-color);
    color: var(--text-color);
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color, rgba(0,0,0,0.1));
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-social .social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color); /* Changed from 'white' to use CSS variable */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.footer-social .social-link:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
    color: var(--text-color); /* Ensure hover state also uses theme color */
}

.footer-email {
    font-size: 0.9rem;
    opacity: 0.8;
    color: var(--text-color); /* Added explicit color for email */
}

/* Interactive data studio */
.hero-data-field {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.34;
}

.recruiter-btn {
    border: 1px solid rgba(var(--primary-color-rgb), 0.38);
    color: var(--text-color);
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

.recruiter-btn:hover,
.recruiter-btn:focus-visible {
    color: #fff;
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.project-filter-bar {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 9px;
    max-width: 100%;
    margin: -1.3rem 0 12px;
    padding: 4px 1px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.project-filter {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.25);
    border-radius: 7px;
    color: var(--text-color);
    background: var(--card-bg);
    font: 600 0.82rem 'Poppins', sans-serif;
    cursor: pointer;
    touch-action: manipulation;
}

.project-filter:hover,
.project-filter:focus-visible,
.project-filter.is-active {
    color: #fff;
    border-color: var(--primary-color);
    background: var(--primary-color);
    outline: none;
}

.filter-results {
    min-height: 1.5em;
    margin-bottom: 18px;
    color: var(--text-light);
    font-size: 0.82rem;
}

.project-card.is-filtered {
    display: none !important;
}

.quick-preview {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 6px;
    color: var(--primary-color);
    background: transparent;
    font: 600 0.84rem 'Poppins', sans-serif;
    cursor: pointer;
}

.quick-preview:hover,
.quick-preview:focus-visible {
    color: #fff;
    background: var(--primary-color);
    outline: none;
}

.studio-dialog {
    position: fixed;
    inset: 0;
    width: min(680px, calc(100% - 36px));
    max-height: min(86dvh, 820px);
    padding: 30px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.35);
    border-radius: 14px;
    color: var(--text-color);
    background: var(--card-bg);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    overflow: auto;
    margin: auto;
}

.studio-dialog::backdrop {
    background: rgba(5, 8, 22, 0.76);
    backdrop-filter: blur(5px);
}

.dialog-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--text-color);
    background: rgba(var(--primary-color-rgb), 0.12);
    cursor: pointer;
}

.dialog-close:focus-visible {
    outline: 3px solid var(--accent-color);
}

.dialog-kicker,
.assistant-kicker {
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.studio-dialog h2 {
    margin: 5px 44px 12px 0;
    line-height: 1.22;
}

.preview-visual {
    height: 178px;
    margin: 28px 0 22px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.25);
    border-radius: 10px;
    background:
        linear-gradient(90deg, transparent 49%, rgba(var(--primary-color-rgb), 0.1) 50%, transparent 51%) 0 0 / 30px 30px,
        linear-gradient(transparent 49%, rgba(var(--primary-color-rgb), 0.1) 50%, transparent 51%) 0 0 / 30px 30px,
        var(--gradient-primary);
    overflow: hidden;
}

.preview-visual::before {
    content: var(--preview-symbol, '◫  01  ▥');
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.9);
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: .12em;
}

.preview-tags,
.preview-links,
.recruiter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.preview-tags span {
    padding: 5px 9px;
    border-left: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), .1);
    font-size: .78rem;
}

.preview-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border-radius: 6px;
    color: #fff;
    background: var(--primary-color);
    font-weight: 600;
}

.recruiter-dialog {
    width: min(900px, calc(100% - 36px));
}

.recruiter-summary {
    max-width: 68ch;
    color: var(--text-light);
    font-size: 1.05rem;
}

.recruiter-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.recruiter-columns section {
    padding: 18px;
    border-top: 3px solid var(--primary-color);
    background: rgba(var(--primary-color-rgb), .06);
}

.recruiter-columns h3 {
    margin-bottom: 8px;
}

.recruiter-columns p {
    color: var(--text-light);
    font-size: .9rem;
}

.recruiter-print {
    color: #fff;
    background: var(--secondary-color);
}

.assistant-shell {
    position: fixed;
    left: 20px;
    bottom: 22px;
    z-index: 920;
    transition: opacity .2s ease, visibility .2s ease;
}

.assistant-shell.is-near-contact {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.assistant-launcher {
    width: 56px;
    height: 56px;
    border: 2px solid rgba(255,255,255,.7);
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 10px 28px rgba(var(--primary-color-rgb), .32);
    cursor: pointer;
}

.assistant-launcher:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.assistant-panel {
    position: absolute;
    left: 0;
    bottom: 68px;
    width: min(360px, calc(100vw - 38px));
    max-height: min(620px, calc(100dvh - 110px));
    border: 1px solid rgba(var(--primary-color-rgb), .35);
    border-radius: 14px;
    display: grid;
    grid-template-rows: auto minmax(150px, 1fr) auto auto;
    color: var(--text-color);
    background-color: var(--card-bg);
    box-shadow: 0 22px 65px rgba(0,0,0,.4);
    overflow: hidden;
    isolation: isolate;
}

.assistant-panel[hidden] {
    display: none;
}

.assistant-panel header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(var(--primary-color-rgb), .16);
}

.assistant-panel h2 {
    font-size: 1.2rem;
}

.icon-button {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--text-color);
    background: rgba(var(--primary-color-rgb), .1);
    cursor: pointer;
}

.assistant-messages {
    min-height: 0;
    height: 210px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.assistant-message {
    width: fit-content;
    max-width: 88%;
    margin-bottom: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: .82rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: normal;
}

.assistant-message.bot {
    background: rgba(var(--primary-color-rgb), .1);
}

.assistant-message.user {
    margin-left: auto;
    color: #fff;
    background: var(--primary-color);
}

.assistant-suggestions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 14px 12px;
}

.assistant-suggestions button {
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid rgba(var(--primary-color-rgb), .25);
    border-radius: 6px;
    color: var(--primary-color);
    background: transparent;
    font: 500 .7rem 'Poppins', sans-serif;
    cursor: pointer;
    white-space: normal;
    line-height: 1.3;
}

.assistant-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 6px;
    padding: 12px;
    border-top: 1px solid rgba(var(--primary-color-rgb), .16);
}

.assistant-form input {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(var(--primary-color-rgb), .3);
    border-radius: 7px;
    color: var(--text-color);
    background: var(--background-color);
    font: 16px 'Poppins', sans-serif;
}

.assistant-form button {
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: var(--primary-color);
    cursor: pointer;
}

.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;
}

.cursor-dot {
    position: fixed;
    z-index: 9998;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--trail-color);
    pointer-events: none;
    opacity: .7;
    transform: translate(-50%, -50%);
    animation: cursorDotFade .55s ease-out forwards;
}

@keyframes cursorDotFade {
    to { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
}

@media (max-width: 768px) {
    .recruiter-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .studio-dialog {
        padding: 22px 18px;
        margin: auto;
    }

    .project-filter {
        min-height: 44px;
    }

    .assistant-shell {
        left: 14px;
        bottom: 14px;
    }

    .assistant-panel {
        width: calc(100vw - 38px);
        max-width: calc(100vw - 38px);
        max-height: min(650px, calc(100dvh - 100px));
    }
}

@media print {
    body.recruiter-printing > *:not(#recruiterDialog) {
        display: none !important;
    }

    body.recruiter-printing #recruiterDialog {
        position: static;
        width: 100%;
        max-height: none;
        display: block;
        border: 0;
        box-shadow: none;
        color: #111;
        background: #fff;
    }

    body.recruiter-printing .dialog-close,
    body.recruiter-printing .recruiter-print {
        display: none !important;
    }
}

/* Keep entrance motion on the vertical axis so off-screen AOS states never widen the page. */
[data-aos="fade-left"],
[data-aos="fade-right"] {
    transform: translate3d(0, 20px, 0) !important;
}

[data-aos="fade-left"].aos-animate,
[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0) !important;
}

[data-aos] {
    transform: none !important;
}

/* Responsive composition: one navigation breakpoint and one phone breakpoint */
@media (max-width: 1100px) {
    .navbar .container {
        min-height: 70px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .theme-toggle {
        margin-right: 2px;
        margin-left: auto;
    }

    .theme-toggle button,
    .sound-toggle button,
    .hamburger {
        min-width: 44px;
        min-height: 44px;
    }

    .sound-toggle {
        margin-right: 2px;
    }

    .sound-status {
        position: fixed;
        top: auto;
        right: 50%;
        bottom: 18px;
        z-index: 1100;
        max-width: calc(100vw - 120px);
        text-align: center;
        transform: translate(50%, 8px);
    }

    .sound-status.is-announcing {
        transform: translate(50%, 0);
    }

    .hamburger {
        display: grid;
        align-content: center;
        margin-left: 4px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        max-height: calc(100dvh - 70px);
        overflow-y: auto;
        flex-direction: column;
        gap: 4px;
        padding: 18px 20px 24px;
        color: var(--text-color);
        background: var(--card-bg);
        box-shadow: var(--shadow);
        text-align: center;
        transition: left 0.25s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        display: block;
        min-height: 44px;
        padding: 10px 6px;
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 78px;
    }

    section {
        padding: 56px 0;
        width: 100%;
        max-width: 100%;
    }

    .dashboards {
        padding: 56px 0;
    }

    .container,
    .navbar .container {
        width: calc(100% - 38px);
        max-width: 1200px;
        padding-left: 0;
        padding-right: 0;
    }

    .navbar .container {
        min-height: 70px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .nav-links {
        top: 70px;
        max-height: calc(100dvh - 70px);
        overflow-y: auto;
        background-color: var(--card-bg);
        color: var(--text-color);
        box-shadow: var(--shadow);
        padding: 18px 19px 24px;
        gap: 4px;
    }

    .nav-links a {
        display: block;
        min-height: 44px;
        padding: 10px 6px;
    }

    .hero {
        padding-top: 112px;
        padding-bottom: 60px;
    }

    .hero .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 34px;
        text-align: left;
    }

    .section-title {
        left: auto;
        display: block;
        width: fit-content;
        max-width: calc(100% - 48px);
        margin-left: auto;
        margin-right: auto;
        transform: none;
        overflow-wrap: anywhere;
    }

    .section-title::before {
        left: -22px;
    }

    .section-title::after {
        right: -22px;
    }

    .hero-content,
    .hero-image,
    .about-text,
    .project-card,
    .project-content,
    .skill-category,
    .contact-info,
    .contact-form {
        min-width: 0;
        width: 100%;
    }

    .hero-content h1,
    .hero-content h2,
    .hero-content p {
        overflow-wrap: anywhere;
    }

    .hero-content h2 {
        font-size: clamp(1.18rem, 5vw, 1.5rem);
        min-height: 3.2em;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 9vw, 2.5rem);
    }

    .hero-content p {
        max-width: 40rem;
        font-size: 1rem;
    }

    #typing-text {
        white-space: normal;
    }

    .hero-buttons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hero-image {
        justify-content: center;
        align-self: center;
    }

    .profile-img {
        width: min(230px, 72vw);
        height: min(230px, 72vw);
    }

    .about-content,
    .about-text,
    .experience-list,
    .project-content,
    .contact-content,
    .contact-item,
    .form-group {
        text-align: left;
    }

    .about-highlights,
    .skills-container,
    .projects-grid,
    .contact-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .projects-grid {
        width: 100%;
        max-width: 100%;
    }

    .about-highlights {
        margin-top: 28px;
    }

    .highlight-item {
        text-align: left;
    }

    .skill-category h3 {
        font-size: 1.3rem;
    }

    .skill-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .skill-item {
        min-height: 86px;
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr);
        align-content: center;
        gap: 10px;
    }

    .skill-item span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .skill-level {
        display: none;
    }

    .project-content {
        padding: 21px 19px 23px;
    }

    .project-card,
    .timeline-content {
        max-width: 100%;
    }

    .project-content h3,
    .project-content p {
        overflow-wrap: anywhere;
    }

    .project-content p {
        min-height: 0;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .project-tags,
    .project-links {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .project-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        overflow-wrap: anywhere;
    }

    .dashboard-container {
        width: 100%;
        max-width: 100%;
        margin: 15px 0 0;
    }

    .dashboard-container > div {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        max-width: 100% !important;
    }

    .timeline-item {
        min-width: 0;
        width: 100%;
        left: 0 !important;
        padding-left: 58px;
        padding-right: 0;
    }

    .timeline::after {
        left: 20px;
        transform: none;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 11px;
        right: auto;
    }

    .timeline-content,
    .timeline-content h3,
    .timeline-content p,
    .experience-list li {
        overflow-wrap: anywhere;
    }

    .timeline-content {
        padding: 18px;
    }

    .contact-item {
        align-items: flex-start;
    }

    .contact-item > div {
        min-width: 0;
    }

    .contact-item p,
    .footer-email {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .contact-form {
        padding: 22px 19px;
    }

    .form-group input,
    .form-group textarea {
        max-width: 100%;
        font-size: 16px;
    }

    .data-companion {
        right: 14px;
        bottom: 14px;
    }

    .companion-button {
        width: 56px;
        height: 56px;
    }

    .robot-face {
        inset: 12px 8px 8px;
    }

    .robot-antenna {
        left: 26px;
    }

    /* Horizontal AOS transforms can be captured mid-transition on narrow screens. */
    [data-aos],
    [data-aos][class*="aos-animate"] {
        transform: none !important;
    }

    .projects:not(.show-all-mobile) .project-card:nth-child(n + 4),
    .dashboards:not(.show-all-mobile) .project-card:nth-child(n + 3) {
        display: none;
    }

    .mobile-show-more {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        width: 100%;
        min-height: 48px;
        margin-top: 22px;
        border: 1px solid rgba(var(--primary-color-rgb), 0.35);
        border-radius: 8px;
        color: var(--primary-color);
        background: var(--card-bg);
        box-shadow: var(--shadow);
        font: 600 0.9rem 'Poppins', sans-serif;
        cursor: pointer;
    }

    .mobile-show-more i {
        transition: transform 0.2s ease;
    }

    .mobile-show-more[aria-expanded="true"] i {
        transform: rotate(180deg);
    }
}

@media (min-width: 769px) {
    .mobile-show-more {
        display: none;
    }
}

@media (max-width: 380px) {
    .container,
    .navbar .container {
        width: calc(100% - 36px);
    }

    .hero-content h1 {
        font-size: 1.85rem;
    }

    .section-title {
        max-width: calc(100vw - 76px);
        font-size: 1.65rem;
    }

    .section-title::before {
        left: -21px;
    }

    .section-title::after {
        right: -21px;
    }

    .project-image {
        height: 132px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    section,
    .timeline-item,
    .project-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .data-particle {
        display: none !important;
    }

    .cursor-dot {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .projects.has-active-filter .project-card:not(.is-filtered) {
        display: flex !important;
    }

    .projects.has-active-filter .mobile-show-more {
        display: none;
    }
}
