/*
 Theme Name:   GeneratePress Tinglong
 Theme URI:    https://tinglongdai.com
 Description:  Luxury academic child theme for GeneratePress with refined typography, elegant cards, and sophisticated hover animations.
 Author:       Tinglong Dai
 Author URI:   https://tinglongdai.com
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  generatepress-tinglong
*/

/* ==========================================================================
   Google Fonts
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@300;400;700&family=Raleway:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   Layout: Full-Width, No Sidebar
   ========================================================================== */

/* Remove the sidebar entirely */
#right-sidebar,
.sidebar,
.widget-area {
    display: none !important;
}

/* Make content take full width */
.site-content {
    display: block;
}

.content-area {
    width: 100% !important;
    float: none !important;
}

/* GeneratePress-specific: force no-sidebar layout */
body:not(.no-sidebar) .site-main {
    width: 100%;
    margin: 0 auto;
}

.inside-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */

@keyframes pageReveal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shimmerText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideShine {
    0% { right: -100%; }
    50% { right: 100%; }
    100% { right: 100%; }
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); opacity: 0; }
    10%, 90% { opacity: 0.4; }
    50% { transform: translate(50px, -50px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); opacity: 0; }
    10%, 90% { opacity: 0.3; }
    50% { transform: translate(-40px, -60px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.5); }
}

/* ==========================================================================
   Wrapper & Base Reset
   ========================================================================== */

.luxury-research-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.luxury-research-wrapper {
    font-family: 'Didot', 'Bodoni MT', 'Noto Serif Display', 'Playfair Display', Georgia, serif;
    position: relative;
    animation: pageReveal 1.2s ease-out;
    background: transparent;
    padding: 40px 20px;
}

/* ==========================================================================
   Header Section
   ========================================================================== */

.research-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.research-title {
    font-size: 48px !important;
    font-weight: 300 !important;
    letter-spacing: 10px !important;
    text-transform: uppercase;
    margin-bottom: 20px !important;
    background: linear-gradient(135deg, #2c2c2c 0%, #8b4513 50%, #2c2c2c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 4s ease-in-out infinite;
    background-size: 200% 200%;
    line-height: 1.3 !important;
}

.research-subtitle {
    font-size: 18px !important;
    color: #666 !important;
    font-style: italic;
    letter-spacing: 2px !important;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

/* ==========================================================================
   Research Areas Grid
   ========================================================================== */

.research-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 60px auto;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

/* --- Research Area Cards --- */

.research-area-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.research-area-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05) 0%, rgba(139, 69, 19, 0.02) 100%);
    transition: top 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.research-area-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(139, 69, 19, 0.15);
    border-color: #8b4513;
}

.research-area-card:hover::before {
    top: 0;
}

/* --- Area Icon --- */

.area-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    overflow: hidden;
}

.area-icon img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    max-width: 60px;
    max-height: 60px;
}

/* --- Area Title & Link --- */

.area-title {
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #2c2c2c !important;
    margin-bottom: 10px !important;
    letter-spacing: 1px !important;
}

.area-link {
    color: #8b4513 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 10px;
    position: relative;
}

.area-link::after {
    content: '\2192';
    margin-left: 5px;
    transition: margin-left 0.3s ease;
}

.area-link:hover {
    color: #2c2c2c !important;
}

.area-link:hover::after {
    margin-left: 10px;
}

/* ==========================================================================
   Research Statement Section
   ========================================================================== */

.research-statement {
    max-width: 900px;
    margin: 80px auto;
    padding: 50px;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    position: relative;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.7s forwards;
}

.statement-quote {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 60px !important;
    color: rgba(139, 69, 19, 0.1);
    font-family: Georgia, serif;
}

.research-statement p {
    font-size: 18px !important;
    line-height: 1.8 !important;
    color: #444 !important;
    margin-bottom: 20px !important;
    text-align: justify;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Link Cards
   ========================================================================== */

.link-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 60px auto;
    max-width: 1000px;
}

.link-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    transition: height 0.3s ease;
    z-index: 0;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.15);
    border-color: #8b4513;
}

.link-card:hover::before {
    height: 4px;
}

.link-card-icon {
    width: 40px;
    height: 40px;
    color: #8b4513;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.link-card:hover .link-card-icon {
    transform: scale(1.1);
    opacity: 1;
}

