/* ============================================
   MODERN INTERACTIVE PORTFOLIO - CSS
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-dark: #0f172a;
    --bg-medium: #1e293b;
    --bg-light: #334155;
    --text-light: #f1f5f9;
    --text-gray: #94a3b8;
    --success: #10b981;
    --gradient-1: #2563eb;
    --gradient-2: #8b5cf6;
    --gradient-3: #3b82f6;
    --gradient-4: #10b981;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.2);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--bg-dark);
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar.scrolled {
    padding: 0.5rem 2rem;
    background: rgba(15, 23, 42, 0.95);
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-light);
    display: inline-block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    justify-content: flex-end;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
    align-self: center;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* Print button styling */
.print-btn {
    background: var(--primary-color);
    padding: 0.5rem 1rem !important;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.print-btn::after {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    overflow: hidden;
    padding-top: 80px; /* Add padding to prevent navbar overlap */
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0.1;
}

.particles::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: transparent;
    animation: particleMove 20s linear infinite;
}

@keyframes particleMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-light);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--text-gray);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.typing-text::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.6s both;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.8s both;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.social-icon:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-gray);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-indicator span {
    width: 6px;
    height: 10px;
    background: var(--text-gray);
    border-radius: 3px;
    animation: scrollDown 2s infinite;
}

#robot-front-stage .scroll-indicator,
.robot-mode-active .scroll-indicator,
body:not(.classic-view-mode) .hero .scroll-indicator {
    display: none !important;
}

@keyframes scrollDown {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(15px); opacity: 0.5; }
}

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

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 6rem 2rem;
    position: relative;
}

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

.section-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-light);
    position: relative;
    display: inline-block;
    width: 100%;
}

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

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
    background: var(--bg-medium);
}

.about-content {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-card {
    position: relative;
}

.about-image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-image {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.about-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.about-image-container:hover .about-overlay {
    opacity: 1;
}

.about-image-container:hover .about-image {
    transform: scale(1.05);
}

.about-stats {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-light);
}

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

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

.about-intro {
    font-size: 1.2rem !important;
    color: var(--text-light) !important;
}

.about-highlights {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.highlight-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(10px);
}

.highlight-item svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

/* ============================================
   PROFESSIONAL EXPERIENCE - EXPANDABLE TILES
   ============================================ */

.experience-section {
    background: var(--bg-dark);
}

.experience-intro,
.experience-block {
    max-width: 100%;
    margin: 0 auto 3.5rem;
    text-align: left;
}

.experience-block:last-child {
    margin-bottom: 0;
}

.experience-intro h3,
.experience-block h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.experience-intro h4,
.experience-block h4 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-light);
    font-weight: 600;
}

