/* 1. GLOBAL SETTINGS */

:root {
    --navy: #102a43;
    --navy-light: #173b57;
    --blue: #285878;
    --gold: #e9ad51;
    --gold-light: #ffd58a;
    --white: #ffffff;
    --background: #f5f7fa;
    --text: #243447;
    --muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 15px 40px rgba(16, 42, 67, 0.10);
    --radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--background);
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

section {
    padding: 80px 0;
}

section h2 {
    color: var(--navy);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.25;
    margin-bottom: 25px;
}

/* 2. PAGE ENTRANCE ANIMATION */

@keyframes pageReveal {
    from {
        opacity: 0;
        transform: translateY(25px);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

main,
.page-content {
    animation: pageReveal 0.9s cubic-bezier(.2, .8, .2, 1) both;
}

/* 3. ANIMATED HEADER */

header,
.site-header {
    position: relative;
    z-index: 2;
    color: var(--white);
    background: linear-gradient(
        120deg,
        var(--navy),
        var(--navy-light),
        var(--blue),
        var(--navy)
    );
    background-size: 300% 300%;
    animation: gradientFlow 14s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* 4. NAVIGATION */

nav {
    width: min(1120px, 90%);
    margin: auto;
    padding: 20px 0;
}

nav ul,
.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    list-style: none;
}

nav a,
.nav-links a {
    position: relative;
    display: inline-block;
    padding: 5px 0;
    color: var(--white);
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a::after,
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s ease;
}

nav a:hover,
.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-light);
}

nav a:hover::after,
.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* 5. HERO SECTION */

.hero,
.flex-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

.hero {
    position: relative;
    isolation: isolate;
    min-height: 520px;
    padding: 70px 5%;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    width: 350px;
    height: 350px;
    top: 10%;
    left: -100px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(233, 173, 81, 0.22),
        rgba(233, 173, 81, 0.04) 48%,
        transparent 72%
    );
    filter: blur(18px);
    animation: ambientDrift 9s ease-in-out infinite alternate;
}

.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    width: 280px;
    height: 280px;
    right: -80px;
    bottom: -90px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(40, 88, 120, 0.18),
        transparent 70%
    );
    animation: ambientDrift 12s ease-in-out infinite alternate-reverse;
}

@keyframes ambientDrift {
    from {
        transform: translate(0, 0) scale(0.9);
    }

    to {
        transform: translate(45px, -25px) scale(1.12);
    }
}

.hero-content,
.hero .text-container,
.text-container {
    flex: 1;
    min-width: 0;
}

.hero h1 {
    margin-bottom: 20px;
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    line-height: 1.12;
    animation: titleReveal 1s 0.15s both;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateX(-35px);
        letter-spacing: 3px;
    }

    to {
        opacity: 1;
        transform: translateX(0);
        letter-spacing: normal;
    }
}

.hero p {
    max-width: 650px;
    font-size: 1.08rem;
    animation: pageReveal 0.9s 0.3s both;
}

/* 6. FLOATING PORTRAIT */

.hero-image,
.hero > img {
    flex: 0 1 330px;
    width: min(330px, 100%);
    max-height: 440px;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    animation:
        portraitEntrance 1.1s 0.2s both,
        portraitFloat 5s 1.3s ease-in-out infinite;
    transition:
        box-shadow 0.4s ease,
        border-radius 0.4s ease;
}

@keyframes portraitEntrance {
    from {
        opacity: 0;
        transform: translateY(35px) scale(0.9);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes portraitFloat {
    0%, 100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -12px;
    }
}

.hero-image:hover,
.hero > img:hover {
    box-shadow:
        0 0 15px #e9ad5170,
        0 0 35px #28587860,
        0 20px 45px #102a4330;
    border-radius: 28px;
}

/* 7. PREMIUM BUTTONS */

.button,
.cta-button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 10px 8px 5px 0;
    padding: 13px 24px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 50px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.3s cubic-bezier(.2, .8, .2, 1),
        box-shadow 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}

.button::before,
.cta-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        110deg,
        transparent 20%,
        #ffffff99 48%,
        transparent 75%
    );
    transform: translateX(-130%);
    transition: transform 0.65s ease;
}

.button:hover::before,
.cta-button:hover::before {
    transform: translateX(130%);
}

.button:hover,
.cta-button:hover {
    transform: translateY(-4px) scale(1.025);
    box-shadow: 0 12px 25px #102a4330;
}

.button:active,
.cta-button:active {
    transform: translateY(-1px) scale(0.98);
}

.button.secondary,
.cta-button.secondary {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.65);
}

.button.secondary:hover,
.cta-button.secondary:hover {
    color: var(--navy);
    background: var(--white);
}

/* 8. ABOUT SECTION */

.about,
#about {
    background: var(--white);
}

.about .flex-container,
#about .flex-container {
    width: min(1120px, 90%);
    margin: auto;
}

.about img,
#about img {
    flex: 0 1 250px;
    width: 250px;
    border-radius: var(--radius);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about img:hover,