.link-card-title {
    font-size: 16px !important;
    color: #2c2c2c !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Publications Section
   ========================================================================== */

.publications-section {
    max-width: 1200px;
    margin: 80px auto;
}

/* --- Section Header (dark banner) --- */

.section-header {
    background: linear-gradient(135deg, #2c2c2c 0%, #404040 100%);
    color: white !important;
    padding: 25px 40px;
    border-radius: 8px 8px 0 0;
    font-size: 24px !important;
    letter-spacing: 3px !important;
    text-transform: uppercase;
    font-weight: 300 !important;
    position: relative;
    overflow: hidden;
}

.section-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: slideShine 8s infinite;
}

/* --- Publications Content Container --- */

.publications-content {
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 40px;
}

/* --- Individual Publication Items --- */

.publication-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

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

.publication-item:hover {
    padding-left: 20px;
    background: linear-gradient(90deg, rgba(139, 69, 19, 0.02) 0%, transparent 100%);
}

.publication-item p {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    margin-bottom: 10px !important;
}

.publication-item p a {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

.publication-item a {
    color: #4e97e0 !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.publication-item a:hover {
    border-bottom-color: #4e97e0;
}

.publication-note {
    padding-left: 40px;
    color: #808080 !important;
    font-size: 14px !important;
    margin-top: 5px !important;
}

/* --- Topic Headers --- */

.topic-header {
    font-size: 28px !important;
    color: #2c2c2c !important;
    margin: 60px 0 30px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #8b4513 !important;
}

/* ==========================================================================
   Books / Handbook Section
   ========================================================================== */

.books-section {
    max-width: 1200px;
    margin: 80px auto;
}

.books-section .publications-content {
    display: grid;
    gap: 28px;
}

.books-section .handbook-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 36px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.books-section .handbook-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.12);
    border-color: #8b4513;
}

/* --- Two-column card layout: details | image --- */

.handbook-section {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 320px);
    grid-template-areas:
        "title title"
        "details img"
        "contributors contributors"
        "links links";
    column-gap: 40px;
    row-gap: 24px;
}

.handbook-section > h3 {
    grid-area: title;
    margin-bottom: 0 !important;
    color: #2c2c2c !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaeaea;
}

.handbook-details {
    grid-area: details;
    padding-top: 0;
    padding: 20px 0;
}

.handbook-image {
    grid-area: img;
    margin: 0;
    align-self: start;
}

.handbook-contributors {
    grid-area: contributors;
}

.handbook-links {
    grid-area: links;
}

/* --- Handbook Details --- */

.handbook-details p {
    display: flex;
    gap: 10px;
    margin-bottom: 10px !important;
    color: #333 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
}

.handbook-details p strong {
    min-width: 130px;
    white-space: nowrap;
}

.handbook-details strong {
    color: #2c2c2c !important;
    font-weight: 500 !important;
}

/* --- Handbook Image --- */

.handbook-image img {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: contain;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
}

