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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

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

.nav-logo h2 {
    color: #ff4444;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #ff4444;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff4444;
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.animated-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 68, 68, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 68, 68, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

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

.pulse-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.pulse-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pulse-dot:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.pulse-dot:nth-child(2) {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation-delay: 0.7s;
}

.pulse-dot:nth-child(3) {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 1.4s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff;
}

.highlight {
    color: #ff4444;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.hero-tagline {
    font-size: 1.3rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-mission {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, #ff4444, #ff6b6b);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #ff4444;
}

.btn-secondary:hover {
    background: #ff4444;
    transform: translateY(-2px);
}

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

.detection-animation {
    position: relative;
    width: 300px;
    height: 300px;
}

.sensor-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ff4444, #ff6b6b);
    border-radius: 50%;
    animation: sensorPulse 2s infinite;
    z-index: 3;
}

@keyframes sensorPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.signal-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255, 68, 68, 0.3);
    border-radius: 50%;
    animation: waveExpand 3s infinite;
}

@keyframes waveExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.alert-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ff4444;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    animation: alertBlink 1s infinite;
}

@keyframes alertBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #f8f9fa;
}

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

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.7;
}

.about-text h4 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #333;
}

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

.problem-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.problem-icon {
    font-size: 2.5rem;
    color: #ff4444;
    margin-bottom: 1rem;
}

.problem-card h5 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.problem-card p {
    color: #666;
    line-height: 1.6;
}

.process-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.process-step {
    text-align: center;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.process-step h5 {
    font-size: 1.1rem;
    color: #333;
}

.arrow {
    font-size: 2rem;
    color: #ff4444;
    font-weight: bold;
}

/* How It Works Section */
.how-it-works {
    background: white;
}

.workflow-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid #ff4444;
    background: transparent;
    color: #ff4444;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: #ff4444;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.foundation-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.foundation-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.foundation-card p {
    color: #666;
    line-height: 1.6;
}

.workflow-diagram {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
}

.workflow-step {
    text-align: center;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.workflow-step h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.workflow-step p {
    color: #666;
    line-height: 1.6;
}

.workflow-arrow {
    width: 0;
    height: 0;
    border-left: 20px solid #ff4444;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin: 0 auto;
}

.demo-container {
    text-align: center;
}

.demo-container h4 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #333;
}

.sensor-demo {
    background: #f8f9fa;
    padding: 3rem;
    border-radius: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.sensor-visual {
    margin-bottom: 2rem;
}

.sensor-strip {
    width: 200px;
    height: 40px;
    background: #ddd;
    border-radius: 20px;
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
}

.color-indicator {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #FF5722);
    border-radius: 20px;
    transition: width 2s ease;
}

.concentration-meter {
    width: 200px;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.meter-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #FF5722);
    border-radius: 10px;
    transition: width 2s ease;
}

.meter-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.demo-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.demo-btn:hover {
    background: #ff6b6b;
    transform: translateY(-2px);
}

.demo-results {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Features Section */
.features {
    background: #f8f9fa;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    color: #ff4444;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Technology Section */
.technology {
    background: white;
}

.tech-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

.subject-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-3px);
}

.subject-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subject-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.subject-card p {
    color: #666;
    font-size: 0.9rem;
}

.tech-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-category h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

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

.tech-tag {
    background: #ff4444;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Team Section */
.team {
    background: #f8f9fa;
}

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

.team-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    transform-style: preserve-3d;
    perspective: 700px;
}

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

.team-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff4444, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

.team-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.team-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Popover for team details */
.team-card.team-expanded {
    position: relative;
    z-index: 2;
}

.team-popover {
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translate(-50%, 100%);
    width: min(320px, 90vw);
    background: #1a1a2e;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    padding: 1rem;
    animation: popIn 0.18s ease-out both;
}

.team-popover:before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #1a1a2e;
}

.team-popover-content strong {
    color: #ff6b6b;
    display: block;
    margin-bottom: 0.25rem;
}

.team-popover-content p {
    color: #ddd;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.team-popover-close {
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 6px 12px;
    font-weight: 600;
    cursor: pointer;
}

@keyframes popIn {
    from { opacity: 0; transform: translate(-50%, 110%); }
    to { opacity: 1; transform: translate(-50%, 100%); }
}

