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

:root {
    --bg-main: #ffffff;
    --bg-light-blue: #e8f4fc;
    --accent: #2196f3;
    --accent-hover: #1976d2;
    --accent-light: rgba(33, 150, 243, 0.12);
    --text: #1a1a2e;
    --text-muted: #5a6b7d;
    --card-bg: #ffffff;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-main);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

body.loader-active {
    overflow: hidden;
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.loader-done {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    align-items: center;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.15em;
}

.loader-cursor {
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 0.75rem 1.5rem;
    background: rgba(232, 244, 252, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(33, 150, 243, 0.08);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    background: rgba(232, 244, 252, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.brand-text {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.nav-link.active {
    color: var(--accent);
    background: var(--accent-light);
}

.nav-apply {
    background: var(--accent);
    color: white !important;
}

.nav-apply:hover {
    background: var(--accent-hover) !important;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 210;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 1.5rem 4rem;
    position: relative;
    background: var(--bg-light-blue);
}

/* Banner Slider */
.hero-banner-slider {
    position: absolute;
    inset: 0;
}

.banner-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.banner-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.55) 0%, rgba(26, 26, 46, 0.4) 40%, rgba(33, 150, 243, 0.35) 100%);
    pointer-events: none;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 0%, rgba(26, 26, 46, 0.25) 100%);
    pointer-events: none;
}

.noise {
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.content {
    text-align: center;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.highlight {
    color: var(--accent);
}

.subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    border: none;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.hero .content {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.35);
}

.hero .content h1,
.hero .content .highlight {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 4px 24px rgba(0, 0, 0, 0.4);
}

.hero .content .subtitle {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.hero .scroll-hint {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.arrow {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* Departments Section */
.departments {
    padding: 5rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.dept-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.dept-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.dept-card.dept-right .dept-image-wrap {
    order: 2;
}

.dept-card.dept-right .dept-content {
    order: 1;
}

.dept-image-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.dept-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.dept-image {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.dept-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.dept-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* CTA Section */
.cta-section {
    padding: 5rem 1.5rem;
    background: var(--bg-light-blue);
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.cta-content h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cta-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Form Section */
.form-section {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 1rem 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.form-section.active {
    opacity: 1;
    visibility: visible;
}

/* Apply layout - image + form side by side, full width */
.apply-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: 1400px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 6rem);
}

.apply-image-side {
    flex: 0 0 45%;
    min-width: 0;
    min-height: 400px;
}

.apply-intro-image {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    display: block;
}

.form-section .form-container {
    flex: 1;
    min-width: 0;
    margin: 0;
    transform: none;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--border);
}

.overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.form-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    overflow-y: auto;
    position: relative;
    z-index: 102;
}

.apply-layout .form-container {
    max-width: none;
    box-shadow: none;
}


.form-header {
    margin-bottom: 1.25rem;
    padding-right: 2.5rem;
}

.form-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.form-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-light-blue);
    color: var(--text-muted);
    font-size: 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* Form Styles */
.registration-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group select {
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6b7d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.btn-submit {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.875rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 0.25rem;
    transition: all 0.25s ease;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Scrollbar */
.form-container::-webkit-scrollbar {
    width: 6px;
}

.form-container::-webkit-scrollbar-track {
    background: transparent;
}

.form-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Success Page */
body.success-page {
    background: var(--bg-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.success-content {
    text-align: center;
    max-width: 400px;
}

.success-icon {
    width: 72px;
    height: 72px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
}

.success-content h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.success-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-home {
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.875rem 2rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-home:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;
        background: var(--bg-main);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 1.5rem 1.5rem;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 199;
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 198;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nav-menu.open ~ .nav-overlay {
        display: block;
        opacity: 1;
    }

    .dept-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .dept-card.dept-right .dept-image-wrap,
    .dept-card.dept-right .dept-content {
        order: unset;
    }

    .dept-image {
        height: 260px;
    }

    .dept-content h3 {
        font-size: 1.35rem;
    }
}

@media (max-width: 768px) {
    .apply-layout {
        flex-direction: column;
        max-height: 95vh;
    }

    .apply-image-side {
        flex: 0 0 auto;
        max-height: 35vh;
    }

    .apply-intro-image {
        min-height: 200px;
        max-height: 35vh;
    }

    .form-section .form-container {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 1rem;
    }

    .logo-img {
        height: 36px;
    }

    .brand-text {
        font-size: 0.85rem;
    }

    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: 5rem 1rem 3rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .departments {
        padding: 3rem 1rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .dept-image {
        height: 220px;
    }

    .cta-section {
        padding: 3rem 1rem;
    }

    .form-section {
        padding: 3rem 0.75rem 1.5rem;
        align-items: flex-start;
    }

    .apply-image-side {
        max-height: 28vh;
    }

    .apply-intro-image {
        min-height: 160px;
    }

    .form-section .form-container,
    .form-container {
        padding: 1.25rem;
        max-height: none;
    }

    .form-header h2 {
        font-size: 1.2rem;
    }

    .form-header p {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.65rem 0.9rem;
        font-size: 16px;
    }

    .success-content h1 {
        font-size: 1.5rem;
    }

    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
}