.experience-intro p,
.experience-block p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.professional-projects-grid {
    width: 100%;
    max-width: 100%;
    margin: 1.75rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.professional-project-tile {
    background: var(--bg-medium);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.professional-project-tile:hover {
    border-color: rgba(59, 130, 246, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -4px rgba(37, 99, 235, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.professional-project-tile.expanded {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 16px 40px -6px rgba(15, 23, 42, 0.6), 0 0 0 1px rgba(59, 130, 246, 0.25);
    background: #172033;
}

.tile-header {
    padding: 1.5rem 1.75rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    background: transparent;
    user-select: none;
    transition: background 0.2s ease;
}

.tile-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.tile-header-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tile-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tile-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.tile-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tile-preview {
    color: var(--text-gray);
    font-size: 0.98rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.tile-tag {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.professional-project-tile:hover .tile-tag {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

.tile-expand-action {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.tile-expand-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.professional-project-tile:hover .tile-expand-label {
    color: #60a5fa;
}

.expand-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-project-tile:hover .expand-icon-wrapper {
    background: rgba(37, 99, 235, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: #ffffff;
    transform: scale(1.06);
}

.expand-chevron {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-project-tile.expanded .expand-chevron {
    transform: rotate(180deg);
}

.professional-project-tile.expanded .tile-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.professional-project-tile.expanded .tile-expand-label {
    color: #60a5fa;
}

.professional-project-tile.expanded .expand-icon-wrapper {
    background: rgba(37, 99, 235, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    color: #ffffff;
}

.tile-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.professional-project-tile.expanded .tile-content {
    max-height: 5000px;
}

.tile-content-inner {
    padding: 2rem 2rem 2.25rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.tile-content-inner p {
    margin-bottom: 1rem;
}

.tile-content-inner h4 {
    color: var(--primary-light);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.tile-content-inner ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.tile-content-inner li {
    margin-bottom: 0.5rem;
}

.tile-content-inner .video-container {
    margin: 1.5rem 0;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.tile-content-inner .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Embedded iframe container for Streamlit demos */
.tile-iframe-container {
    margin: 1.25rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-dark);
}
.tile-iframe-container iframe {
    display: block;
    width: 100%;
    height: 720px;
    border: 0;
}

/* Make iframe container visually dark and remove outer chrome */
.tile-iframe-container {
    padding: 0;
    border: 0 !important;
    box-shadow: none !important;
    background: var(--bg-dark);
}
.tile-iframe-container iframe {
    background: transparent !important;
}

/* Live demo link styled as a prominent button */
.tile-demo-link {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}
.tile-demo-link:hover {
    filter: brightness(0.95);
}
.youtube-carousel {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
}

.youtube-carousel-slide {
    display: none;
}

.youtube-carousel-slide.active {
    display: block;
}

.video-placeholder-card {
    min-height: 260px;
    border-radius: 10px;
    border: 2px dashed rgba(59,130,246,0.7);
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.video-slot-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
}

.video-slot-note {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.video-description-input {
    width: 100%;
    margin-top: 0.9rem;
    min-height: 90px;
    resize: vertical;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-light);
    padding: 0.8rem 0.9rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
}

.video-description-input::placeholder {
    color: var(--text-gray);
}

.video-description-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.video-description-text {
    margin-top: 0.9rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
}

.youtube-carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.youtube-carousel-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.youtube-carousel-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.youtube-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.youtube-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
}

.youtube-dot.active,
.youtube-dot:hover {
    background: var(--primary-light);
}

.tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(37, 99, 235, 0.2);
    color: var(--primary-light);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--primary-color);
}

.video-preview {
    margin: 1.5rem 0;
}

.video-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px dashed var(--primary-color);
}

.video-thumbnail:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.video-thumbnail svg {
    color: var(--primary-color);
}

/* ============================================
   LEADERSHIP SECTION
   ============================================ */

.leadership-section {
    background: var(--bg-medium);
}

.leadership-content {
    margin-bottom: 2rem;
}

.leadership-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.leadership-content p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Army Cadets Split Layout */
.cadets-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3.5rem;
}

.cadets-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cadets-image-container {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cadets-image {
    width: 100%;
    height: auto;
    max-height: 440px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

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

.stat-box {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.stat-box:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-light);
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Slideshow */
.slideshow-container {
    position: relative;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    margin: 3rem auto;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    box-shadow: var(--shadow-lg);
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.slide.active {
    display: block;
}

/* Navigation arrows */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 0;
    height: 100%;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.next {
    right: 0;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Dots */
.dot-container {
    text-align: center;
    padding: 20px;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: rgba(255,255,255,0.9);
}

/* Fade animation */
.fade {
    animation-name: fade;
    animation-duration: 1s;
}

@keyframes fade {
    from {opacity: 0.4}
    to {opacity: 1}
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects-section {
    background: var(--bg-dark);
}

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

.project-card {
    background: var(--bg-medium);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.project-card.expandable-card {
    cursor: default;
    grid-column: span 1;
}

.project-card.expandable-card .project-image,
.project-card.expandable-card .project-info {
    cursor: pointer;
}

.project-card.expandable-card.expanded {
    grid-column: 1 / -1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.project-card.expanded:hover {
    transform: none;
}

.project-image {
    height: 220px;
    overflow: hidden;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: height 0.4s ease;
}

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

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

/* Expanded Card - Full Image & Carousel Styling */
.project-card.expanded .project-image {
    height: clamp(380px, 48vw, 580px);
    background: #080d18;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card.expanded .project-image img {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
    border-radius: 10px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
}

/* Multi-image Project Carousel */
.project-carousel {
    position: relative;
    width: 100%;
}

.project-slide {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.project-slide.active {
    display: flex;
}

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

.project-card.expanded .project-slide img {
    object-fit: contain !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
    border-radius: 10px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
}

.project-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10;
    backdrop-filter: blur(8px);
}

.project-carousel-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.project-carousel-btn.prev {
    left: 1.25rem;
}

.project-carousel-btn.next {
    right: 1.25rem;
}

.project-carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    backdrop-filter: blur(6px);
}

.project-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: var(--transition);
}

.project-dot.active,
.project-dot:hover {
    background: var(--primary-light);
    transform: scale(1.2);
}

/* Hide carousel controls when collapsed */
.project-card:not(.expanded) .project-carousel-btn,
.project-card:not(.expanded) .project-carousel-dots {
    display: none;
}

.project-expanded-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.project-card.expanded .project-expanded-content {
    max-height: 5000px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.project-expanded-inner {
    padding: 2rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.project-expanded-inner p {
    margin-bottom: 1rem;
}

.project-expanded-inner ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.project-expanded-inner li {
    margin-bottom: 0.5rem;
}

.project-expanded-inner iframe {
    border-radius: 10px;
}

.project-expanded-inner a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-expanded-inner a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.project-info {
    padding: 1.5rem 2rem;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.project-info p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.tag {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-light);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================
   SKILLS SECTION
   ============================================ */

.skills-section {
    background: var(--bg-medium);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.skills-column h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--primary-light);
}

/* Skill List (Icon-based, no percentages) */
.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition);
}

.skill-item:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-item svg,
.skill-item .skill-icon {
    font-size: 1.5rem;
    color: var(--text-light);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.skill-item span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Skill Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 25px;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.skill-tag:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-section {
    background: var(--bg-dark);
    text-align: center;
}

.contact-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg-medium);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
}

.contact-card:hover {
    transform: translateY(-10px);
    background: var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.contact-card svg {
    color: var(--primary-light);
    transition: var(--transition);
}

.contact-card:hover svg {
    color: white;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-medium);
    padding: 2rem;
    text-align: center;
    color: var(--text-gray);
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--bg-medium);
    padding: 2rem;
    border-radius: 15px;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-color);
    transform: rotate(90deg);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
}

.lightbox-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 10;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: white;
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.4);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

[data-animate] {
    opacity: 0;
    transition: all 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
}

[data-animate="fade-up"].animated {
    animation: fadeInUp 0.6s ease forwards;
}

[data-animate="fade-right"].animated {
    animation: fadeInRight 0.6s ease forwards;
}

[data-animate="fade-left"].animated {
    animation: fadeInLeft 0.6s ease forwards;
}

[data-animate="zoom-in"].animated {
    animation: zoomIn 0.6s ease forwards;
}

[data-animate="slide-right"].animated {
    animation: slideInRight 0.6s ease forwards;
}

[data-animate="slide-left"].animated {
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

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

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text {
        order: 1;
    }
    
    .about-card {
        order: 2;
    }

    /* Cadets mobile layout - stack text above photo */
    .cadets-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cadets-text {
        order: 1;
    }

    .cadets-image-container {
        order: 2;
    }

    .professional-projects-grid {
        padding: 0;
    }

    .tile-header {
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tile-expand-action {
        width: 100%;
        justify-content: space-between;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .tile-title {
        font-size: 1.2rem;
    }

    .tile-content-inner {
        padding: 1.25rem 1.25rem 1.75rem;
    }

    .experience-intro h3 {
        font-size: 1.5rem;
    }

    .experience-intro h4 {
        font-size: 1.1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }
    
    .leadership-gallery.gallery-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding: 1rem 0;
        -webkit-overflow-scrolling: touch;
    }

    .leadership-gallery .gallery-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    .leadership-gallery .gallery-item img {
        width: 100%;
        height: auto;
    }
}

/* Always hide desktop gallery */
.desktop-gallery {
    display: none !important;
}

/* Always show mobile slideshow */
.mobile-slideshow {
    display: block !important;
}

/* Print header - hidden by default */
.print-header {
    display: none;
}

/* Print-only experience section - hidden by default */
.print-only-section,
.print-only-experience,
.print-only-stats,
.print-only-images {
    display: none;
}

/* Slideshow container */
.slideshow-container {
    max-width: 100%;
    position: relative;
    margin: auto;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
}

/* Hide the images by default */
.leadership-slide {
    display: none;
    position: relative;
}

.leadership-slide img {
    border-radius: 10px;
}

/* Number text (1/3 etc) */
.numbertext {
    color: #f2f2f2;
    background: rgba(0, 0, 0, 0.6);
    font-size: 12px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 10px 0 10px 0;
}

/* Next & previous buttons */
.prev-slide, .next-slide {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

/* Position the "next button" to the right */
.next-slide {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* On hover, add a darker background */
.prev-slide:hover, .next-slide:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* The dots/bullets/indicators */
.slideshow-dots {
    text-align: center;
    padding: 20px 0;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.dot.active, .dot:hover {
    background-color: var(--accent-color);
}

/* Fading animation */
.fade {
    animation-name: fade;
    animation-duration: 1s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

@media (max-width: 600px) {
    .section {
        padding: 4rem 1rem;
    }

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

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid:not(.leadership-gallery) {
        grid-template-columns: 1fr;
    }

    .video-placeholder-card {
        min-height: 210px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    /* Page setup */
    @page {
        size: A4;
        margin: 1.5cm;
    }

    /* Force color preservation */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Reset animations - make everything visible */
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    /* Show print header */
    .print-header {
        display: block !important;
        text-align: center;
        padding: 2rem 1.5rem;
        background: var(--primary-dark);
        color: white !important;
        margin-bottom: 2rem;
        border-radius: 12px;
    }

    .print-header h1 {
        font-size: 24pt;
        margin: 0 0 0.5rem 0;
        color: white !important;
        font-weight: bold;
    }

    .print-header h2 {
        font-size: 16pt;
        margin: 0 0 0.5rem 0;
        color: white !important;
        font-weight: 500;
        opacity: 0.95;
    }

    .print-header p {
        font-size: 10pt;
        margin: 0;
        color: white !important;
        opacity: 0.9;
    }

    /* Hide elements not needed in print */
    .navbar,
    .hero,
    .particles,
    .hero-buttons,
    .social-links,
    .nav-toggle,
    .prev,
    .next,
    .prev-slide,
    .next-slide,
    .dot-container,
    .slideshow-dots,
    .lightbox,
    .video-modal,
    footer,
    #contact,
    .slideshow-container,
    .gallery-grid,
    .desktop-gallery,
    .mobile-slideshow,
    .professional-projects-grid,
    .projects-grid .project-image,
    iframe {
        display: none !important;
    }

    /* Show about section image */
    .about-image-container,
    .about-image {
        display: block !important;
    }

    .about-image-container {
        max-width: 300px;
        margin: 0 auto;
    }

    .about-overlay {
        display: none !important;
    }

    /* Show print-only content */
    .print-only-experience,
    .print-only-stats {
        display: block !important;
    }

    /* Show and expand all project cards */
    .projects-grid {
        display: block !important;
        page-break-inside: avoid;
    }

    .project-card {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
        border: 1px solid black !important;
        background: white !important;
        box-shadow: none !important;
    }

    .project-info {
        display: block !important;
        padding: 1rem;
        border-bottom: 1px solid #ccc;
    }

    .project-info h3 {
        color: black !important;
        font-size: 14pt;
        margin-bottom: 0.5rem;
    }

    .project-info p {
        color: black !important;
        font-size: 10pt;
        margin-bottom: 0.5rem;
    }

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

    .project-tags .tag {
        background: #e5e7eb !important;
        color: black !important;
        padding: 0.3rem 0.6rem;
        border-radius: 4px;
        font-size: 9pt;
        border: 1px solid #9ca3af;
    }

    /* Force expand all project content */
    .project-expanded-content {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .project-expanded-inner {
        padding: 1rem;
        color: black !important;
        font-size: 10pt;
        line-height: 1.6;
    }

    .project-expanded-inner p,
    .project-expanded-inner li {
        color: black !important;
    }

    .project-expanded-inner strong {
        color: black !important;
    }

    .project-expanded-inner a {
        color: #1e40af !important;
        text-decoration: underline;
    }

    /* Hide animated stats, show print-only stats */
    .stats-grid {
        display: none !important;
    }

    .print-only-experience {
        margin-top: 2rem;
    }

    .print-only-experience h3 {
        font-size: 16pt;
        color: black !important;
        margin-bottom: 1rem;
        border-bottom: 2px solid black;
        padding-bottom: 0.5rem;
    }

    .print-exp-item {
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
        padding: 1rem;
        border: 1px solid black;
        background: white !important;
    }

    .print-exp-item h4 {
        font-size: 13pt;
        color: black !important;
        margin-bottom: 0.5rem;
    }

    .print-exp-item p {
        color: black !important;
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }

    .print-exp-item strong {
        color: black !important;
    }

    .print-only-stats {
        display: flex !important;
        flex-wrap: wrap;
        gap: 1rem;
        margin: 1rem 0;
        padding: 1rem;
        border: 1px solid black;
        background: white !important;
    }

    .print-stat-item {
        flex: 1;
        min-width: 150px;
        text-align: center;
        color: black !important;
        font-size: 11pt;
    }

    .print-stat-item strong {
        display: block;
        font-size: 18pt;
        color: black !important;
        margin-bottom: 0.2rem;
    }

    /* Body styling */
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        line-height: 1.7;
        color: #1e293b;
        background: #ffffff !important;
        padding: 0;
    }

    /* All sections with professional styling */
    .section {
        page-break-before: auto;
        page-break-after: auto;
        page-break-inside: auto;
        padding: 1.5rem;
        background: #ffffff !important;
        display: block !important;
        margin-bottom: 2rem;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
    }

    .section-title {
        font-size: 18pt;
        color: #2563eb !important;
        margin-bottom: 1.5rem;
        text-align: center;
        font-weight: bold;
        border-bottom: 3px solid #2563eb !important;
        padding-bottom: 0.5rem;
        background: none !important;
        -webkit-background-clip: initial !important;
        -webkit-text-fill-color: initial !important;
    }

    .section-title::after {
        display: none;
    }

    /* About section with better image handling */
    .about-content {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .about-text,
    .about-card {
        display: block !important;
        width: 100%;
    }

    .about-text p {
        margin-bottom: 1rem;
        color: #334155 !important;
        font-size: 10.5pt;
        line-height: 1.8;
    }

    .about-intro {
        font-size: 11.5pt !important;
        color: #1e293b !important;
    }

    .about-image-container,
    .about-image {
        display: block !important;
        max-width: 250px !important;
        margin: 1rem auto !important;
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    }

    .about-overlay {
        display: none !important;
    }

    .about-highlights {
        display: block !important;
        margin-top: 1rem;
    }

    .highlight-item {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
        background: #f8fafc !important;
        border-radius: 8px;
        border-left: 4px solid #2563eb !important;
        border: 1px solid #e2e8f0 !important;
        border-left: 4px solid #2563eb !important;
    }

    .highlight-item svg {
        color: #2563eb !important;
        flex-shrink: 0;
    }

    .highlight-item span {
        color: #1e293b !important;
        font-size: 10.5pt;
    }

    /* Professional Experience Section */
    .experience-intro h3 {
        font-size: 14pt;
        color: #1e40af !important;
        margin-bottom: 1rem;
        text-align: center;
    }

    .experience-intro p {
        color: #334155 !important;
        margin-bottom: 1rem;
        line-height: 1.8;
        font-size: 10.5pt;
    }

    .experience-intro p strong {
        color: #0f172a !important;
        font-weight: 600;
    }

    /* Show print-only experience section with professional styling */
    .print-only-experience {
        display: block !important;
        margin-top: 2rem;
    }

    .print-only-experience h3 {
        font-size: 16pt;
        color: #2563eb !important;
        margin-bottom: 1.5rem;
        text-align: center;
        border-bottom: 3px solid #2563eb;
        padding-bottom: 0.5rem;
    }

    .print-exp-item {
        page-break-inside: avoid;
        margin-bottom: 2rem;
        padding: 1.5rem;
        background: #ffffff !important;
        border-radius: 12px;
        border-left: 6px solid #ec4899 !important;
        border: 1px solid #e2e8f0 !important;
        border-left: 6px solid #ec4899 !important;
    }

    .print-exp-item h4 {
        font-size: 13pt;
        color: #ec4899 !important;
        margin-bottom: 1rem;
        text-align: center;
    }

    .print-exp-item p {
        color: #334155 !important;
        margin-bottom: 1rem;
        line-height: 1.8;
        font-size: 10.5pt;
    }

    .print-exp-item strong {
        color: #0f172a !important;
        font-weight: 600;
    }

    /* Leadership Section */
    .leadership-content h3 {
        font-size: 14pt;
        color: #1e40af !important;
        margin: 2rem 0 1rem 0;
        text-align: center;
    }

    .leadership-content p {
        color: #334155 !important;
        line-height: 1.8;
        margin-bottom: 1rem;
        font-size: 10.5pt;
    }

    .leadership-content strong {
        color: #0f172a !important;
        font-weight: 600;
    }

    .cadets-content {
        display: block !important;
    }

    .cadets-image-container {
        max-width: 460px;
        margin: 1.5rem auto;
    }

    /* Hide animated stats, show print-only stats */
    .stats-grid {
        display: none !important;
    }

    .stat-box {
        display: none !important;
    }

    .print-only-stats {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        margin: 2rem 0;
        padding: 1.5rem;
        background: #f8fafc !important;
        border-radius: 12px;
        border: 2px solid #2563eb !important;
    }

    .print-stat-item {
        flex: 1;
        min-width: 120px;
        max-width: 150px;
        text-align: center;
        padding: 1rem;
    }

    .print-stat-item strong {
        display: block;
        font-size: 18pt;
        color: #2563eb !important;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }

    .print-stat-item {
        color: #64748b !important;
        font-size: 9pt;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    /* Leadership Images for Print */
    .print-only-images {
        display: flex !important;
        flex-direction: column;
        gap: 1.5rem;
        margin: 2rem 0;
    }

    .print-image-item {
        page-break-inside: avoid;
    }

    .print-image-item img {
        width: 100%;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    }

    /* Projects Section - Professional Styling */
    .projects-grid {
        display: block !important;
        page-break-inside: avoid;
    }

    .project-card {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 2rem;
        padding: 1.5rem;
        background: #ffffff !important;
        border-radius: 12px;
        border-left: 6px solid #ec4899 !important;
        border: 1px solid #e2e8f0 !important;
        border-left: 6px solid #ec4899 !important;
        box-shadow: none !important;
    }

    .project-image {
        display: none !important;
    }

    .project-info {
        display: block !important;
        padding: 0 0 1rem 0;
        border-bottom: none;
    }

    .project-info h3 {
        color: #ec4899 !important;
        font-size: 13pt;
        margin-bottom: 0.75rem;
        text-align: center;
    }

    .project-info p {
        color: #334155 !important;
        font-size: 10pt;
        margin-bottom: 0.75rem;
        line-height: 1.8;
    }

    .project-tags {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin: 1rem 0;
        justify-content: center;
    }

    .project-tags .tag {
        background: var(--primary-color) !important;
        color: white !important;
        padding: 0.5rem 1rem;
        border-radius: 25px;
        font-size: 9pt;
        font-weight: 500;
        border: none !important;
    }

    /* Force expand all project content */
    .project-expanded-content {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .project-expanded-inner {
        padding: 1rem 0 0 0;
        color: #334155 !important;
        font-size: 10pt;
        line-height: 1.8;
    }

    .project-expanded-inner p,
    .project-expanded-inner li {
        color: #334155 !important;
        margin-bottom: 0.75rem;
    }

    .project-expanded-inner strong {
        color: #0f172a !important;
        font-weight: 600;
    }

    .project-expanded-inner a {
        color: #1e40af !important;
        text-decoration: underline;
    }

    .project-expanded-inner ul {
        margin-left: 1.5rem;
        margin-bottom: 1rem;
    }

    .project-expanded-inner li {
        margin-bottom: 0.5rem;
    }

    /* Skills Section - Professional Styling */
    .skills-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        margin-top: 1.5rem;
    }

    .skills-column h3 {
        color: #1e40af !important;
        font-size: 14pt;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .skill-list {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
    }

    .skill-item {
        display: flex !important;
        align-items: center;
        background: #f8fafc !important;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        font-size: 10pt;
        color: #1e293b !important;
        border-left: 4px solid #8b5cf6 !important;
        border: 1px solid #e2e8f0 !important;
        border-left: 4px solid #8b5cf6 !important;
    }

    .skill-item span {
        color: #1e293b !important;
    }

    .skill-item svg,
    .skill-item .skill-icon {
        display: none;
    }

    .skill-tags {
        display: flex !important;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .skill-tag {
        background: #f8fafc !important;
        padding: 0.75rem 1.25rem;
        border-radius: 8px;
        color: #1e293b !important;
        font-weight: 500;
        border-left: 4px solid #8b5cf6 !important;
        border: 1px solid #e2e8f0 !important;
        border-left: 4px solid #8b5cf6 !important;
        font-size: 10pt;
    }

    /* Hide elements not needed in print */
    .navbar,
    .hero,
    .particles,
    .hero-buttons,
    .social-links,
    .nav-toggle,
    .prev,
    .next,
    .prev-slide,
    .next-slide,
    .dot-container,
    .slideshow-dots,
    .lightbox,
    .video-modal,
    footer,
    #contact,
    .slideshow-container,
    .gallery-grid,
    .desktop-gallery,
    .mobile-slideshow,
    .professional-projects-grid,
    .professional-project-tile,
    .academic-project-tile,
    .expand-icon,
    .tile-preview,
    iframe,
    .video-container {
        display: none !important;
    }

    /* Hide video embeds */
    .project-expanded-inner iframe {
        display: none !important;
    }

    /* General text and heading styling */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    p {
        orphans: 3;
        widows: 3;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    /* Ensure proper spacing and page breaks */
    * {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Links - show URL for external links */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #64748b !important;
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after,
    a[href^="mailto:"]:after,
    a[href^="tel:"]:after {
        content: "";
    }
}

/* Print mode class (applied before printing) */
.print-mode .professional-project-tile,
.print-mode .expandable-card {
    max-height: none !important;
    overflow: visible !important;
}

.print-mode .professional-project-tile .tile-content,
.print-mode .expandable-card .project-expanded-content,
.print-mode .professional-project-tile.expanded .tile-content,
.print-mode .expandable-card.expanded .project-expanded-content {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.print-mode .professional-project-tile .tile-preview {
    display: none !important;
}

/* ============================================
   INDUSTRIAL ROBOT WORKCELL & TEACH PENDANT
   ============================================ */

/* 3D Workcell Viewport Layer */
#robot-app-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

#robot-canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: auto;
}

#robot-canvas-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    pointer-events: auto;
    touch-action: none;
}

/* Center Stage Workpiece (Held by Robot Gripper in Middle of Page) */
#robot-front-stage {
    position: fixed;
    top: 145px;
    left: 50%;
    transform-origin: 50% 100%;
    transform: translateX(-50%) translateY(180px) scale(0.22, 0.02);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    width: min(940px, 92vw);
    max-height: calc(100vh - 175px);
    background: rgba(10, 16, 30, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 2px solid #334155;
    border-top: 4px solid var(--accent-color, #f59e0b);
    border-bottom: 3px solid var(--accent-color, #f59e0b);
    border-radius: 16px;
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.88), 0 0 30px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow-y: auto;
    padding: 1.5rem 2.5rem 2.5rem;
    filter: blur(6px) brightness(1.4);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), filter 0.75s ease, visibility 0.85s;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color, #f59e0b) #1e293b;
}

#robot-front-stage.expanded:not(.docked-hidden) {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    transform-origin: 50% 100% !important;
    transform: translateX(-50%) translateY(0) scale(1, 1) !important;
    filter: blur(0px) brightness(1) !important;
    box-shadow: 0 40px 95px rgba(0, 0, 0, 0.92), 0 0 45px var(--accent-glow, rgba(245, 158, 11, 0.25)) !important;
}

#robot-front-stage.docked-hidden,
#robot-front-stage.transitioning {
    opacity: 0 !important;
    transform-origin: 50% 100% !important;
    transform: translateX(-50%) translateY(180px) scale(0.22, 0.02) !important;
    filter: blur(6px) brightness(1.4) !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transition: opacity 0.45s ease, transform 0.60s cubic-bezier(0.3, 0, 0.8, 0.15), filter 0.50s ease, visibility 0.60s !important;
}

/* Holographic Projection Beam (Connects Briefcase Mouth to Dossier Popup) */
.robot-stage-beam {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: min(840px, 86vw);
    height: 140px;
    background: linear-gradient(to top, var(--accent-glow, rgba(245, 158, 11, 0.45)) 0%, transparent 100%);
    clip-path: polygon(0% 0%, 100% 0%, 72% 100%, 28% 100%);
    pointer-events: none;
    z-index: 99;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), height 0.75s ease;
}

.robot-stage-beam.expanded:not(.docked-hidden) {
    opacity: 0.9;
    height: 220px;
}

.robot-stage-beam.docked-hidden {
    opacity: 0 !important;
}

#robot-front-stage.minimized-dock ~ .robot-stage-beam,
body.classic-view-mode .robot-stage-beam {
    display: none !important;
}

#robot-front-stage.minimized-dock {
    top: auto !important;
    bottom: 22px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(650px, 92vw) !important;
    max-height: 56px !important;
    height: 56px !important;
    padding: 0 1.2rem !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: rgba(15, 23, 42, 0.96) !important;
    border: 2px solid #f59e0b !important;
    border-radius: 28px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(245, 158, 11, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 100 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    filter: none !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

#robot-front-stage.minimized-dock:hover {
    background: rgba(30, 41, 59, 0.98) !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(245, 158, 11, 0.5) !important;
    transform: translateX(-50%) translateY(-2px) !important;
}

#robot-front-stage.minimized-dock .gripper-dock-bracket {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    position: static !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

#robot-front-stage.minimized-dock .gripper-mount-fixture {
    display: none !important;
}

#robot-front-stage.minimized-dock .stage-dock-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

#robot-front-stage.minimized-dock .stage-dock-title {
    cursor: pointer !important;
    pointer-events: auto !important;
}

#robot-front-stage.minimized-dock .stage-dock-meta {
    cursor: pointer !important;
    pointer-events: auto !important;
}

#robot-front-stage.minimized-dock .section,
#robot-front-stage.minimized-dock .hero {
    display: none !important;
}

.dock-inspect-btn {
    background: #1e293b;
    border: 1px solid #475569;
    color: #cbd5e1;
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: monospace;
    margin-left: 0.6rem;
}

.dock-inspect-btn:hover {
    background: #f59e0b;
    color: #0f172a;
    border-color: #f59e0b;
}

#robot-front-stage::-webkit-scrollbar {
    width: 8px;
}
#robot-front-stage::-webkit-scrollbar-track {
    background: #0f172a;
}
#robot-front-stage::-webkit-scrollbar-thumb {
    background: #f59e0b;
    border-radius: 4px;
}

/* Mechanical Clamp Bracket at Top of Card */
.gripper-dock-bracket {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: -1.5rem -2.5rem 1.5rem -2.5rem;
    background: #0f172a;
    border-bottom: 2px solid #334155;
    padding: 0.6rem 1.5rem 0.8rem;
    position: sticky;
    top: -1.5rem;
    z-index: 10;
}

.gripper-mount-fixture {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.clamp-handle-bar {
    width: 140px;
    height: 12px;
    background: linear-gradient(180deg, #f8fafc, #94a3b8, #475569);
    border: 1px solid #64748b;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.8);
}

.clamp-bolt {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid #334155;
}

/* Workcell Top Dock Status Header */
.stage-dock-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-family: monospace;
    font-size: 0.82rem;
    color: #94a3b8;
}

.stage-dock-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f59e0b;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.stage-dock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
}

/* Proper Topic Card Rendering inside robot-front-stage */
#robot-front-stage .section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#robot-front-stage .container {
    max-width: 100% !important;
    padding: 0.5rem 2.5rem 2.5rem !important;
}

#robot-front-stage .section-title {
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

/* Ensure all content blocks inside front stage have generous breathing room */
#robot-front-stage .leadership-content,
#robot-front-stage .experience-block,
#robot-front-stage .about-content,
#robot-front-stage .projects-grid,
#robot-front-stage .contact-content {
    padding: 0 0.5rem;
}

/* Section visibility rules for Robot Mode */
body:not(.classic-view-mode) .section:not(.robot-mode-active),
body:not(.classic-view-mode) .hero:not(.robot-mode-active) {
    display: none !important;
}

body:not(.classic-view-mode) .section.robot-mode-active,
body:not(.classic-view-mode) .hero.robot-mode-active {
    display: block !important;
    padding: 0 !important;
    background: transparent !important;
    animation: stageFadeIn 0.4s ease-out;
}

body:not(.classic-view-mode) #robot-front-stage .hero.robot-mode-active {
    min-height: auto !important;
    padding: 1.5rem 2.5rem !important;
}

body:not(.classic-view-mode) #robot-front-stage .hero.robot-mode-active .hero-content {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

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

/* Classic view mode fallback */
body.classic-view-mode #robot-app-container,
body.classic-view-mode #teach-pendant,
body.classic-view-mode .robot-stage-beam,
body.classic-view-mode .gripper-dock-bracket,
body.classic-view-mode .stage-dock-header {
    display: none !important;
}

body.classic-view-mode #robot-front-stage,
body.classic-view-mode #robot-front-stage.docked-hidden,
body.classic-view-mode #robot-front-stage.transitioning,
body.classic-view-mode #robot-front-stage.expanded,
body.classic-view-mode #robot-front-stage.minimized-dock {
    position: static !important;
    top: auto !important;
    left: auto !important;
    max-height: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    transform: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: none !important;
}

body.classic-view-mode .section,
body.classic-view-mode .hero {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
}

body.classic-view-mode #robot-front-stage .section {
    padding: 6rem 2rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.classic-view-mode #robot-front-stage .container {
    max-width: 1360px !important;
    padding: 0 2rem !important;
}

body.classic-view-mode #robot-front-stage .hero {
    min-height: 100vh !important;
    padding: 8rem 2rem 4rem !important;
}

/* Mode Switch Button in Navbar */
.view-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #1e293b;
    border: 1px solid #f59e0b;
    color: #f59e0b;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.8rem;
}

.view-mode-toggle:hover {
    background: #f59e0b;
    color: #0f172a;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* ============================================
   INDUSTRIAL ROBOT TEACH PENDANT CONTROLLER
   ============================================ */

.teach-pendant {
    position: fixed;
    bottom: 20px;
    left: 25px;
    right: auto;
    width: 325px;
    background: #18181b; /* Matte industrial graphite */
    border: 3px solid #f59e0b; /* Yellow shock bumper */
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10000;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s ease;
    user-select: none;
}

.teach-pendant.minimized {
    height: 48px;
    border-radius: 12px;
}

.teach-pendant.minimized .tp-body {
    display: none;
}

/* Top Grip & Bezel */
.tp-header {
    background: #27272a;
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #3f3f46;
    cursor: default;
}

.tp-title {
    display: flex;
    flex-direction: column;
}

.tp-brand {
    font-size: 0.8rem;
    font-weight: 900;
    color: #f59e0b;
    letter-spacing: 0.05em;
}

.tp-subtitle {
    font-size: 0.65rem;
    color: #a1a1aa;
    font-weight: 600;
}

.tp-minimize-btn {
    background: #3f3f46;
    border: none;
    color: #f4f4f5;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tp-minimize-btn:hover {
    background: #f59e0b;
    color: #18181b;
}

/* Body Container */
.tp-body {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: #18181b;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.tp-body::-webkit-scrollbar {
    width: 4px;
}

.tp-body::-webkit-scrollbar-thumb {
    background: #f59e0b;
    border-radius: 4px;
}

/* LED Status Bar */
.tp-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #09090b;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #27272a;
}

.tp-led {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: bold;
    color: #71717a;
    transition: color 0.2s;
}

.led-pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3f3f46;
    transition: all 0.2s;
}

.tp-led-run.active {
    color: #4ade80;
}
.tp-led-run.active .led-pip {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.tp-led-jog.active {
    color: #facc15;
}
.tp-led-jog.active .led-pip {
    background: #eab308;
    box-shadow: 0 0 8px #eab308;
}

.tp-led-estop.active {
    color: #ef4444;
}
.tp-led-estop.active .led-pip {
    background: #dc2626;
    box-shadow: 0 0 8px #dc2626;
    animation: estopBlink 0.6s infinite alternate;
}

.tp-led-limit.active {
    color: #f97316;
}
.tp-led-limit.active .led-pip {
    background: #ea580c;
    box-shadow: 0 0 10px #ea580c;
    animation: estopBlink 0.5s infinite alternate;
}

@keyframes estopBlink {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

/* Industrial Green LCD Matrix Display */
.tp-lcd-screen {
    background: #052010; /* Dark bottle green industrial LCD */
    border: 2px solid #14532d;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    font-family: 'Courier New', Courier, monospace;
    color: #4ade80;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lcd-line {
    font-size: 0.75rem;
    line-height: 1.2;
    display: flex;
    justify-content: space-between;
}

.lcd-status {
    font-weight: bold;
    color: #86efac;
    border-bottom: 1px dashed #166534;
    padding-bottom: 0.2rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lcd-highlight {
    color: #facc15;
    font-weight: bold;
}

/* Section Labels */
.tp-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #f59e0b;
    letter-spacing: 0.05em;
    margin-top: 0.1rem;
}

/* Workpiece Quick Select Grid */
.tp-button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
}

.tp-workpiece-btn {
    background: #27272a;
    border: 1px solid #3f3f46;
    color: #e4e4e7;
    padding: 0.4rem 0.2rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.tp-workpiece-btn:hover {
    background: #3f3f46;
    border-color: #f59e0b;
    color: #f59e0b;
}

.tp-workpiece-btn.active {
    background: #f59e0b;
    border-color: #d97706;
    color: #18181b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Manual Jog Controls */
.tp-jog-container {
    background: #141416;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 0.5rem;
}

.tp-jog-controls {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.tp-jog-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.jog-label {
    font-size: 0.65rem;
    font-weight: bold;
    color: #a1a1aa;
    width: 65px;
}

.tp-jog-btn {
    flex: 1;
    background: #27272a;
    border: 1px solid #3f3f46;
    color: #f4f4f5;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
}

.tp-jog-btn:hover {
    background: #3f3f46;
    border-color: #eab308;
    color: #eab308;
}

.tp-jog-btn:active {
    transform: scale(0.96);
}

.tp-grip-btn {
    background: #1e293b;
    border-color: #3b82f6;
    color: #93c5fd;
}

.tp-safety-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.4rem;
    padding-top: 0.35rem;
    border-top: 1px dashed #27272a;
}

.tp-collision-toggle-btn {
    flex: 1;
    background: #182030;
    border: 1px solid #3b82f6;
    color: #93c5fd;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 0.35rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.tp-collision-toggle-btn:hover {
    background: #1e293b;
    border-color: #60a5fa;
    color: #bfdbfe;
}

.tp-collision-toggle-btn.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.tp-safety-pill {
    font-size: 0.55rem;
    color: #10b981;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: right;
    line-height: 1.2;
}

/* Safety Row & Emergency Stop Button */
.tp-safety-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.2rem;
    padding-top: 0.5rem;
    border-top: 1px solid #27272a;
}

.tp-estop-btn {
    background: radial-gradient(circle at 40% 40%, #ef4444, #b91c1c);
    border: 3px solid #facc15; /* Yellow safety ring */
    width: 62px;
    height: 62px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6), inset 0 -2px 6px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.tp-estop-btn:active,
.tp-estop-btn.latched {
    transform: translateY(3px) scale(0.95);
    background: radial-gradient(circle at 50% 50%, #991b1b, #7f1d1d);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 0 14px rgba(239, 68, 68, 0.7);
}

.estop-label {
    font-size: 0.55rem;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    line-height: 1.1;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.tp-estop-caption {
    font-size: 0.65rem;
    font-weight: bold;
    color: #ef4444;
    line-height: 1.3;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    #robot-front-stage {
        top: 70px;
        width: 96vw;
        max-height: calc(100vh - 85px);
        padding: 1rem 1.2rem;
    }

    .teach-pendant {
        bottom: 12px;
        right: 12px;
        width: 290px;
    }
}

@media (max-width: 768px) {
    /* Hide industrial teach pendant on phones - mobile users tap briefcases directly or swipe! */
    .teach-pendant {
        display: none !important;
    }

    #robot-front-stage {
        top: 60px;
        width: 95vw;
        max-height: calc(100vh - 75px);
        padding: 0.9rem 0.9rem 1.5rem;
        border-radius: 12px;
    }

    #robot-front-stage .container {
        padding: 0.4rem 0.4rem 1.2rem !important;
    }

    .gripper-dock-bracket {
        margin: -0.9rem -0.9rem 0.9rem -0.9rem;
        padding: 0.4rem 0.6rem;
    }

    .clamp-handle-bar {
        width: 100px;
        height: 10px;
    }

    .stage-dock-header {
        font-size: 0.75rem;
    }

    .view-mode-toggle {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        margin-left: 0.4rem;
    }

    /* Prominent, touch-friendly minimized dock pill on mobile */
    #robot-front-stage.minimized-dock {
        bottom: 16px !important;
        width: 94vw !important;
        height: 52px !important;
        padding: 0 0.9rem !important;
        border-radius: 26px !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        z-index: 100 !important;
    }

    #robot-front-stage.minimized-dock .stage-dock-meta > span {
        display: none !important;
    }

    #robot-front-stage.minimized-dock .dock-inspect-btn {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.78rem !important;
        background: #f59e0b !important;
        color: #0f172a !important;
        font-weight: 700 !important;
        border: none !important;
        border-radius: 16px !important;
        cursor: pointer !important;
        pointer-events: auto !important;
    }

    #robot-front-stage.minimized-dock .stage-dock-title {
        font-size: 0.75rem !important;
        cursor: pointer !important;
    }

    body:has(#robot-front-stage.minimized-dock) .mobile-workcell-hint {
        bottom: 78px;
    }

    .mobile-workcell-hint {
        position: fixed;
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(15, 23, 42, 0.88);
        border: 1px solid rgba(245, 158, 11, 0.5);
        color: #f1f5f9;
        font-size: 0.72rem;
        font-family: monospace;
        padding: 0.45rem 1rem;
        border-radius: 20px;
        pointer-events: none;
        z-index: 50;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        display: flex;
        align-items: center;
        gap: 0.4rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
        animation: hintFadeInOut 7s forwards;
    }

    @keyframes hintFadeInOut {
        0% { opacity: 0; transform: translateX(-50%) translateY(12px); }
        12% { opacity: 1; transform: translateX(-50%) translateY(0); }
        82% { opacity: 1; transform: translateX(-50%) translateY(0); }
        100% { opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; }
    }
}