/* Impact Section */
.impact {
    background: white;
}

.impact-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #ff4444;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.vision-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.vision-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.vision-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.7;
}

.vision-text h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.roadmap-list {
    list-style: none;
    padding: 0;
}

.roadmap-list li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.roadmap-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ff4444;
    font-weight: bold;
}

.testimonials h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.testimonial-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1rem;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1rem;
    color: #666;
}

.testimonial-author {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    background: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff4444;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: #ff4444;
    margin-right: 1rem;
    width: 30px;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.contact-item p {
    color: #666;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #ff6b6b;
    transform: translateY(-2px);
}

.response-time {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    color: #666;
}

.response-time i {
    color: #ff4444;
    margin-right: 0.5rem;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ff4444;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ff4444;
}

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

.footer-social .social-link {
    background: #333;
}

.footer-social .social-link:hover {
    background: #ff4444;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

/* --- Site-wide interactive enhancements and dark mode overrides --- */
/* Dark mode base */
body.dark { background: #0b0b12; color: #e5e7eb; }
body.dark .section-header h2 { color: #e5e7eb; }
body.dark .section-header p { color: #a1a1aa; }

/* Theming per section containers */
body.dark .about,
body.dark .features,
body.dark .team,
body.dark .contact { background: #0f1220; }
body.dark .how-it-works,
body.dark .technology,
body.dark .impact { background: #0f1220; }

/* Card/background elements */
body.dark .feature-card,
body.dark .team-card,
body.dark .problem-card,
body.dark .foundation-card,
body.dark .contact-form,
body.dark .demo-results { background: #141826; }
body.dark .contact-info h3,
body.dark .team-card h4,
body.dark .feature-card h4,
body.dark .foundation-card h4,
body.dark .process-step h5,
body.dark .vision-text h3,
body.dark .vision-text h4 { color: #e5e7eb; }
body.dark .problem-card p,
body.dark .foundation-card p,
body.dark .feature-card p,
body.dark .team-card p,
body.dark .vision-text p,
body.dark .contact-item p { color: #a1a1aa; }

/* Footer dark tweak */
body.dark .footer { background: #0d0d15; }

/* Form states in dark */
body.dark .form-group label { color: #e5e7eb; }
body.dark .form-message.success { background: #0f2d18; color: #c6f6d5; border: 1px solid #2f855a; }
body.dark .form-message.error { background: #3c0f13; color: #feb2b2; border: 1px solid #c53030; }

/* Theme toggle button */
.theme-toggle { background: transparent; color: #fff; border: 2px solid #ff4444; border-radius: 25px; padding: 6px 12px; cursor: pointer; margin-left: 1rem; transition: all 0.3s ease; }
.theme-toggle:hover { background: #ff4444; }

/* Scroll progress bar */
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, #ff4444, #ff6b6b); z-index: 1200; }

/* Back to top button */
#back-to-top { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: #ff4444; color: #fff; border: none; box-shadow: 0 10px 25px rgba(0,0,0,0.2); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; z-index: 1200; }
#back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* Emergency Drill Modal */
.drill-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 1400; }
.drill-dialog { background: #0f1220; color: #e5e7eb; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,0.45); width: min(760px, 94vw); padding: 16px; }
.drill-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drill-header h3 { color: #ff6b6b; }
.drill-close { background: transparent; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.drill-close:hover { background: rgba(255,255,255,0.08); }
.drill-meta { display: flex; gap: 16px; color: #cbd5e1; margin-bottom: 8px; }
#drill-canvas { width: 100%; height: auto; display: block; background: radial-gradient(1200px 400px at center, #151a2f, #0b0e1a); border-radius: 12px; border: 1px solid rgba(255,255,255,0.06); }
.drill-controls { display: flex; gap: 8px; margin-top: 12px; }
.drill-tip { color: #a1a1aa; font-size: 0.9rem; margin-top: 6px; }

body.dark .drill-dialog { background: #0b0b12; }

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .tech-overview {
        grid-template-columns: 1fr;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
    }
    
    .vision-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .workflow-diagram {
        grid-template-columns: 1fr;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
        margin: 1rem auto;
    }
    
    .process-diagram {
        flex-direction: column;
    }
    
    .arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
}
