/* styles.css */

/* Global */
body {
    font-family: "Georgia", "Palatino Linotype", "Times New Roman", serif;
    
    background-color: #e5e5e5; 
    
    color: #2e2e2e;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Links */
a { color: #50657b; text-decoration: none; border-bottom: 1px dotted #ccc; transition: 0.3s; }
a:hover { color: #000; border-bottom: 1px solid #000; }

/* Navigator */
nav {
    background-color: #2b2b2b; 
    
    border-bottom: 1px solid #444;
    
    padding: 10px 0; 
    
    text-align: center;
    position: sticky; 
    top: 0; 
    z-index: 1000;
}

nav a {
    margin: 0 18px;
    font-size: 0.9rem;
    
    color: #ccc; 
    
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    font-family: sans-serif;
    transition: color 0.3s ease;
}

nav a:hover { 
    color: #fff;
}

nav a.active { 
    color: #fff;
    font-weight: bold; 
    border-bottom: 1px solid #fff;
    padding-bottom: 2px;
}

/* Banner */
.hero-banner {
    width: 100%;
    height: 280px;
    background-color: #606d7a;
    background-image: url('pic/banner.JPG');
    background-size: cover;
    background-position: center;
    margin-bottom: 50px;
}

/* Content */
.container {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px 80px 20px;
    min-height: 60vh;
}

/* Title */
h1 { font-weight: normal; font-size: 2rem; margin-bottom: 5px; letter-spacing: 0.5px;}
h2 {
    font-weight: normal;
    font-size: 1.5rem;
    margin-top: 45px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
    color: #111;
}
h3 { font-size: 1.2rem; margin-top: 30px; color: #444; font-weight: normal; font-style: italic;}

/* About Me */
.profile-header { display: flex; align-items: flex-start; margin-bottom: 40px; }
.profile-img { 
    width: 220px; 
    height: auto; 
    margin-right: 40px; 
    border: 1px solid #f0f0f0; 
    flex-shrink: 0;
    border-radius: 10px; 
}

/* List */
ul { padding-left: 40px; list-style-type: disc; }
li { margin-bottom: 12px; }
.date { font-family: "Courier New", monospace; color: #555; font-size: 0.9rem; margin-right: 6px; }
.venue { font-style: italic; color: #555; }

/* Icon Links */
.icon-links {
    margin-top: 15px;
    font-size: 1.5rem;
}

.icon-links a {
    margin-right: 18px;
    color: #888;
    border-bottom: none;
    transition: color 0.2s ease;
}

.icon-links a:hover {
    color: #222;
    border-bottom: none;
}

.fa-envelope {
    font-size: 0.9em; 
}

/* Secret */
.secret-text {
    background-color: #000;
    color: #000;
    
    padding: 2px 6px;
    border-radius: 4px;
    font-style: italic;
    transition: color 0.3s ease;
    user-select: none;
}

.secret-text:hover {
    color: #fff;
}

/* Publications */
.paper-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.paper-item {
    display: grid;
    grid-template-columns: 140px 1fr; 
    gap: 25px;
    margin-bottom: 35px;
    align-items: baseline;
}

.paper-venue {
    text-align: left; 
    font-weight: bold;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.4;
}

.paper-content {
    display: flex;
    flex-direction: column;
}

.paper-title {
    font-weight: bold;
    color: #000;
    font-size: 1.05rem;
    margin-bottom: 6px;
    line-height: 1.35;
}

.paper-meta-row {
    display: flex;
    justify-content: space-between; 
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.paper-authors {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.5;
}

.paper-links {
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    margin-left: auto; 
    white-space: nowrap;
}

.paper-links a {
    margin-left: 15px;
    color: #50657b;
    text-decoration: none;
    border-bottom: none;
}
.paper-links a:hover {
    text-decoration: underline;
    color: #000;
}

@media (max-width: 700px) {
    .paper-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .paper-venue {
        color: #444;
        margin-bottom: 4px;
        font-size: 0.85rem;
    }
    .paper-meta-row {
        flex-direction: column;
    }
    .paper-links {
        margin-left: 0;
    }
    .paper-links a {
        margin-left: 0;
        margin-right: 15px;
    }
}

/* Talks */
.talk-list li {
    margin-bottom: 30px; 
}

.talk-title {
    display: block;
    font-size: 1.05rem;
    font-weight: bold;
    margin-bottom: 6px;
    color: #111;
    line-height: 1.4;
}

.talk-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-style: italic;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.talk-venue-name {
    margin-right: 60px;
    color: #333;
    font-weight: 500;
    font-style: normal;
}

.talk-slides {
    margin-left: 30px;
    white-space: nowrap;
    font-style: normal;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .talk-meta {
        flex-direction: column;
    }
    .talk-slides {
        margin-left: 0;
        margin-top: 5px;
        align-self: flex-end;
    }
    .talk-venue-name {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* Fragments */

h3, .fragment-title {
    font-family: "Monotype Corsiva", "Apple Chancery", "URW Chancery L", "Bradley Hand ITC", cursive;
    
    font-size: 1.8rem; 
    
    color: #333;
    
    font-weight: normal; 
    font-style: normal;
    text-transform: none;
    
    text-align: center;
    margin-top: 60px;
    margin-bottom: 25px;
    
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    h3, .fragment-title {
        font-size: 1.1rem;
        margin-top: 40px;
    }
}

.fragments-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.fragment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.fragment-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.fragment-caption {
    margin-top: 15px;
    font-family: "Georgia", serif;
    font-size: 1.1rem;
    color: #333;
    font-style: italic;
}

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

/* Map */
.map-container {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 60px;
    width: 100%;
}

.map-title {
    font-family: "Georgia", serif;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    font-style: italic;
}

.map-iframe {
    width: 120%;
    height: 550px;
    margin-left: -10%;
    border: none;
    border-radius: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    .map-iframe {
        width: 100%;
        margin-left: 0;
        height: 400px;
    }
}

/* Separator Line */
hr {
    border: 0;
    height: 1px;
    
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
    
    margin-top: 60px;
    margin-bottom: 60px;
    
    width: 60%; 
    margin-left: auto;
    margin-right: auto;
}

/* Gallery */

.gallery {
    height: 550px;
    overflow-y: auto;
    
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(to right, transparent, #333, transparent) 1;
    
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    
    background: transparent;
    width: 120%;
    margin-left: -10%;
    
    padding: 50px 20px;      
    
    margin-bottom: 50px;
    box-sizing: border-box;

    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.gallery::-webkit-scrollbar { 
    display: none; 
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px; 
}

.gallery-item {
    text-align: center;
    margin-bottom: 40px;
    transition: opacity 0.3s ease; 
}

.gallery-item:hover {
    transform: none;  
    opacity: 0.8;    
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}

.gallery-info-title {
    font-family: "Georgia", serif;
    font-size: 1.05rem;
    font-weight: bold;
    color: #000;
    margin-bottom: 6px;
    line-height: 1.3;
}

.gallery-info-artist {
    font-family: "Georgia", serif;
    font-size: 0.95rem;
    color: #444;
    font-style: italic;
    margin-bottom: 6px;
}

.gallery-info-meta {
    font-family: "Georgia", serif;
    font-size: 0.85rem;
    color: #888;
    font-style: normal;
}

@media (max-width: 768px) {
    .gallery {
        width: 100%;
        margin-left: 0;
        border-image: none;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
        mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Travel */

.strip-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.location-strip {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    
    padding: 20px 50px;     
    
    scrollbar-width: none; 
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    
    -webkit-mask-image: linear-gradient(to right, transparent 0px, black 50px, black calc(100% - 50px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0px, black 50px, black calc(100% - 50px), transparent 100%);
}

.location-strip::-webkit-scrollbar { 
    display: none; 
}

.location-cover {
    flex: 0 0 160px;
    cursor: pointer;
    text-align: center;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.location-cover:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.location-cover.active {
    opacity: 1;
    transform: scale(1.05);
}

.location-cover img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 8px;
    border: 2px solid transparent;
}

.location-cover.active img {
    border-color: #333;
}

.location-name {
    font-family: "Georgia", serif;
    font-size: 0.9rem;
    color: #333;
    font-weight: bold;
}

.drawer-wrapper {
    display: none;
    position: relative;
    width: 120%;
    margin-left: -10%;
    margin-bottom: 50px;
    height: 450px;
}

.drawer-scroll {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 30px;
    overflow-x: auto;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(to right, transparent, #333, transparent) 1;
    
    padding: 0 50px;
    
    -webkit-mask-image: linear-gradient(to right, transparent 0px, black 50px, black calc(100% - 50px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0px, black 50px, black calc(100% - 50px), transparent 100%);
    
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.drawer-scroll::-webkit-scrollbar { 
    display: none; 
}

.drawer-item {
    flex: 0 0 auto;
    height: 350px;
    transition: transform 0.3s;
}

.drawer-item img {
    height: 100%;
    width: auto;
    border-radius: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #333;
    transition: all 0.2s;
    opacity: 0;
}

.strip-wrapper:hover .nav-btn,
.drawer-wrapper:hover .nav-btn {
    opacity: 1;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #333;
    transition: all 0.2s;
    opacity: 0;
}

.strip-wrapper .nav-btn {
    top: 70px;
}

.strip-wrapper:hover .nav-btn,
.drawer-wrapper:hover .nav-btn {
    opacity: 1;
}

.nav-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.nav-btn.left { left: -60px; }
.nav-btn.right { right: -60px; }

@media (max-width: 768px) {
    .nav-btn.left { left: 10px; }
    .nav-btn.right { right: 10px; }
    .location-strip, .drawer-scroll {
        padding: 20px;
        -webkit-mask-image: linear-gradient(to right, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0px, black 20px, black calc(100% - 20px), transparent 100%);
    }
}