/* ===== CSS Variables ===== */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #64748b;
    --color-accent: #0ea5e9;
    --color-success: #22c55e;
    --color-youtube: #ff0000;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --transition: 0.2s ease;
    --container-max: 1200px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
    color: var(--color-primary-dark);
}

ul {
    list-style: none;
}

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

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 3vw, 1.5rem); }

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-intro {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.125rem;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

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

.logo:hover {
    color: var(--color-text);
}

.logo img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 1.125rem;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-list a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    position: relative;
}

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

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

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

.nav-highlight {
    background: var(--color-primary);
    color: #fff !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
}

.nav-highlight:hover {
    background: var(--color-primary-dark);
    color: #fff !important;
}

.nav-highlight::after {
    display: none !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* ===== Notice Banner ===== */
.notice-banner {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 0.75rem 0;
    text-align: center;
}

.notice-banner p {
    margin: 0;
    font-size: 0.9375rem;
}

.notice-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.notice-banner a:hover {
    color: #fef3c7;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    color: #fff;
    margin-bottom: 1rem;
}

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

.hero-description {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.125rem;
    opacity: 0.9;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-primary {
    background: #fff;
    color: var(--color-primary);
}

.btn-primary:hover {
    background: #f1f5f9;
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    color: #fff;
}

.btn-youtube {
    background: var(--color-youtube);
    color: #fff;
}

.btn-youtube:hover {
    background: #cc0000;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.about-content p {
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
}

.about-content h3 {
    margin: 2rem 0 1rem;
}

.feature-list {
    display: grid;
    gap: 0.75rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.feature-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-success);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.about-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-card img {
    width: 100%;
}

.card-caption {
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* ===== Video Section ===== */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-cta {
    text-align: center;
}

/* ===== Content Grid ===== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.content-card {
    background: var(--color-bg);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.content-card p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

/* ===== PubMed Feed ===== */
.pubmed-feed {
    max-width: 800px;
    margin: 0 auto;
}

.pubmed-feed .loading {
    text-align: center;
    color: var(--color-text-light);
    padding: 2rem;
}

.pubmed-article {
    background: var(--color-bg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-primary);
}

.pubmed-article h4 {
    margin-bottom: 0.5rem;
    font-size: 1.0625rem;
}

.pubmed-article h4 a {
    color: var(--color-text);
}

.pubmed-article h4 a:hover {
    color: var(--color-primary);
}

.pubmed-article .authors {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.pubmed-article .journal {
    font-size: 0.8125rem;
    color: var(--color-secondary);
    font-style: italic;
}

.feed-fallback {
    text-align: center;
    padding: 2rem;
}

.feed-fallback a {
    font-weight: 600;
}

/* ===== Projects Grid ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: block;
    background: var(--color-bg-alt);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    transition: all var(--transition);
}

.project-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.project-card p {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.project-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9375rem;
}

.project-featured {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border: none;
}

.project-featured h3,
.project-featured p,
.project-featured .project-link {
    color: #fff;
}

.project-featured .project-link {
    opacity: 0.9;
}

/* ===== Articles Grid ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.article-card {
    display: block;
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    border-left: 4px solid var(--color-primary);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--color-accent);
}

.article-card h3 {
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.article-card:hover h3 {
    color: var(--color-primary);
}

.article-card p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    margin: 0;
}

.article-tag {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Gallery Grid ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

/* ===== Instructors Grid ===== */
.instructors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Author Section ===== */
.section-author {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.section-author h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.author-card {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--color-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.author-card h3 {
    margin-bottom: 0.25rem;
}

.author-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h2 {
    margin-bottom: 0.25rem;
}

.author-title {
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.author-bio {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-bg-alt);
    border-radius: 50%;
    color: var(--color-text);
    transition: all var(--transition);
}

.social-links a:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-text);
    color: #fff;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
}

.footer-links h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

.footer-bottom p {
    margin-bottom: 0.25rem;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card {
        max-width: 400px;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list li {
        border-bottom: 1px solid var(--color-border);
    }

    .nav-list a {
        display: block;
        padding: 1rem 0;
    }

    .nav-list a::after {
        display: none;
    }

    .nav-highlight {
        display: inline-block;
        margin-top: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding: 3rem 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .section {
        padding: 3rem 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .author-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .author-photo {
        width: 120px;
        height: 120px;
    }

    .social-links {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul {
        align-items: center;
    }
}

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

    .logo-tagline {
        display: none;
    }

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

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

/* ===== Print Styles ===== */
@media print {
    .header, .nav-toggle, .hero-buttons, .video-container,
    .youtube-cta, .social-links, .footer {
        display: none;
    }

    .section {
        padding: 1rem 0;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}