#about img:hover {
    transform: translateY(-7px) rotate(1deg);
    box-shadow: var(--shadow);
}

/* 9. SECTION TITLE ANIMATION */

.section-title {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 35px;
    text-align: center;
}

.section-title::after {
    content: "";
    display: block;
    width: 65px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--gold), var(--blue));
    transform-origin: center;
    animation: underlineGrow 1s 0.3s both;
}

@keyframes underlineGrow {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* 10. CARDS */

.card,
.book-card,
.ppt-card {
    position: relative;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 5px 20px #102a430a;
    animation: cardReveal 0.7s both;
    transition:
        transform 0.4s cubic-bezier(.2, .8, .2, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}

.card:nth-child(1),
.book-card:nth-child(1) {
    animation-delay: 0.08s;
}

.card:nth-child(2),
.book-card:nth-child(2) {
    animation-delay: 0.16s;
}

.card:nth-child(3),
.book-card:nth-child(3) {
    animation-delay: 0.24s;
}

.card:nth-child(4),
.book-card:nth-child(4) {
    animation-delay: 0.32s;
}

.card:nth-child(5),
.book-card:nth-child(5) {
    animation-delay: 0.40s;
}

.card:nth-child(6),
.book-card:nth-child(6) {
    animation-delay: 0.48s;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card:hover,
.book-card:hover,
.ppt-card:hover {
    transform: translateY(-7px);
    border-color: var(--gold);
    box-shadow: var(--shadow);
}

.card h3,
.book-card h3,
.ppt-card h3 {
    color: var(--navy);
    margin-bottom: 12px;
}

/* 11. BOOK LIST */

.book-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: min(950px, 90%);
    margin: 30px auto;
}

.book-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 22px 24px;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 5px 18px #102a430a;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.book-link:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: var(--shadow);
}

.book-title {
    font-weight: 700;
}

.book-arrow {
    flex-shrink: 0;
    color: var(--blue);
    font-size: 1.3rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.book-link:hover .book-arrow {
    color: var(--gold);
    transform: translate(4px, -4px);
}

/* 12. GALLERY */

.gallery,
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: min(1100px, 90%);
    margin: 30px auto;
}

.gallery img,
.grid-container img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 24px #102a4314;
    animation: galleryReveal 0.8s both;
    transition:
        transform 0.5s cubic-bezier(.2, .8, .2, 1),
        box-shadow 0.5s ease,
        filter 0.5s ease;
}

.gallery img:nth-child(1),
.grid-container img:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery img:nth-child(2),
.grid-container img:nth-child(2) {
    animation-delay: 0.2s;
}

.gallery img:nth-child(3),
.grid-container img:nth-child(3) {
    animation-delay: 0.3s;
}

.gallery img:nth-child(4),
.grid-container img:nth-child(4) {
    animation-delay: 0.4s;
}

.gallery img:nth-child(5),
.grid-container img:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes galleryReveal {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery img:hover,
.grid-container img:hover {
    transform: translateY(-7px) scale(1.025);
    filter: saturate(1.15);
    box-shadow: 0 18px 35px #102a4330;
}

/* 13. PRESENTATIONS */

#my-presentations,
#my-work,
#books-byme {
    text-align: center;
}

.ppt-card {
    width: min(850px, 90%);
    margin: 25px auto;
    text-align: left;
}

.ppt-card h3:not(:first-child) {
    margin-top: 25px;
}

/* 14. FAQ ANIMATIONS */