.book-cover-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 1px solid #ececec;
    border-radius: 6px;
    background: linear-gradient(135deg, #f8f6f3 0%, #f2ede7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    color: #6a4a2d;
    font-size: 18px !important;
    line-height: 1.4 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.book-note {
    color: #777 !important;
    font-size: 14px !important;
    margin-top: 6px !important;
}

/* --- Handbook Contributors --- */

.handbook-contributors {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.handbook-contributors h5 {
    color: #8b4513 !important;
    font-size: 18px !important;
    margin-bottom: 15px !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
}

.contributor-item {
    padding: 8px 0 8px 25px;
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    position: relative;
    transition: all 0.3s ease;
}

.contributor-item::before {
    content: '\2E38';
    position: absolute;
    left: 0;
    color: #8b4513;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.contributor-item:hover {
    padding-left: 35px;
    background: linear-gradient(90deg, rgba(139, 69, 19, 0.02) 0%, transparent 100%);
}

.contributor-item:hover::before {
    opacity: 1;
    left: 10px;
}

.contributor-item a {
    color: #4e97e0 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.contributor-item a:hover {
    color: #8b4513 !important;
    text-decoration: underline !important;
}

/* --- Handbook Links --- */

.handbook-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.handbook-links h5 {
    color: #8b4513 !important;
    font-size: 18px !important;
    margin-bottom: 15px !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
}

.handbook-links p {
    font-size: 15px !important;
}

.handbook-links a {
    color: #4e97e0 !important;
    text-decoration: none !important;
    padding: 0 10px;
    transition: all 0.3s ease;
}

.handbook-links a:hover {
    color: #8b4513 !important;
    text-decoration: underline !important;
}

.handbook-links a:not(:last-child)::after {
    content: '|';
    color: #d0d0d0;
    padding-left: 10px;
}

/* ==========================================================================
   Honors Section
   ========================================================================== */

.honors-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 10px;
    padding: 40px;
    margin: 60px auto;
    max-width: 1200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e5e5e5;
}

.honors-section h3 {
    color: #2c2c2c !important;
    font-size: 28px !important;
    margin-bottom: 30px !important;
    font-weight: 400 !important;
    letter-spacing: 2px !important;
}

.honors-section .honor-item {
    padding: 18px 0 18px 25px;
    border-bottom: 1px solid #e0e0e0;
    color: #333 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    transition: all 0.3s ease;
    position: relative;
}

.honors-section .honor-item::before {
    content: '\2E38';
    position: absolute;
    left: 0;
    color: #8b4513;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.honors-section .honor-item:hover {
    padding-left: 35px;
    color: #2c2c2c !important;
    background: linear-gradient(90deg, rgba(139, 69, 19, 0.02) 0%, transparent 100%);
}

.honors-section .honor-item:hover::before {
    opacity: 1;
    left: 10px;
}

.honors-section .honor-item:last-child {
    border-bottom: none;
}

.honors-section .honor-item a {
    font-size: inherit !important;
}

/* ==========================================================================
   Seminars Section
   ========================================================================== */

.seminars-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 40px;
    margin: 60px auto;
    max-width: 1200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.seminars-section h3 {
    color: #2c2c2c !important;
    font-size: 28px !important;
    margin-bottom: 30px !important;
    font-weight: 400 !important;
    letter-spacing: 2px !important;
}

.seminars-section .seminar-item {
    padding: 14px 0 14px 25px;
    color: #333 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.seminars-section .seminar-item::before {
    content: '\2E38';
    position: absolute;
    left: 0;
    color: #8b4513;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.seminars-section .seminar-item:hover {
    padding-left: 35px;
    color: #2c2c2c !important;
    background: linear-gradient(90deg, rgba(139, 69, 19, 0.02) 0%, transparent 100%);
}

.seminars-section .seminar-item:hover::before {
    opacity: 1;
    left: 10px;
}

.seminars-section .seminar-item:last-child {
    border-bottom: none;
}

.seminars-section .seminar-item a {
    font-size: inherit !important;
}

/* ==========================================================================
   Service Section
   ========================================================================== */

.service-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 40px;
    margin: 60px auto;
    max-width: 1200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.service-section h3 {
    color: #2c2c2c !important;
    font-size: 28px !important;
    margin-bottom: 30px !important;
    font-weight: 400 !important;
    letter-spacing: 2px !important;
}

.service-section .service-item {
    padding: 14px 0 14px 25px;
    color: #333 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.service-section .service-item::before {
    content: '\2E38';
    position: absolute;
    left: 0;
    color: #8b4513;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.service-section .service-item:hover {
    padding-left: 35px;
    background: linear-gradient(90deg, rgba(139, 69, 19, 0.02) 0%, transparent 100%);
}

.service-section .service-item:hover::before {
    opacity: 1;
    left: 10px;
}

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

.service-section .service-sub-item {
    padding: 10px 0 10px 45px;
    color: #555 !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    position: relative;
}

.service-section .service-sub-item::before {
    content: '\2E26';
    position: absolute;
    left: 30px;
    color: #8b4513;
    opacity: 0.4;
}

.service-section .service-item a,
.service-section .service-sub-item a {
    color: #4e97e0 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-size: inherit !important;
}

.service-section .service-item a:hover,
.service-section .service-sub-item a:hover {
    color: #8b4513 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   Floating Particles (ambient background decoration)
   ========================================================================== */

.research-particle {
    position: fixed;
    background: radial-gradient(circle, rgba(139, 69, 19, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.particle-1 {
    width: 3px;
    height: 3px;
    top: 20%;
    left: 10%;
    animation: float1 25s infinite;
}

.particle-2 {
    width: 4px;
    height: 4px;
    top: 60%;
    right: 15%;
    animation: float2 30s infinite;
}

/* ==========================================================================
   Luxury Divider
   ========================================================================== */

.luxury-divider {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #8b4513, transparent);
    margin: 60px auto;
    animation: pulse 3s ease-in-out infinite;
}

/* ==========================================================================
   Spacing Utilities for Long Lists
   ========================================================================== */

.honors-section p,
.seminars-section .seminar-item,
.service-section .service-item {
    padding: 8px 0;
    line-height: 1.8 !important;
}

/* ==========================================================================
   Responsive Design -- Tablet & Mobile (max-width: 900px)
   ========================================================================== */

@media (min-width: 900px) {
    .handbook-contributors {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 24px;
        row-gap: 4px;
    }
    .handbook-contributors h5 {
        grid-column: 1 / -1;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 900px) {
    .handbook-section {
        display: block;
        padding: 24px;
    }
    .handbook-image {
        margin: 20px auto 30px;
    }
    .handbook-image img,
    .book-cover-placeholder {
        max-width: 280px;
        margin: 0 auto;
    }
    .handbook-image img {
        aspect-ratio: auto;
        object-fit: contain;
    }
    .handbook-details p {
        display: block;
    }
}

/* ==========================================================================
   Responsive Design -- Phone (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    .research-title {
        font-size: 32px !important;
        letter-spacing: 5px !important;
    }
    .research-areas {
        grid-template-columns: 1fr;
    }
    .research-statement {
        padding: 30px 20px;
    }
    .publications-content {
        padding: 20px;
    }
    .publication-item {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .publication-item p {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    .service-section p,
    .honors-section p,
    .seminars-section p {
        word-break: break-word;
        overflow-wrap: break-word;
        font-size: 14px !important;
    }
    .section-header {
        font-size: 18px !important;
        padding: 20px !important;
    }
    .topic-header {
        font-size: 22px !important;
    }
}
