@import 'theme.css';

/* Custom styles */
.hero-section {
    background: var(--header-bg);
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
    color: var(--header-text);
    margin-bottom: 0;
    text-align: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--border-color);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--border-color);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, 20px) rotate(10deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.hero-section .display-4 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    font-size: 1.4rem;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.card {
    transition: transform 0.2s;
    border: none;
    box-shadow: var(--card-shadow);
    background-color: var(--card-bg);
    padding: 1rem;
}

.card-title {
    color: var(--text-color);
    font-weight: 600;
}

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

/* Ensuring good contrast and readability */
body {
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--bg-color);
    padding-top: 76px;
    font-family: var(--body-font);
    font-weight: 400;
}

/* Making sure links are clearly visible */
.nav-link {
    color: var(--text-color);
    font-weight: 500;
}

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

.trait-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

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

.trait-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--header-bg);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.trait-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.trait-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
    font-weight: 400;
    font-size: 1.05rem;
}

.blockquote {
    background: var(--bg-secondary);
    border-left: 5px solid var(--primary-color);
    padding: 2rem;
    border-radius: 10px;
    font-style: italic;
    margin: 2rem 0;
    position: relative;
    color: var(--text-color);
}

.blockquote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -10px;
    left: 10px;
    color: var(--border-color);
}

.blockquote-footer {
    color: var(--text-color);
    font-weight: 500;
    margin-top: 1rem;
}

.programming-traits {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Card animations for different traits */
.trait-card:nth-child(1) { border-top-color: var(--primary-color); }
.trait-card:nth-child(2) { border-top-color: var(--gradient-end); }
.trait-card:nth-child(3) { border-top-color: var(--primary-color); }
.trait-card:nth-child(4) { border-top-color: var(--gradient-end); }

/* Navbar styling */
.navbar {
    background: var(--navbar-bg);
    box-shadow: var(--navbar-shadow);
    padding: 1rem 0;
    transition: all 0.3s ease;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 76px;
}

.navbar.scrolled {
    box-shadow: var(--navbar-shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-color);
    font-family: var(--heading-font);
}

.brand-icon {
    font-size: 1.8rem;
}

.brand-text {
    background: var(--header-bg);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-nav {
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--border-color);
    transform: translateY(-1px);
}

.nav-link.active {
    background: var(--border-color);
    color: var(--primary-color) !important;
}

.nav-link i {
    font-size: 1.1rem;
}

/* Mobile adjustments */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--navbar-bg);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 0.5rem;
        box-shadow: var(--navbar-shadow);
    }
    
    .nav-link {
        padding: 0.8rem 1rem !important;
    }

    .navbar-toggler {
        border-color: var(--border-color);
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(44, 62, 80, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.3;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.8;
    font-weight: 300;
}

.spotlight-card {
    border-left: 4px solid #3498db;
    background: linear-gradient(to right, rgba(52, 152, 219, 0.05), transparent);
}

.blockquote-sm {
    font-size: 0.95rem;
    font-style: italic;
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-color);
}

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

