/* ==========================================================================
   1. ROOT & GLOBAL STYLES
   ========================================================================== */

:root {
    /* Color Palette (Tetradic) */
    --primary-color: #D9006C; /* Vibrant Pink/Magenta */
    --secondary-color: #0D0D2B; /* Dark Blue/Purple */
    --accent-color-1: #12A67C; /* Teal/Green */
    --accent-color-2: #F2B705; /* Gold/Yellow */
    
    /* Neutral & Text Colors */
    --background-light: #F9F9F9;
    --background-dark: #0D0D2B;
    --text-light: #FFFFFF;
    --text-dark: #333333;
    --heading-dark: #222222;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-color: #010104;

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    
    /* Spacing */
    --spacing-unit: 1rem;
    --header-height: 80px;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--background-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--heading-dark);
    line-height: 1.2;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-unit);
}

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

a:hover {
    color: var(--accent-color-1);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section {
    padding: calc(var(--spacing-unit) * 5) 0;
}

.section-title {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto calc(var(--spacing-unit) * 3) auto;
    font-size: 1.1rem;
    color: #555;
}

.section-dark {
    background-color: var(--background-dark);
    color: var(--text-light);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================================================
   2. GLOBAL BUTTON STYLES
   ========================================================================== */

.btn, button, input[type="submit"] {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 4px 4px 0px var(--shadow-color);
}

.btn:hover, button:hover, input[type="submit"]:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--shadow-color);
}

.btn:active, button:active, input[type="submit"]:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

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

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-tertiary {
    background-color: var(--glass-bg);
    color: var(--text-light);
    border-color: var(--glass-border);
    box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.btn-tertiary:hover {
    background-color: var(--accent-color-1);
    border-color: var(--accent-color-1);
}

/* ==========================================================================
   3. LAYOUT & HEADER / FOOTER
   ========================================================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-unit) 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color 0.3s ease;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: calc(var(--spacing-unit) * 2);
}

.nav-list a {
    color: var(--text-light);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

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

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

.burger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    box-shadow: none;
}
.burger-menu:hover {
    transform: none;
    box-shadow: none;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Footer */
.main-footer {
    background-color: var(--background-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: calc(var(--spacing-unit) * 4) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
}

.footer-col h4 {
    color: var(--text-light);
    margin-bottom: var(--spacing-unit);
}

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

.footer-col li {
    margin-bottom: calc(var(--spacing-unit) / 2);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-col a:hover {
    color: var(--primary-color);
}
.social-links a {
    text-transform: uppercase;
    font-weight: bold;
}

/* ==========================================================================
   4. SECTIONS & PAGES
   ========================================================================== */

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(13, 13, 43, 0.7), rgba(13, 13, 43, 0.5));
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    color: var(--text-light);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin-bottom: var(--spacing-unit);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto calc(var(--spacing-unit) * 2) auto;
    color: var(--text-light);
}

/* About Us Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--spacing-unit) * 4);
    align-items: center;
}
.about-image-wrapper .card-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 8px 8px 0px var(--shadow-color);
    border: 3px solid var(--shadow-color);
}

/* Instructors Section */
.instructor-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}
.gallery-card {
    position: relative;
    overflow: hidden;
}
.gallery-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-unit);
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--text-light);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
.gallery-card:hover .card-content {
    transform: translateY(0);
}

/* Community Section */
.community-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.community-stats {
    display: flex;
    justify-content: space-around;
    margin-top: calc(var(--spacing-unit) * 3);
}

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

.stat-number {
    display: block;
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--accent-color-2);
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: calc(var(--spacing-unit) * 2.5);
}
.news-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: calc(var(--spacing-unit) / 2);
    display: block;
}
.read-more {
    font-weight: 700;
    color: var(--accent-color-1);
}

/* Careers Section */
.careers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-unit) * 2;
    text-align: center;
}

/* Research/Projects Section */
.project-slide {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: calc(var(--spacing-unit) * 3);
    align-items: center;
}
.project-image img {
    border: 3px solid var(--shadow-color);
    box-shadow: 6px 6px 0 var(--shadow-color);
    border-radius: 8px;
}

/* External Resources Section */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}
.resource-card {
    background: var(--glass-bg);
    padding: calc(var(--spacing-unit) * 1.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}
.resource-card p {
    flex-grow: 1;
}

/* Contact Section / Page */
.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255,255,255,0.7);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: 8px;
    border: 3px solid var(--shadow-color);
    box-shadow: 6px 6px 0 var(--shadow-color);
}

.contact-page-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: calc(var(--spacing-unit) * 4);
    align-items: start;
}

.contact-info p {
    margin-bottom: var(--spacing-unit) * 1.5;
}

/* Content Pages (Privacy, Terms) */
.page-header {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 20px;
    background-color: var(--secondary-color);
}
.page-header .section-title {
    color: var(--text-light);
}

.content-page {
    padding-top: var(--spacing-unit);
    max-width: 800px;
}
.content-page h2 {
    margin-top: calc(var(--spacing-unit) * 2);
}

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.success-icon svg {
    width: 80px;
    height: 80px;
    fill: var(--accent-color-1);
    margin-bottom: var(--spacing-unit);
}

/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */

/* Cards */
.card {
    background: var(--background-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px var(--primary-color);
}

.section-dark .card {
    background-color: #1a1a3a;
    border-color: var(--glass-border);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.card-image {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}
.instructor-card .card-image {
    height: 250px;
}

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

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

.card-content {
    padding: calc(var(--spacing-unit) * 1.5);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card-content h4 {
    margin-bottom: calc(var(--spacing-unit) / 2);
}

/* Progress Bars */
.progress-bar-container {
    margin-top: var(--spacing-unit);
}
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}
.section-dark .progress-bar {
    background-color: rgba(255,255,255,0.2);
}
.progress-bar div {
    height: 100%;
    background-color: var(--accent-color-1);
    border-radius: 4px;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-unit) * 1.5;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--shadow-color);
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: #fff;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 0, 108, 0.3);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   6. RESPONSIVE & MEDIA QUERIES
   ========================================================================== */

@media (max-width: 992px) {
    .about-container,
    .project-slide,
    .contact-page-grid {
        grid-template-columns: 1fr;
    }
    .about-image-wrapper {
        order: -1;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--secondary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .main-nav.active {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        gap: calc(var(--spacing-unit) * 3);
        text-align: center;
    }
    .nav-list a {
        font-size: 1.5rem;
    }

    .burger-menu {
        display: block;
    }
    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}