:root {
    --gold: #d4af37;
    --emerald: #00796b;
    --deep-blue: #1a237e;
    --charcoal: #2c3e50;
    --cream: #f5f5dc;
    --ivory: #fffdf5;
    --white: #ffffff;
    --shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    --radius-lg: 32px;
    --radius-md: 18px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
    min-height: 100vh;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.pattern-overlay {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(212, 175, 55, 0.15) 0, transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(0, 121, 107, 0.15) 0, transparent 35%),
        radial-gradient(circle at 40% 75%, rgba(26, 35, 126, 0.12) 0, transparent 40%),
        /* Islamic geometric pattern */
        repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.025) 0px, rgba(212, 175, 55, 0.025) 1px, transparent 1px, transparent 60px),
        repeating-linear-gradient(-45deg, rgba(0, 121, 107, 0.02) 0px, rgba(0, 121, 107, 0.02) 1px, transparent 1px, transparent 60px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 100px 100px, 100px 100px;
    pointer-events: none;
    z-index: -1;
}

/* Paper grain overlay for depth */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

.shell {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
    position: relative;
}

/* Diagonal separators between sections */
.section:not(:first-child)::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom right, var(--cream), transparent);
    z-index: 0;
}

.section.alt::before {
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.85), transparent);
}

.section .shell {
    position: relative;
    z-index: 1;
}

.section.alt {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
}

.section-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-heading.align-left {
    text-align: left;
}

.section-cta {
    margin-top: 2.5rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.eyebrow {
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--emerald);
    margin-bottom: 0.8rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-left: 2rem;
}

.eyebrow::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--emerald));
}

.section-heading .eyebrow::after {
    content: '';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--emerald), var(--gold));
}

h1,
h2,
h3 {
    font-family: 'Amiri', 'Scheherazade New', serif;
    color: var(--deep-blue);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    position: relative;
}

h2 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 0.8rem;
    position: relative;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.primary-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    z-index: 99;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.logo span {
    font-family: 'Scheherazade New', serif;
    font-size: 1.4rem;
    color: var(--deep-blue);
    font-weight: 600;
    letter-spacing: 0.03em;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    font-weight: 500;
}

.nav-menu a {
    position: relative;
    padding-bottom: 0.3rem;
}

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

.nav-menu a:hover::after,
.nav-menu a:focus-visible::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--deep-blue);
}

.site-header {
    padding: 0 0 4rem;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.08), rgba(0, 121, 107, 0.08));
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    width: min(1200px, 92%);
    margin: 0 auto;
    padding-top: 0.5rem;
    position: relative;
}

/* Diagonal separator for hero */
.hero-grid::before {
    content: '';
    position: absolute;
    top: -4rem;
    left: -2rem;
    right: -2rem;
    height: 200px;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.08), rgba(0, 121, 107, 0.08));
    transform: skewY(-2deg);
    z-index: -1;
}

.hero-text .hero-lede {
    margin: 1.5rem 0 2rem;
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(44, 62, 80, 0.85);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn.primary {
    background: linear-gradient(135deg, var(--gold), #c9a030);
    color: var(--charcoal);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3), 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.5);
    position: relative;
    overflow: hidden;
}

.btn.primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn.primary:hover::before {
    opacity: 1;
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.4), 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn.ghost {
    border: 2px solid var(--gold);
    color: var(--deep-blue);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn.ghost::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn.ghost:hover::before {
    opacity: 1;
}

.btn.ghost:hover {
    transform: translateY(-3px);
    border-color: var(--emerald);
    box-shadow: 0 8px 20px rgba(0, 121, 107, 0.2);
}

.hero-metrics {
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(10px);
}

.hero-metrics div {
    text-align: center;
    padding: 0.5rem;
    border-right: 1px solid rgba(212, 175, 55, 0.2);
}

.hero-metrics div:last-child {
    border-right: none;
}

.hero-metrics span {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.3rem;
    font-family: 'Amiri', serif;
}

.hero-metrics p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--deep-blue);
}

.hero-media {
    display: grid;
    gap: 1.5rem;
}

.portrait-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.15), 0 5px 20px rgba(26, 35, 126, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.2);
    position: relative;
}

.portrait-card::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-lg);
    pointer-events: none;
    z-index: 1;
}

.portrait-card img {
    position: relative;
    z-index: 0;
}

.portrait-card figcaption {
    padding: 1.5rem;
    font-style: italic;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.08), rgba(212, 175, 55, 0.05));
    position: relative;
    z-index: 1;
}

