:root {
    --primary: #14b8a6;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.3);
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-bg-solid: #1e293b;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
    --spacing-content: 2rem;
    --spacing-header: 4rem;
    --spacing-nav: 8rem;
    --blur-amt: 12px;
}

html {
    scrollbar-gutter: stable;
}

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

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

/* Background Decoration */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* UI Components */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--primary);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
    margin-top: 1rem;
}

.btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amt));
    -webkit-backdrop-filter: blur(var(--blur-amt));
    border: 1px solid var(--glass-border);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amt));
    -webkit-backdrop-filter: blur(var(--blur-amt));
    border-bottom: 1px solid var(--glass-border);
    z-index: -1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #14b8a6, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.logo img {
    height: 24px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3));
}

nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

nav li {
    position: relative;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 0.5rem 0;
    display: block;
}

nav a:hover,
nav a.active {
    color: var(--text-main);
}

/* Dropdown Menu */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amt));
    -webkit-backdrop-filter: blur(var(--blur-amt));
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    min-width: 200px;
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

nav li:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    padding-left: 1.75rem;
}

.dropdown-content a.active {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

/* Layout */
main {
    margin-top: var(--spacing-nav);
    padding: 0 var(--spacing-content) var(--spacing-header);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Header Sections */
header {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

#hero-heading {
    background: linear-gradient(135deg, #14b8a6 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.subtitle-group span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtitle-group span:not(:last-child)::after {
    content: "•";
    color: rgba(255, 255, 255, 0.2);
}

hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 1.5rem 0;
}

.coordinator-statement,
.lab-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.coordinator-statement {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 2rem;
}

.lab-description {
    max-width: 800px;
    margin-bottom: 0.75rem;
    text-align: justify;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-main);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.social-links svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.social-links a:hover svg {
    transform: scale(1.1);
}

.social-links span {
    white-space: nowrap;
}


.subtitle-group .subtitle {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.professional-section {
    margin-top: 2rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: fixed;
}

table th,
table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

/* Column-specific widths for course tables */
table th:nth-child(1),
table td:nth-child(1) {
    width: 15%;
}

table th:nth-child(2),
table td:nth-child(2) {
    width: 50%;
}

table th:nth-child(3),
table td:nth-child(3) {
    width: 15%;
}

table th:nth-child(4),
table td:nth-child(4) {
    width: 20%;
}

table th {
    background: rgba(16, 185, 129, 0.1);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

table td {
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: top;
}

table tbody tr {
    transition: background 0.2s ease;
}

table tbody tr:hover {
    background: rgba(16, 185, 129, 0.05);
}

table tbody tr:last-child td {
    border-bottom: none;
}

table a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

table a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}


/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.6);
}

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

.card-icon {
    width: 1.2em;
    height: 1.2em;
    color: var(--primary);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.card:hover .card-icon {
    transform: scale(1.1);
    color: var(--text-main);
}

.card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-header h3 {
    margin-bottom: 0;
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
}

.card.small {
    padding: 1.25rem;
    border-radius: 1rem;
}

.card.small h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card.small p {
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Expandable Sections */
details {
    border-radius: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease;
}

details[open] {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.9);
}

summary {
    padding: 1.25rem 1.75rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    transition: color 0.3s ease;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

summary:hover {
    color: var(--primary);
}

.details-content {
    padding: 0 1.75rem 1.75rem;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.8;
}

.details-content h4 {
    font-size: 0.95rem;
    color: var(--text-main);
    margin: 1rem 0 0.25rem;
    font-weight: 600;
}

.details-content h4:first-child {
    margin-top: 0;
}

.details-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.details-content p strong {
    color: var(--text-main);
    font-weight: 500;
}

.details-content ol {
    margin-top: 1rem;
    padding-left: 1.25rem;
    list-style-position: outside;
}

.details-content li {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.details-content li:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 24px;
    }

    main {
        margin-top: 6rem;
    }

    h1 {
        font-size: 2.25rem;
    }

    nav ul {
        display: flex;
        gap: 1.25rem;
        width: 100%;
        justify-content: center;
        padding-bottom: 0.5rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }
}

/* Footer styling */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 1rem 2rem;
    z-index: 1000;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(var(--blur-amt));
    -webkit-backdrop-filter: blur(var(--blur-amt));
    border-top: 1px solid var(--glass-border);
    z-index: -1;
}

/* Add padding to main to prevent content being hidden by footer */
main {
    padding-bottom: 5rem;
}

/* Facilities Page Styles */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 4rem;
}

.category-header {
    margin-top: 3rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-header:first-of-type {
    margin-top: 2rem;
}

.facility-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.image-container {
    width: 100%;
    height: 250px;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem;
}

.facility-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.facility-info {
    padding: 1.5rem;
    flex-grow: 1;
}

.facility-info h3 {
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.facility-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    text-align: justify;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

@media (max-width: 768px) {
    .facilities-grid {
        grid-template-columns: 1fr;
    }
}

.justified-text {
    text-align: justify;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}