.achievement-badge {
    background-color: var(--border-color);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Update the layout for better responsiveness */
@media (max-width: 768px) {
    .spotlight-card {
        margin-bottom: 2rem;
    }
}

.quiz-cta {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    margin-top: 3rem;
}

.quiz-cta h2,
.quiz-cta p {
    color: var(--header-text) !important;
}

.quiz-badge {
    margin-bottom: 1rem;
}

.quiz-badge .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.quiz-cta .btn-light {
    color: var(--dark-color);
    background: var(--bg-color);
    border: none;
    transition: all 0.3s ease;
}

.quiz-cta .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Pioneer Cards Styling */
.pioneer-card {
    background: var(--card-bg) !important;
    border-radius: 15px;
    padding: 2rem;
    height: 100%;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.pioneer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pioneer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

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

.pioneer-name {
    color: var(--text-color) !important;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.pioneer-title {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 1rem;
}

.pioneer-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.pioneer-quote {
    position: relative;
    padding: 1.5rem;
    background: var(--bg-secondary) !important;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.pioneer-quote blockquote {
    color: var(--text-color);
    font-style: italic;
    margin: 0;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.pioneer-achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.achievement-badge {
    background: var(--bg-secondary);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

/* Hover effects */
.pioneer-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pioneer-card {
        padding: 1.5rem;
    }

    .pioneer-name {
        font-size: 1.2rem;
    }

    .pioneer-avatar {
        width: 50px;
        height: 50px;
    }
}

.pioneer-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent, var(--border-color));
    pointer-events: none;
}

/* Update Pioneer Card Styling */
.pioneer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pioneer-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
}

.pioneer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pioneer-title-group {
    flex-grow: 1;
}

.pioneer-name {
    color: var(--text-color) !important;
    font-size: 1.4rem;
    margin: 0;
    line-height: 1.2;
}

.pioneer-title {
    color: var(--text-secondary) !important;
    font-size: 1rem;
    margin: 0.2rem 0 0 0;
    font-weight: 500;
}

.pioneer-description {
    color: var(--text-secondary) !important;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.02em;
}

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

.section-header .lead {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
}

/* Header Animations */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.section-header h2 {
    background: linear-gradient(
        90deg,
        var(--text-color) 0%,
        var(--primary-color) 50%,
        var(--text-color) 100%
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradientFlow 8s ease infinite;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header .lead {
        font-size: 1.1rem;
    }
}

/* Additional accessibility options */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Typography Variables */
:root {
    /* Existing variables... */
    --body-font: 'Lexend', sans-serif;
    --heading-font: 'Lexend', sans-serif;
}

/* Base Typography */
body {
    font-family: var(--body-font);
    font-weight: 400;
    line-height: 1.8;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    line-height: 1.3;
}

.lead {
    font-weight: 300;
    line-height: 1.6;
}

/* Navbar Typography */
.navbar-brand {
    font-family: var(--heading-font);
    font-weight: 600;
}

.nav-link {
    font-family: var(--body-font);
    font-weight: 500;
}

/* Button Typography */
.btn {
    font-family: var(--body-font);
    font-weight: 500;
}

.text-content {
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Base text colors */
body {
    color: var(--text-color);
}

/* Navigation text */
.navbar-brand, 
.nav-link,
.navbar-nav .nav-link {
    color: var(--text-color) !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Card text */
.card-title,
.card-text,
.card p {
    color: var(--text-color);
}

/* Section text */
.section-header h2 {
    color: var(--text-color);
}

.section-header .lead,
.lead {
    color: var(--text-secondary);
}

/* Trait cards */
.trait-card h3 {
    color: var(--text-color);
}

.trait-card p {
    color: var(--text-secondary);
}

/* Alan Turing Legacy Section */

.turing-section {
    background-color: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
}

.turing-portrait-container img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    padding: 4px;
}

.achievement-card {
    padding: 2rem;
    border-radius: 1rem;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

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

.achievement-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.turing-quote {
    font-size: 1.25rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.turing-legacy li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.turing-legacy i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.achievement-badges .badge {
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Footer Styles */
.footer {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand .brand-icon {
    font-size: 1.5rem;
}

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

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.social-links a:hover,
.social-links a:focus {
    color: var(--primary-color);
}

.newsletter-form .input-group {
    max-width: 400px;
}

.newsletter-form .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
}

.newsletter-form .form-control::placeholder {
    color: var(--text-color);
    opacity: 0.7; /* Better visibility while still appearing as a placeholder */
}

/* Form text help message */
.form-text {
    color: var(--text-color) !important; /* Override Bootstrap's default color */
    opacity: 0.9; /* Keep it slightly dimmed but still very readable */
}

/* Dark mode specific adjustments */
[data-theme="dark"] .newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7); /* Lighter placeholder text in dark mode */
}

[data-theme="dark"] .form-text {
    color: rgba(255, 255, 255, 0.9) !important; /* Lighter help text in dark mode */
}

.newsletter-form .btn {
    border-radius: 0 0.375rem 0.375rem 0;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
}

/* Dark mode adjustments */
[data-theme="dark"] .footer-bottom {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Global spacing adjustments */
section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border-color);
}

section:last-child {
    border-bottom: none;
}

/* Main content container */
.container {
    max-width: 1200px;
    padding: 0 1.5rem;
}

/* Section spacing */
.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

/* Quiz section adjustments */
#quiz {
    background-color: var(--bg-secondary);
    margin-top: 0;
    padding-top: 6rem;
}

#quiz .hero-section {
    padding: 3rem 0;  /* Reduced padding for nested hero */
}

/* Resources section adjustments */
#resources {
    margin-top: 0;
    padding-top: 6rem;
}

.resource-header {
    padding: 4rem 0;
    margin-bottom: 4rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    section {
        padding: 4rem 0;
    }
    
    .hero-section {
        padding: 6rem 0 4rem;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    #quiz, #resources {
        padding-top: 4rem;
    }
}

/* Card grid spacing */
.row.g-4 {
    --bs-gutter-y: 2rem;
}

/* Individual card margins */
.trait-card,
.pioneer-card,
.resource-card {
    margin-bottom: 2rem;
    height: 100%;
}

/* Last items in grids */
.row > *:last-child .trait-card,
.row > *:last-child .pioneer-card,
.row > *:last-child .resource-card {
    margin-bottom: 0;
}

/* Remove the special headers for quiz and resources */
#quiz .hero-section,
.resource-header {
    display: none;
}

/* Consistent section styling */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .display-4 {
    margin-bottom: 1rem;
}

.section-header .lead {
    max-width: 800px;
    margin: 0 auto 1rem;
}

.section-header .text-muted {
    max-width: 700px;
    margin: 0 auto;
}

/* Section header text colors */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .lead {
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 1rem;
}

.section-header .text-muted {
    /* Override Bootstrap's text-muted in dark mode */
    color: var(--text-secondary) !important;
    max-width: 700px;
    margin: 0 auto;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .section-header .lead,
[data-theme="dark"] .section-header .text-muted {
    color: var(--text-secondary) !important;
    opacity: 0.9;  /* Slightly reduce opacity for better contrast */
}