.quote-carousel {
    background: linear-gradient(135deg, var(--deep-blue), rgba(26, 35, 126, 0.95));
    color: var(--white);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 40px rgba(26, 35, 126, 0.3);
}

.quote-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--emerald), var(--gold));
}

.quote-carousel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(212, 175, 55, 0.2), transparent 50%);
    pointer-events: none;
}

/* Islamic decorative corners */
.quote-carousel .decorative-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(212, 175, 55, 0.5);
}

.quote-carousel .decorative-corner.top-left {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
}

.quote-carousel .decorative-corner.bottom-right {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
}

.quote-text {
    font-size: 1.1rem;
    font-family: 'Scheherazade New', serif;
}

.quote-author {
    margin-top: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-card,
.award-card,
.stat-grid article,
.pillars article,
.conference-cards article,
.publication-grid article {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(212, 175, 55, 0.1);
    border-top: 4px solid var(--gold);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.feature-card::before,
.award-card::before,
.stat-grid article::before,
.pillars article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.03), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.feature-card:hover::before,
.award-card:hover::before,
.stat-grid article:hover::before,
.pillars article:hover::before {
    opacity: 1;
}

.feature-card:hover,
.award-card:hover,
.stat-grid article:hover,
.pillars article:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.2), 0 8px 20px rgba(26, 35, 126, 0.15);
}

/* Decorative corner elements */
.feature-card::after,
.award-card::after,
.stat-grid article::after,
.pillars article::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--emerald));
    opacity: 0.08;
    border-radius: 50%;
    pointer-events: none;
}

.award-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: center;
}

.split.reverse {
    direction: rtl;
}

.split.reverse > * {
    direction: ltr;
}

.split > div:first-child {
    text-align: center;
}

.split > div:first-child .btn {
    margin-top: 1.5rem;
}

.media-panel img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.icon-list {
    list-style: none;
    margin: 1.5rem 0;
}

.icon-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.icon-list i {
    color: var(--emerald);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.timeline.vertical {
    grid-template-columns: 1fr;
    border-left: 3px solid rgba(212, 175, 55, 0.5);
    padding-left: 1.5rem;
}

.timeline.vertical article {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline.vertical article::before {
    content: '';
    position: absolute;
    left: -1.85rem;
    top: 0.3rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--cream);
}

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

.gallery-grid.full figure {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    font-size: 0.85rem;
}

.gallery-grid img {
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.gallery-grid img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(0, 121, 107, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-sm);
}

.gallery-grid img:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}

/* Staggered entrance animations */
.gallery-grid img:nth-child(1) { animation-delay: 0.1s; }
.gallery-grid img:nth-child(2) { animation-delay: 0.2s; }
.gallery-grid img:nth-child(3) { animation-delay: 0.3s; }
.gallery-grid img:nth-child(4) { animation-delay: 0.4s; }
.gallery-grid img:nth-child(5) { animation-delay: 0.5s; }
.gallery-grid img:nth-child(6) { animation-delay: 0.6s; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.contact-grid article {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    color: var(--deep-blue);
}

.site-footer {
    background: var(--deep-blue);
    color: var(--white);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

.site-footer a {
    color: var(--gold);
    display: inline-block;
    margin-top: 0.6rem;
}

#backToTop {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    border: none;
    background: var(--emerald);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 0 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0, 121, 107, 0.15));
}

.page-hero__content {
    width: min(900px, 90%);
    margin: 0 auto;
    padding-top: 0.5rem;
}

.page-shell {
    width: min(1100px, 92%);
    margin: 3rem auto;
    display: grid;
    gap: 2rem;
}

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

.info-list {
    list-style: none;
    line-height: 1.8;
}

.info-list span {
    font-weight: 600;
    color: var(--deep-blue);
}

.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.award-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.award-list.two-column {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.citation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.publication-grid,
.conference-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.article-list {
    list-style: disc;
    padding-left: 1.5rem;
}

.contact-grid.page-shell {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form button[type="submit"] {
    justify-self: center;
    margin-top: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    font-family: inherit;
}

.form-note {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    color: rgba(44, 62, 80, 0.8);
}

#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    z-index: 200;
}

#lightbox[hidden] {
    display: none;
}

#lightbox img {
    max-width: 80vw;
    max-height: 70vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-caption {
    color: var(--white);
    font-family: 'Amiri', serif;
}

