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

:root {
    --primary: #1a1a2e;
    --primary-dark: #0f3460;
    --accent: #3498db;
    --text: #2c3e50;
    --text-light: #5a6c7d;
    --bg-page: #fbf7ef;
    --bg-surface: #ffffff;
    --bg-soft: #f6f2e8;
    --border: #ebe3d6;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    background-color: var(--bg-page);
}

.hero {
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-soft) 55%, var(--bg-page) 100%);
    color: var(--text);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://athdgc.github.io/assets/images/historical-manuscripts.svg') center/cover;
    opacity: 0.07;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(52, 152, 219, 0.08) 0%, transparent 70%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 200;
    margin-bottom: 1.5rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero p {
    font-size: 1.4rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 1rem;
    font-weight: 300;
}

.hero .hero-credit {
    font-size: 0.9rem;
    opacity: 0.65;
    margin-top: 1.5rem;
}

.hero .hero-credit a {
    color: rgba(26, 26, 46, 0.9);
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 26, 46, 0.25);
}

.hero .hero-credit a:hover {
    border-bottom-color: rgba(26, 26, 46, 0.6);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: transparent;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 300;
}

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

.affiliations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.affiliation-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--accent);
    transition: transform 0.3s, box-shadow 0.3s;
}

.affiliation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.affiliation-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.affiliation-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.affiliation-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.affiliation-card a:hover {
    text-decoration: underline;
}

.research-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.research-block {
    text-align: center;
}

.research-block h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 300;
}

.research-block p {
    color: var(--text-light);
    line-height: 1.6;
}

.research-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.education-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
}

.education-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.education-card h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.education-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.education-card .highlight {
    background: var(--bg-soft);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.site-card {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border);
}

.site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.site-card-header {
    padding: 1.5rem;
    background: var(--bg-soft);
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}

.site-card-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.site-card-header .tag {
    font-size: 0.85rem;
    opacity: 0.85;
}

.site-card-body {
    padding: 1.5rem;
}

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

.site-card-body .url {
    display: block;
    margin-top: 1rem;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

footer {
    background: var(--bg-page);
    color: var(--text);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

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

.hosted-by {
    background: transparent;
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.hosted-by p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.hosted-by a {
    color: var(--primary);
    font-weight: 600;
}

/* Logo Section */
.logos-section {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-surface);
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-item {
    text-align: center;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.logo-img.logo-uoa {
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.logo-img.logo-elidek {
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.logo-img.logo-athdgc {
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.logo-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Emoji Support */
.emoji {
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
}

/* Improved Mobile Layout */
@media (max-width: 768px) {
    .logo-grid {
        gap: 2rem;
    }

    .logo-item {
        max-width: 200px;
        padding: 1rem;
    }

    .logo-img {
        height: 60px;
    }
}

.logo-item img {
    height: 120px;
    width: auto;
    margin-bottom: 0.5rem;
    filter: grayscale(0%);
    transition: transform 0.3s, filter 0.3s;
}

.logo-item img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.logo-item a {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.logo-item a:hover {
    transform: translateY(-2px);
}

.logo-item p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

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

/* Journal Section Styles */
.journal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.journal-card {
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.journal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.journal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.journal-header h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.journal-header h4 {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
}

.journal-content {
    padding: 2rem;
}

.journal-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 2rem;
}

.journal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-soft);
    border-radius: 8px;
}

.detail-item.single-line {
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: thin;
}

.detail-item i {
    color: var(--primary);
    font-size: 1.1rem;
}

.detail-item span {
    font-size: 0.95rem;
    color: var(--text);
}

.journal-highlights {
    margin-bottom: 2rem;
}

.journal-highlights h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.journal-highlights ul {
    list-style: none;
    padding: 0;
}

.journal-highlights li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text);
}

.journal-highlights li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.journal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.journal-links h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    width: 100%;
    font-size: 1.1rem;
}

.journal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
}

.journal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
    text-decoration: none;
    color: white;
}

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

    .journal-links {
        flex-direction: column;
    }

    .journal-link {
        justify-content: center;
    }
}

.profile-section {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    border-radius: 12px;
}

.profile-heading {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.profile-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-page);
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.profile-link:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-link i {
    font-size: 1.5rem;
    color: var(--primary);
}

.profile-link span {
    font-size: 1.1rem;
    font-weight: 500;
}