/* =============================================
   MAIN STYLESHEET - Math Platform
   © Situ Ghosh - All Rights Reserved
   ============================================= */

/* CSS Variables */
:root {
    --primary-color: #0d6e7e;
    --primary-dark: #095a68;
    --primary-light: #12919f;
    --secondary-color: #1a3a4a;
    --accent-color: #ffc107;
    --background-dark: #0a1929;
    --background-light: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #1a3a4a;
    --text-secondary: #5a6a7a;
    --text-light: #ffffff;
    --border-color: #e0e5eb;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    
    /* Blackboard colors */
    --blackboard-bg: #1a2f1a;
    --blackboard-border: #3d5c3d;
    --chalk-white: #f0f0e8;
    --chalk-yellow: #f4e04d;
    --chalk-blue: #6bb3f0;
    --chalk-red: #e85d5d;
}

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

html {
    scroll-behavior: smooth;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Watermark */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 15vw;
    font-weight: 700;
    color: rgba(13, 110, 126, 0.03);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
    font-family: 'Caveat', cursive;
}

/* Top Bar */
.top-bar {
    background: var(--secondary-color);
    padding: 8px 20px;
    text-align: center;
}

.copyright-notice {
    color: var(--text-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copyright-notice i {
    color: var(--accent-color);
}

/* Navigation */
.main-nav {
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.logo span {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.nav-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--background-light);
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.nav-btn.active {
    background: var(--primary-color);
    color: var(--text-light);
}

.nav-btn.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-light);
}

.nav-btn.highlight:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.nav-btn.home-btn {
    background: var(--secondary-color);
    color: var(--text-light);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

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

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 4px solid rgba(255,255,255,0.3);
}

.profile-image i {
    font-size: 4rem;
    color: var(--text-light);
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-title {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.welcome-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    opacity: 0.95;
}

/* Sections */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.section-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* About Section */
.about-section {
    margin-bottom: 50px;
}

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

.feature-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--text-light);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Quick Access Section */
.quick-access-section {
    margin-bottom: 50px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.quick-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.quick-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: var(--transition);
}

.quick-card:hover::before {
    transform: scaleY(1);
}

.quick-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.quick-icon i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.quick-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.quick-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.quick-arrow {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quick-arrow i {
    color: var(--primary-color);
}

.quick-card:hover .quick-arrow {
    background: var(--primary-color);
}

.quick-card:hover .quick-arrow i {
    color: var(--text-light);
}

.quick-card.highlight-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
}

.quick-card.highlight-card h3,
.quick-card.highlight-card p {
    color: var(--text-light);
}

.quick-card.highlight-card p {
    opacity: 0.9;
}

.quick-card.highlight-card .quick-icon {
    background: rgba(255,255,255,0.2);
}

.quick-card.highlight-card .quick-icon i {
    color: var(--text-light);
}

.quick-card.highlight-card::before {
    background: var(--accent-color);
}

.quick-card.highlight-card .quick-arrow {
    background: rgba(255,255,255,0.2);
}

.quick-card.highlight-card .quick-arrow i {
    color: var(--text-light);
}

/* Contact Section */
.contact-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: var(--background-light);
    border-radius: var(--radius-md);
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.contact-item span {
    font-size: 1rem;
    color: var(--text-primary);
}

/* Footer */
.main-footer {
    background: var(--secondary-color);
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px;
}

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

.footer-warning {
    margin-top: 10px;
    font-size: 0.85rem !important;
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

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

.modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-icon i {
    font-size: 1.8rem;
    color: var(--text-light);
}

.modal-content h2 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.modal-content input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    margin-bottom: 20px;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Buttons */
.btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-light);
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-secondary {
    padding: 12px 30px;
    background: var(--background-light);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        justify-content: center;
    }
    
    .nav-buttons {
        justify-content: center;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .nav-btn {
        padding: 12px 14px;
    }
    
    .hero-section {
        padding: 40px 15px;
    }
    
    .profile-name {
        font-size: 2rem;
    }
    
    .quick-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Chalk Writing Animation */
@keyframes chalkWrite {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chalk-line {
    animation: chalkWrite 0.5s ease forwards;
}

/* Disable text selection on protected elements */
.protected {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Print protection */
@media print {
    body {
        display: none !important;
    }
}