details {
    width: min(900px, 90%);
    margin: 12px auto;
    padding: 18px 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

details:hover {
    border-color: var(--gold);
}

details[open] {
    border-color: var(--gold);
    box-shadow: 0 8px 25px #102a4314;
}

summary {
    color: var(--navy);
    font-weight: 700;
    cursor: pointer;
}

details p {
    margin-top: 15px;
    animation: faqReveal 0.35s ease both;
}

@keyframes faqReveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 15. CONTACT FORM */

.contact-form {
    width: min(650px, 90%);
    margin: 30px auto;
    padding: 30px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    margin: 8px 0 18px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px #2858781f;
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

/* 16. FOOTER */

footer,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    padding: 30px 5%;
    color: var(--white);
    background: var(--navy);
}

footer a,
.footer-links a,
.site-footer a {
    display: inline-block;
    color: var(--white);
    transition: color 0.25s ease, transform 0.25s ease;
}

footer a:hover,
.footer-links a:hover,
.site-footer a:hover {
    color: var(--gold-light);
    transform: translateY(-3px);
}

/* 17. KEYBOARD ACCESSIBILITY */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

/* 18. TABLET RESPONSIVENESS */

@media (max-width: 900px) {
    section {
        padding: 65px 0;
    }

    .hero,
    .flex-container {
        gap: 30px;
    }

    .hero-image,
    .hero > img {
        flex-basis: 280px;
        width: 280px;
    }

    .gallery,
    .grid-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery img,
    .grid-container img {
        height: 230px;
    }
}

/* 19. MOBILE RESPONSIVENESS */

@media (max-width: 600px) {
    section {
        padding: 50px 0;
    }

    nav {
        width: 92%;
        padding: 16px 0;
    }

    nav ul,
    .nav-links {
        gap: 12px 20px;
    }

    nav a,
    .nav-links a {
        font-size: 0.92rem;
    }

    .hero,
    .flex-container {
        flex-direction: column;
        text-align: center;
    }

    .hero {
        min-height: auto;
        padding: 55px 5%;
    }

    .hero-content,
    .hero .text-container,
    .text-container {
        width: 100%;
    }

    .hero h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .hero-image,
    .hero > img {
        flex: none;
        width: min(280px, 85%);
        max-height: 380px;
        margin-inline: auto;
    }

    .hero::before {
        width: 230px;
        height: 230px;
        left: -90px;
    }

    .book-list {
        grid-template-columns: 1fr;
    }

    .gallery,
    .grid-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery img,
    .grid-container img {
        height: auto;
        max-height: 360px;
    }

    .ppt-card {
        padding: 22px;
    }

    .button,
    .cta-button {
        padding: 12px 19px;
    }

    footer,
    .site-footer {
        gap: 16px;
        text-align: center;
    }
}

/* 20. REDUCED MOTION ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
main .hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    max-width: 1050px;
    margin: 0 auto;
}

/* Text alignment */
main .hero-content {
    flex: 1;
    min-width: 0;
    text-align: center;
}

main .hero-content h2 {
    margin-bottom: 24px;
    line-height: 1.4;
    text-align: left;
}

main .hero-content p {
    margin: 0 0 18px;
    line-height: 1.9;
    text-align: left;
}

/* Portrait alignment */
main .hero-image {
    flex: 0 1 280px;
    width: 280px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* Center hero buttons */
main .hero-content .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 12px 6px 8px;
    padding: 12px 22px;
    text-align: center;
    vertical-align: middle;
}

/* Academic profile grid */
.profile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 22px;
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
}

.profile-item {
    height: 100%;
    padding: 24px;
    text-align: left;
    border-radius: 14px;
}

.profile-item h3 {
    margin: 0 0 10px;
    line-height: 1.4;
}

.profile-item p {
    margin: 0;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* Center Professional Profiles heading and buttons */
main .section:has(> .button) {
    text-align: center;
}

main .section > .section-title {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

main .section > .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 8px 6px;
    text-align: center;
}

/* Consistent section spacing */
main .section {
    padding-top: 45px;
    padding-bottom: 45px;
}

/* Mobile responsive layout */
@media (max-width: 700px) {

    main .hero {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        text-align: center;
    }

    main .hero-content {
        width: 100%;
        text-align: center;
    }

    main .hero-content h2,
    main .hero-content p {
        text-align: center;
    }

    main .hero-image {
        flex: none;
        width: min(250px, 80%);
        max-width: 100%;
        margin: 0 auto;
    }

    main .hero-content .button {
        margin: 8px 5px;
    }

    .profile-details {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .profile-item {
        padding: 20px;
    }

    main .section > .button {
        margin: 8px 5px;
    }
}

/* Small mobile screens */
@media (max-width: 400px) {

    main .hero-content .button,
    main .section > .button {
        max-width: 100%;
        padding: 11px 16px;
        font-size: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    main .hero,
    main .hero-content,
    main .hero-image {
        animation: none !important;
        transition: none !important;
    }
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #102a43;
    line-height: 1.35;
    overflow-wrap: break-word;
}

/* Main page heading */
.page-heading h1 {
    text-align: center;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    margin: 0 auto 15px;
}

/* Page heading description */
.page-heading > p {
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
}

/* All section headings */
.section-title {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 30px;
    text-align: center;
}

/* Hero heading */
.hero-content h2 {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 24px;
    text-align: center;
}

/* Academic profile headings */
.profile-item h3 {
    text-align: left;
    margin: 0 0 12px;
}

/* Books and presentation headings */
#books-byme > h2,
#my-presentations > h2,
#my-work > h2 {
    width: 100%;
    margin: 0 auto 35px;
    text-align: center;
}

/* Presentation card headings */
.ppt-card h3 {
    text-align: left;
    margin: 0 0 10px;
}

/* Common questions and FAQ headings */
main section > h2 {
    text-align: center;
}

/* Center professional profile section heading */
main .section > .section-title {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Decorative heading underline */
.section-title::after {
    content: "";
    display: block;
    width: 65px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 10px;
    background: linear-gradient(90deg, #e9ad51, #285878);
}

/* Responsive heading alignment */
@media (max-width: 700px) {
    .page-heading h1,
    .page-heading > p,
    .section-title,
    .hero-content h2,
    main section > h2,
    #books-byme > h2,
    #my-presentations > h2,
    #my-work > h2 {
        text-align: center;
    }

    .section-title {
        width: 100%;
    }

    .profile-item h3,
    .ppt-card h3 {
        text-align: left;
    }
}
html,
body {
    background-color: #ffffff !important;
    background-image: none !important;
}
}
.hero,
.hero-section {
    background: #ffffff !important;
    background-image: none !important;
}

