:root {
    --bg-color: #faf9f6;
    --text-color: #4a4a4a;
    --accent-color: #d68c60;
    --nav-bg: #ffffff;
    --link-hover: #b56b42;
    --border-color: #e0e0e0;
}

/* default */
body {
    font-family: 'Noto Sans', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

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

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

svg.icon {
  fill: currentcolor;
  height: 1em;
  margin-right: 0.4em;
  overflow: visible;
  vertical-align: -0.125em;
  width: 1em;
}

/* container for layout */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* header */
.site-header {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0em;
    color: #9b9b9b;
    font-family: "Zen Maru Gothic", sans-serif;
}

/* navigation （desktop） */
.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 500;
}

.main-nav a.current {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.lang-switch a {
    border: 1px solid var(--text-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.lang-switch a:hover {
    background-color: var(--text-color);
    color: #fff;
}

/* hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* main contents */
main {
    flex: 1;
    padding-top: 60px;
    padding-bottom: 60px;
}

h2 {
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 10px;
    font-size: 1.5rem;
    margin-top: 40px;
}

h1 {
  position: relative;
  display: inline-block;
  font-size: 2.2rem;
  padding: 0 0.5rem;
  z-index: 1;
}

h1::before {
  content: "";
  position: absolute;
  bottom: 8px;
  left: -5px;
  width: 105%;
  height: 10px;
  background: var(--accent-color);
  z-index: -1;
  transform: rotate(-1deg);
  opacity: 0.7;
}

/* toppage： profile */
.myname {
    color: var(--text-color);
    font-size: 2em;
    font-weight: bold;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 60px;
}

.profile-text {
    flex: 1;
}

.position {
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.position a {
    font-weight: inherit;
    color: inherit;
    margin-bottom: inherit;
}

.profile-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* social links */
.social-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 30px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 1.0rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-scholar { color: #4285F4; border-color: #4285F4; }
.btn-orcid { color: #A6CE39; border-color: #A6CE39; }
.btn-github { color: #333; border-color: #333; }
.btn-researchmap { color: #f44848; border-color: #f44848; }

.btn-scholar:hover { color: #ffffff; border-color: #ffffff; background-color: #4285F4}
.btn-orcid:hover { color: #ffffff; border-color: #ffffff; background-color: #A6CE39}
.btn-github:hover { color: #ffffff; border-color: #ffffff; background-color: #333}
.btn-researchmap:hover { color: #ffffff; border-color: #ffffff; background-color: #f44848}

/* news */
.news-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 8px;
}

.news-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    display: flex;
    align-items: flex-start;
}

.news-list .date {
    width: 5.5em;
    font-weight: bold;
    margin-right: 10px;
    color: var(--accent-color);
}

.news-list .tag {
  width: 4em;
  flex-shrink: 0;
}

.news-list .tag-badge {
  display: inline-block;
  white-space: nowrap;
  vertical-align: top;
  background-color: #eee;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.news-list .text {
  flex: 1;
  min-width: 0;
}

.news-list .news-link {
    color: var(--accent-color);
    text-decoration: underline;
}

/* table style (CV...etc) */
.cv-table {
    width: 100%;
    border-collapse: collapse;
}

.cv-table th, .cv-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cv-table th {
    width: 190px;
    color: var(--accent-color);
    font-weight: bold;
}

/* footer */
footer {
    background-color: var(--nav-bg);
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid var(--border-color);
}

/* --- Responsive design for mobile devices --- */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 2000;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--bg-color);
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: 0.3s;
        padding-top: 80px;
        z-index: 1500;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .profile-section {
        flex-direction: column-reverse;
        text-align: center;
        gap: 30px;
    }

    .social-links {
        justify-content: center;
    }

    .news-list {
        max-height: 240px;
    }
    
    .cv-table th, .cv-table td {
        display: block;
        width: 100%;
    }
    
    .cv-table th {
        border-bottom: none;
        padding-bottom: 0;
    }

    .access-info {
        flex-direction: column;
    }

    .contact-box {
        order: -1;
    }

    .address-box {
        order: 0;
    }

    .map-container {
        order: 1;
    }
}


/* ---　　Publications --- */

.pub-list {
    padding-left: 2em;
    list-style: none;
}

.pub-list li {
    position: relative;
    margin-bottom: 15px;
    padding-left: 1.3em;
    text-indent: -0.1em;
}

.pub-list li::before {
    content: "■";
    position: absolute;
    left: 0;
    top: 1.2em;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 0.6em;
}

.pub-img {
    margin-left: 1em;
    margin-bottom: 0.5em;
}

/* visual emphasis (bold, highlight, etc.) */
.pub-list strong {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
}

.pub-list a {
    color: #dc814c
}

.pub-main {
    display: inline;
}

.bibtex-tools {
    margin-left: 10px;
    display: inline-flex;
    gap: 8px;
    vertical-align: middle;
}

.bibtex-btn {
    font-size: 0.8rem;
    padding: 3px 8px;
    border: 1px solid #6e6868;
    background: #f7f6f4;
    color: #6e6868;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.bibtex-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.bibtex-copy {
    font-size: 0.75rem;
    padding: 3px 8px;
    border: 1px solid #cfcfcf;
    background: #f5f5f5;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    letter-spacing: 0.02em;
    text-transform: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.bibtex-copy:hover {
    background: #e9e9e9;
    border-color: #bdbdbd;
}

.bibtex-copy:active {
    transform: translateY(0);
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.bibtex-copy::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    vertical-align: -1px;
    background-color: currentColor;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M16 1H8a2 2 0 0 0-2 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-2h2a2 2 0 0 0 2-2V5l-5-4ZM7 3a1 1 0 0 1 1-1h7v3h-8V3Zm9 18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h1v12a2 2 0 0 0 2 2h8v1Zm3-4a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V6h9l3 3v8Z'/></svg>") no-repeat center / contain;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M16 1H8a2 2 0 0 0-2 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-2h2a2 2 0 0 0 2-2V5l-5-4ZM7 3a1 1 0 0 1 1-1h7v3h-8V3Zm9 18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h1v12a2 2 0 0 0 2 2h8v1Zm3-4a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V6h9l3 3v8Z'/></svg>") no-repeat center / contain;
}

.bibtex-block {
    margin: 0.4em 0 0.6em;
    padding: 1.4em 0.8em 0.6em;
    background: #fff;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    white-space: pre-wrap;
    font-family: "Noto Sans", sans-serif;
    font-size: 0.85rem;
    color: #333;
    position: relative;
}

.bibtex-block .bibtex-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    font-size: 0.75rem;
}

.bibtex-copy.is-copied {
    background: #3a8f4e;
    border-color: #3a8f4e;
    color: #fff;
}

.bibtex-copy.is-failed {
    background: #c94b4b;
    border-color: #c94b4b;
    color: #fff;
}

/* --- Access --- */
.access-info {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-box {
    flex: 1;
    min-width: 300px;
}

.address-box {
    flex: 1;
    min-width: 550px;
}

.en-address {
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
}

/* map */
.map-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* aspect ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* --- Others --- */

.links a:hover{
    color: var(--accent-color);
}

.links li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
    min-width: 450px;
}

.links li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
}

/* gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.gallery-grid img:hover {
    opacity: 0.8;
}
