:root {
    --bg-light: #ffffff;
    --bg-alt: #f8f9fa;
    --text-main: #111111;
    --text-muted: #666666;
    --border-color: #eaeaec;
    --accent: #808080;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Utilities */
h1, h2, h3, h4 { 
    font-weight: 500; 
    font-family: var(--font-heading);
}

a { text-decoration: none; color: inherit; }

.btn-primary {
    background: #111111;
    color: #ffffff;
    padding: 0.75rem 1.75rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.3s ease;
    cursor: pointer;
    border: 1px solid #111111;
    display: inline-block;
}

.btn-primary:hover { 
    background: #ffffff;
    color: #111111;
}

/* Top Nav */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    max-height: 75px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Main Container */
.page-container {
    padding-top: 80px; /* Offset for navbar */
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    margin-top: 5vh;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    line-height: 1.6;
}

/* Courses Grid Selection */
.section-courses {
    padding: 10vh 5% 15vh;
    background: var(--bg-light);
}

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

.section-courses .section-header h2 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 2.5rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    background: #ffffff;
    border-color: #cccccc;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
    line-height: 1.5;
}

.btn-card {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    width: 100%;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.course-card:hover .btn-card {
    background: var(--text-main);
    color: #ffffff;
    border-color: var(--text-main);
}

/* Modal / Frame */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-frame {
    background: #ffffff;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .modal-frame {
    transform: translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-header {
    padding: 3rem 3rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.modal-header h2 { 
    font-size: 1.75rem; 
    letter-spacing: -0.5px; 
    margin-bottom: 0.25rem;
}

.modal-header h4 { 
    font-size: 1rem; 
    color: var(--text-muted); 
    font-weight: 400;
}

.modal-body {
    padding: 2rem 3rem;
    overflow-y: auto;
}

.modal-body h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-top: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 0.85rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.modal-modules-list {
    list-style: none;
}

.modal-modules-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.modal-modules-list li:last-child {
    border-bottom: none;
}

.modal-footer {
    padding: 1.5rem 3rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-alt);
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-section { min-height: 50vh; padding-top: 5vh; }
    .modal-header, .modal-body, .modal-footer { padding: 1.5rem; }
    .scene { transform: scale(0.7) rotateX(60deg) rotateZ(-45deg); }
    .exploded-text-container h2 { font-size: 1.75rem; }
}

/* --- Exploded View Section --- */
.exploded-section {
    height: 400vh; /* Long scroll duration */
    position: relative;
    background: var(--bg-alt); 
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1500px;
}

.scene {
    position: relative;
    width: 320px;
    height: 200px;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateZ(-45deg);
    z-index: 10;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; 
    transition: opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, opacity;
    cursor: pointer;
}

.layer:hover {
    border-color: #111111;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.layer h4 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.layer span {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
}

.exploded-text-container {
    position: absolute;
    bottom: 5%;
    left: 10%;
    right: 10%;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 20;
    pointer-events: none;
}

.exploded-text-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.exploded-text-container h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.exploded-text-container p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}
