:root {
    /* Color Palette */
    --color-bg: #ffffff; /* White */
    --color-bg-alt: #ffffff; /* Slate 50 */
    --color-text-main: #0f172a; /* Slate 900 */
    --color-text-muted: #000000; /* Slate 500 */
    --color-accent: #1D4999; /* Blue 600 */
    --color-accent-hover: #EE6C4D; /* Blue 700 */
    --color-border: #1D4999; /* Slate 200 */
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Constants */
    --nav-height: 70px;
    --container-width: 1200px;
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
}

@font-face {
    font-family: 'HUFS Font';
    src: url('fonts/malgunsl.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

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

body {
    font-family: 'HUFS Font', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-underline {
    color: var(--color-text-main);
    border-bottom: 1px solid var(--color-text-main);
    transition: color 0.2s ease, border-color 0.2s ease;
}

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

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

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

section {
    padding: var(--spacing-lg) 0;
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    background: rgb(255, 255, 255, 0.5);
    backdrop-filter: blur(0px); /* 블러 일단은 0으로 처리 */
    border-bottom: 1px solid var(--color-border);
    position: fixed; /* Follows on scroll */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.navbar .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-main);
    z-index: 1001;
    position: relative; /* Ensure z-index works */
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-bg);
        flex-direction: column;
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid var(--color-border);
        gap: 0;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        padding: 1rem var(--spacing-md);
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f1f5f9;
        font-size: 1.1rem;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
}

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

.brand-logo {
    height: calc(var(--nav-height) * 0.98); 
    width: auto;
    display: block;
    padding: 0; /* Full height as requested */
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-weight: 700;
    font-size: 0.95rem;
    color: rgb(29, 73, 153); /* Base color */
}

.nav-links a:hover,
.nav-links a.active {
    color: rgb(238, 108, 77); /* Active/Hover color */
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 0; /* Content goes under transparent header */
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}



.slide.active {
    opacity: 1;
}

/* Hero Text Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-text-box {
    background: rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0;
    padding: 0.5rem 3.5rem;
    text-align: center;
    box-shadow: none;
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.90;
}

.hero-text-box h1 {
    font-size: 0.7rem;
    font-weight: 100;
    color: #fff !important;
    margin: 4rem auto 0 auto;
    line-height: 1;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 0.90;
}

.hero-text-box p {
    font-size: 1.5rem;
    color: #fff !important;
    font-weight: 150;
    margin: -2.0rem auto 0 auto;
    opacity: 0.85;
}

/* Responsive Hero Text */
@media (max-width: 768px) {
    .hero-text-box {
        padding: 2rem 1.5rem;
    }

    .hero-text-box h1 {
        font-size: 2rem;
    }

    .hero-text-box p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-text-box {
        padding: 1.5rem 1rem;
        border-width: 2px;
    }

    .hero-text-box h1 {
        font-size: 1.5rem;
    }

    .hero-text-box p {
        font-size: 1rem;
    }
}


.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(to right, #0f172a, #475569);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    max-width: 600px;
}

.cta-button {
    display: inline-block;
    padding: 12px 32px;
    background-color: var(--color-accent);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.cta-button:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    color: white;
}

/* Highlight Section */
.highlight-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none; /* Remove underline from link */
    color: inherit; /* Inherit text color */
    transition: transform 0.2s ease; /* Add hover effect */
}

.highlight-item:hover {
    transform: translateY(-4px); /* Slight lift on hover */
}

.highlight-item:hover .highlight-conf {
    color: rgb(238, 108, 77); /* Requested color on hover */
    transition: color 0.3s ease;
}

.highlight-img {
    width: 100%;
    height: auto; /* Allow natural height to prevent cropping */
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--color-border);
}

.highlight-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1; /* Pushes the conference tag down */
}

.highlight-conf {
    color: var(--color-accent); /* Optional: use accent color or keep it text-main */
    margin-top: 0.5rem;
}

/* Section Headers */
h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    line-height: 1.0;
}

h2 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

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

.card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
    border-color: var(--color-accent);
}

a.card:hover {
    transform: translateY(-4px);
}

.card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    color: var(--color-accent);
    font-weight: 700;
}

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

#research .card h3 {
    font-size: 1.1rem;
    color: var(--color-text-main);
}

#research .card p {
    font-size: 0.95rem;
}

/* For research.html specifically - separate class for layout isolation */
.research-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}

.research-card:hover {
    border-color: var(--color-accent);
}

.research-card h3 {
    font-size: 1.1rem;
    color: var(--color-text-main);
    margin-bottom: 1rem;
}

.research-card p {
    font-size: 0.95rem;
}

/* Footer */
footer {
    background-image: url('background-image/1.JPG');
    background-size: cover;
    background-position: center;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
    color: white;
    font-weight: 500;
}

footer .container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start; /* Or center if preferred */
    gap: var(--spacing-lg);
    text-align: left;
}

.footer-content {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    margin-top: 4px; /* Align with text baseline roughly */
}

.footer-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.hufs-brand {
    font-weight: 500; /* Adjust weight if needed */
}

.hufs-cap {
    font-size: 1.5em; /* 3:2 ratio relative to base text (1em) */
    vertical-align: baseline;
}

/* Publications List */
.pub-item {
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--spacing-md);
}

.pub-item:last-child {
    border-bottom: none;
}

.pub-year {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-main);
    display: block;
    margin-top: var(--spacing-lg);
}

.pub-year:first-of-type {
    margin-top: var(--spacing-md);
}

.pub-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
    width: fit-content; /* Ensure hover only triggers on text width */
    transition: color 0.3s ease; /* Smooth transition */
}

.pub-title:hover {
    color: rgb(238, 108, 77); /* Requested color on hover */
}

.pub-authors {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.pub-meta {
    font-size: 0.85rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-decoration: none; /* Ensure links don't have underline */
    transition: opacity 0.2s ease;
}

.pub-meta:hover {
    opacity: 0.8; /* Subtle hover effect for links */
}

/* People Grid Override */
.people-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.person-card {
    text-align: center;
}

.person-img {
    width: 120px;
    height: 120px;
    border-radius: 0;
    background-color: var(--color-border);
    margin: 0 auto var(--spacing-sm);
    object-fit: cover;
    border: 2px solid var(--color-bg-alt);
    box-shadow: 0 0 0 2px var(--color-border);
}

.person-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.person-role {
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.person-desc, .person-email {
    text-align: left;
    margin-top: 5px;
}

/* Research Interest Tags */
.interest-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.80rem; /* Increased from 0.60rem */
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Expanded Pastel Palette - CSS Only Cycle */
.interest-tag:nth-of-type(10n+1) { background-color: #e3f2fd; color: #1565c0; } /* Blue */
.interest-tag:nth-of-type(10n+2) { background-color: #e8f5e9; color: #2e7d32; } /* Green */
.interest-tag:nth-of-type(10n+3) { background-color: #f3e5f5; color: #7b1fa2; } /* Purple */
.interest-tag:nth-of-type(10n+4) { background-color: #fff3e0; color: #ef6c00; } /* Orange */
.interest-tag:nth-of-type(10n+5) { background-color: #ffebee; color: #c62828; } /* Red */
.interest-tag:nth-of-type(10n+6) { background-color: #fce4ec; color: #880e4f; } /* Pink */
.interest-tag:nth-of-type(10n+7) { background-color: #e0f2f1; color: #00695c; } /* Teal */
.interest-tag:nth-of-type(10n+8) { background-color: #e8eaf6; color: #283593; } /* Indigo */
.interest-tag:nth-of-type(10n+9) { background-color: #fff8e1; color: #ff8f00; } /* Amber */
.interest-tag:nth-of-type(10n+10) { background-color: #e0f7fa; color: #006064; } /* Cyan */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
}

.modal-content {
    background-color: rgba(255, 255, 255);
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid var(--color-border);
    width: 80%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.close-modal {
    color: var(--color-text-muted);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

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

.modal-body {
    padding-top: 1rem;
    text-align: center;
    font-size: 1.5rem; /* Increased from 1.1rem */
    font-weight: 500;
}

.research-area + .research-area {
    margin-top: var(--spacing-lg);
}

.research-topic {
    flex: 1;
    text-align: left;
}

.research-topic ul {
    list-style: none;
    padding-left: 0;
}

.research-topic + .research-topic {
    margin-top: 0;
    padding-top: 0;
    padding-left: 3rem;
}

@media (max-width: 768px) {
    .research-card {
        flex-direction: column;
        gap: 2rem;
    }

    .research-topic + .research-topic {
        padding-left: 0;
        padding-top: 2rem;
    }
}
