/* ============================================================
   Marutyan Portfolio — CSS
   Exact match to Onely7.github.io reference layout
   + dark mode (CSS variables), swup transitions, scroll animations
   ============================================================ */

/* ----- CSS Variables (Light Theme) ----- */
:root {
  /* --bg: #eef0f3; */
  --shadow-dark: #bec0c2;
  --shadow-light: #ffffff;
  --text: #432;
  --text-light: #686870;
  --accent: #5bb7db;
  --accent-bg: #ddf1fa;
  --timeline-border: #eef0f3;
  --footer-bg: #3a8fb7;
  --footer-text: #fff;
  --sub-subtitle-line: #7ec8e3;
  --sub-subtitle-text: #3a8fb7;
  --button-bg: #ccc;
  --button-hover: #999;

  --font-primary: "Noto Sans JP", "Noto Sans", sans-serif;
  --font-brand: "Raleway", "Noto Sans JP", sans-serif;
}

/* ----- Dark Theme ----- */
[data-theme="dark"] {
  --bg: #121212;
  --nav-bg: #1a1a2e;
  --shadow-dark: #0d0d1e;
  --shadow-light: #25253e;
  --text: #e0e0e0;
  --text-light: #a0a0a0;
  --accent: #6bc4e8;
  --accent-bg: rgba(107, 196, 232, 0.18);
  --timeline-border: #25253e;
  --footer-bg: #1a3a5c;
  --footer-text: #a0dff5;
  --sub-subtitle-line: #4a90a8;
  --sub-subtitle-text: #6bc4e8;
  --button-bg: #2a2a40;
  --button-hover: #3a3a55;
}
[data-theme="dark"] .subtitle-line {
    border-left-color: #5bb7db;
}
[data-theme="dark"] .subtitle {
    color: #7ecce8;
}
[data-theme="dark"] .affiliate-container .bio-belongings {
    color: #6bc4e8;
}
[data-theme="dark"] .list-inline-item a,
[data-theme="dark"] .list-inline-item button {
    color: #6bc4e8;
}
[data-theme="dark"] .list-inline-item a:hover,
[data-theme="dark"] .list-inline-item button:hover {
    color: #a0dff5;
}
[data-theme="dark"] .nav-item-list .nav-item .nav-link {
    color: #7ecce8;
}
[data-theme="dark"] .nav-item-list .nav-item .nav-link:hover {
    color: #a0dff5;
}
[data-theme="dark"] .nav-item-list .nav-item span {
    color: #7ecce8;
}
[data-theme="dark"] .nav-item-list .nav-item span:hover {
    color: #a0dff5;
}
/* ------------------
---- Common Part ----
------------------ */
html {
    font-size: 100%;
    zoom: 1.5;
}
body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}
a {
    text-decoration: none;
    color: var(--text);
}
img {
    max-width: 100%;
}
.wrapper {
    width: 90%;
    margin-bottom: 6%;
}
.subtitle-container {
    display: flex;
    flex-direction: row;
    margin-bottom: 0.5%;
}
.subtitle-line {
    height: 40px;
    width: 0;
    border-left: thick solid #3a8fb7;
    align-self: center;
}
.subtitle {
    font-size: 32px;
    padding-left: 16px;
    align-self: center;
    color: #2e7d9e;
}

/* ----------
---- NAV ----
------------- */
nav {
    width: 30%;
    min-width: 220px;
    height: 100vh;
    font-family: var(--font-brand);
    background: #eef0f3;
    margin-right: 5%;
    position: sticky;
    top: 0;
}
[data-theme="dark"] nav {
    background: var(--nav-bg);
}

#home {
    display: flex;
    justify-content: space-between;
}

/* main logo */
.logo_bg-container {
    padding: 40px 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo_bg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #eef0f3;
    box-shadow: inset 5px 5px 8px #bec0c2, inset -5px -5px 8px #ffffff;
}
[data-theme="dark"] .logo_bg {
    background: var(--nav-bg);
    box-shadow: inset 5px 5px 8px var(--shadow-dark), inset -5px -5px 8px var(--shadow-light);
}
.logo_bg h1 {
    margin: 0;
    padding: 0;
    line-height: 1;
    font-size: inherit;
}
.logo {
    width: 85%;
    height: 85%;
    border-radius: 50%;
    overflow: hidden;
    margin-top: 12px;
    margin-left: 12px;
    position: relative;
}
/* main logo + related links for me */
.affiliate-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.affiliate-container-item {
    align-self: center;
}
.affiliate-container .bio-belongings {
    text-align: center;
    font-weight: 500;
    font-size: 15px;
    color: #3a8fb7;
}
/* related links logo for me */
.list-inline{
    width: 55%;
    min-width: 180px;
    height: 30px;
    margin: 20px auto;
    display: flex;
    justify-content: space-around;
    list-style: none;
    padding: 0;
}
.list-inline-item {
    list-style: none;
}
.list-inline-item a,
.list-inline-item button {
    color: #3a8fb7;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}
.list-inline-item a:hover,
.list-inline-item button:hover {
    color: #5bb7db;
}
.list-inline-item iconify-icon {
    font-size: 30px;
}
#email-text{
    display: none;
}

/* other links */
.nav-item-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nav-item-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75%;
    margin: 10px;
    list-style: none;
    padding: 0;
}
.nav-item {
    width: 160px;
    text-align: left;
    font-weight: 500;
    font-size: 16px;
    margin: 5px 0;
}
.nav-item-list .nav-item .nav-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    color: #2e7d9e;
    transition: color 0.2s;
}
.nav-item-list .nav-item .nav-link:hover {
    color: #5bb7db;
}
.nav-item-list .nav-item iconify-icon {
    font-size: 22px;
    margin-right: 6px;
}
.nav-lab-icon {
    height: 22px;
    width: auto;
    margin-right: 6px;
    object-fit: contain;
}
.nav-item-list .nav-item span {
    color: #2e7d9e;
    transition: color 0.2s;
}
.nav-item-list .nav-item span:hover {
    color: #5bb7db;
}
/* for line */
.nav-item-list-line {
    width: 75%;
    height: 6px;
    border-radius: 5px;
    background: #eef0f3;
    box-shadow: inset 2px 2px 4.5px #bec0c2, inset -2px -2px 4.5px #ffffff;
}
[data-theme="dark"] .nav-item-list-line {
    background: var(--nav-bg);
    box-shadow: inset 2px 2px 4.5px var(--shadow-dark), inset -2px -2px 4.5px var(--shadow-light);
}
/* toggle row (theme + lang) */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 15px 0;
}
.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text);
    transition: color 0.2s;
    font-size: 22px;
    padding: 0;
}
.toggle-btn:hover {
    color: var(--accent);
}
.lang-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.7rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    transition: color 0.2s;
}
.lang-link:hover {
    color: var(--accent);
}

/* scroll indicator - hidden on desktop */
.scroll-vector-container {
    display: none;
}


/* --------------
---- ARTICLE ----
--------------- */
article {
    flex: 1;
    margin: 50px 0 0px;
}

.interests {
    list-style-position: inside;
}
.interests .other-list-item {
    font-size: 1.1rem;
}



/* for Bio
------------------------------- */
.timeline {
    margin-top: 2%;
}
.timeline li {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    overflow: hidden;
    margin: 0;
}
.timeline-date {
    position: relative;
    width: 100px;
    font-weight: bold;
    font-size: 16px;
    color: var(--text-light);
    margin-top: 25px;
    text-align: center;
    line-height: 1.2;
}
.timeline-content-wrapper {
    width: 75%;
    float: left;
    border-left: 3px var(--timeline-border) solid;
    padding: 0 0 0 40px;
}
.timeline-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 25px;
}
.timeline-content-wrapper .end {
    margin-bottom: 35px;
}

.timeline-content h3 {
    font-weight: bold;
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 0.1rem;
}
.timeline-content p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-light);
}
.timeline-date:before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--accent);
    position: absolute;
    left: 96px;
    top: 8px;
    border-radius: 100%;
}


.content-list {
    list-style-position: inside;
}
.content-list .other-list-item {
    text-indent: -1em;
    padding-left: 1em;
}
.content-list .bib-item {
    margin-bottom: 1.5rem;
    list-style-type: none;
}
.content-list .bib-item .paper-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.content-list .bib-item .paper-title {
    font-weight: bold;
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}
.content-list .bib-item .paper-info-container {
    line-height: 1.5;
}
.content-list .bib-item .paper-info {
    font-size: 14px;
    color: var(--text-light);
}

.activity-wrapper .content-list {
    margin-bottom: 2rem;
}
.content-list .other-item {
    margin-bottom: 1.2rem;
    list-style-type: none;
}
.content-list .other-item .other-item-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.content-list .other-item .other-item-title {
    font-weight: bold;
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 0.2rem;
}
.content-list .other-item .other-item-info-container {
    line-height: 1.5;
}
.content-list .other-item .other-item-info {
    font-size: 14px;
    color: var(--text-light);
}
.content-list .other-item a {
    color: var(--text);
}

.sub-subtitle-container {
    display: flex;
    flex-direction: row;
    margin-bottom: 0.5%;
}
.sub-subtitle-line {
    height: 30px;
    width: 0;
    border-left: thick solid var(--sub-subtitle-line);
    align-self: center;
}
.sub-subtitle {
    color: var(--sub-subtitle-text);
    font-size: 22px;
    padding-left: 16px;
    align-self: center;
}

/* for Button
------------------------------- */
.button-container-2 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 145px;
}
.button-container-3 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 225px;
}
.small-logo {
    width: 15px;
    height: 15px;
}

/* pdf-button */
.pdf-button a span{
    font-size: 0.875rem;
    color: var(--text);
}
.pdf-button a {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0.25rem 0 0 0;
    height: 28px;
    width: 65px;
    padding: 0;
    transition: 0.3s ease-in-out;
    background: var(--button-bg);
    border-radius: 4%;
    z-index:0;
    overflow: hidden;
}
.pdf-button a:after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left:0;
    width: 0;
    display: block;
    background: var(--button-hover);
    transition: .3s;
}
.pdf-button a:hover:after {
    width: 100%;
    z-index: -1;
}

/* slide-button */
.slide-button a span{
    font-size: 0.875rem;
    color: var(--text);
}
.slide-button a {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0.25rem 0 0 0;
    height: 28px;
    width: 70px;
    padding: 0;
    transition: 0.3s ease-in-out;
    background: var(--button-bg);
    border-radius: 4%;
    z-index:0;
    overflow: hidden;
}
.slide-button a:after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left:0;
    width: 0;
    display: block;
    background: var(--button-hover);
    transition: .3s;
}
.slide-button a:hover:after {
    width: 100%;
    z-index: -1;
}

/* prize-button */
.prize-button span{
    font-size: 0.875rem;
    color: var(--text);
}
.prize-button {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0.25rem 0 0 0;
    height: 28px;
    width: 70px;
    padding: 0;
    transition: 0.3s ease-in-out;
    background: var(--accent-bg);
    border-radius: 4%;
    z-index:0;
    overflow: hidden;
}


/* for Skills
------------------------------- */
.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}
.skill-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 14px;
    background: #eef0f3;
    box-shadow: 4px 4px 8px #bec0c2, -4px -4px 8px #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    transition: box-shadow 0.25s, transform 0.25s;
}
.skill-chip:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 12px #bec0c2, -6px -6px 12px #ffffff;
}
.skill-chip iconify-icon {
    font-size: 22px;
}
[data-theme="dark"] .skill-chip {
    background: var(--nav-bg);
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}
[data-theme="dark"] .skill-chip:hover {
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}
.skill-logo {
    width: 22px;
    height: 22px;
}
.skill-item-wrapper span{
    font-size: 1rem;
    color: var(--text);
}
.skill-item-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.25rem 0 0 0;
    height: 28px;
    width: 82px;
    padding: 0;
    background: var(--accent-bg);
}

/* Back to Home — hidden on desktop */
.back-to-home {
    display: none;
}


/* --------------
---- FOOTER ----
--------------- */
footer {
    background: var(--footer-bg);
    text-align: center;
    padding: 18px 0;
}
footer p {
    color: var(--footer-text);
    font-size: 0.875rem;
}


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

/* Onload fade-in-up */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in-up 0.5s ease forwards;
}

@keyframes fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================
   Swup page transitions
   ============================================ */
.transition-fade {
    transition: opacity 0.25s ease;
}

html.is-animating .transition-fade {
    opacity: 0;
}

.swup-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    z-index: 9999;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}


/* -------------------------------------------
--------------- Mobile version ---------------
------------------------------------------- */
@media (max-width: 600px) {
    html {
        zoom: 1;
    }
    #home {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .wrapper {
        width: 95%;
        margin-left: 0;
    }

    /* ----------
    ---- NAV ----
    ------------- */
    nav {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        height: 100vh;
        width: 100%;
        background: #eef0f3;
        margin-right: 0;
        position: relative;
        top: auto;
    }
    [data-theme="dark"] nav {
        background: var(--nav-bg);
    }

    /* main logo */
    .logo_bg-container {
        padding: 10% 0 15px;
    }
    .logo_bg {
        width: 200px;
        height: 200px;
    }
    .logo {
        width: 85%;
        height: 85%;
        margin-top: 15px;
        margin-left: 15px;
    }

    /* related links logo for me */
    .affiliate-container .bio-myname {
        text-align: center;
        font-size: 30px;
    }
    .affiliate-container .bio-belongings {
        text-align: center;
        font-size: 18px;
    }
    .list-inline{
        width: 260px;
        height: 35px;
        margin: 10px auto;
    }
    .list-inline-item {
        list-style: none;
    }
    .list-inline-item iconify-icon {
        font-size: 30px;
    }
    /* other links */
    .nav-item {
        width: 180px;
        text-align: left;
        font-size: 18px;
        margin: 2px 0;
    }
    .nav-item-list-container {
        width: 100%;
    }
    .nav-item-list-line {
        width: 70%;
    }

    /* for scroll animation */
    .scroll-vector-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .scroll-vector {
        width: 60px;
        height: 60px;
        border: none;
        border-radius: 50%;
        background: linear-gradient(145deg, var(--shadow-light), var(--shadow-dark));
        box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
        position: relative;
        animation: down 1.5s infinite;
        -webkit-animation: down 1.5s infinite;
    }
    .scroll-vector::before {
        content: '';
        position: absolute;
        top: 15px;
        left: 21px;
        width: 18px;
        height: 18px;
        border-left: 2px solid var(--text);
        border-bottom: 2px solid var(--text);
        transform: rotate(-45deg);
    }
    @keyframes down {
        0% {
            transform: translate(0);
        }
        20% {
            transform: translateY(15px);
        }
        40% {
            transform: translate(0);
        }
    }
    @-webkit-keyframes down {
        0% {
            transform: translate(0);
        }
        20% {
            transform: translateY(15px);
        }
        40% {
            transform: translate(0);
        }
    }


    /* --------------
    ---- ARTICLE ----
    --------------- */
    article {
        width: 100%;
        margin: 0;
        margin-left: 0;
        padding: 8% 0 8% 20px;
    }

    /* for Bio
    ------------------------------- */
    .timeline {
        margin-top: 4%;
    }
    .timeline-date {
        position: relative;
        width: 90px;
    }
    .timeline-date:before {
        left: 85px;
    }
    .timeline-content-wrapper {
        padding: 0 0 0 30px;
    }
    .timeline-content h3 {
        font-size: 18px;
    }
    .timeline-content p {
        font-size: 12px;
        line-height: 1.5;
    }


    .content-list .bib-item .paper-title {
        font-size: 16px;
        margin-bottom: 0.2rem;
    }
    .content-list .bib-item .paper-info {
        font-size: 12px;
    }
    .subtitle {
        font-size: 22px;
        padding-left: 12px;
    }
    .sub-subtitle-container {
        margin-bottom: 2%;
    }
    .sub-subtitle {
        font-size: 18px;
        padding-left: 12px;
    }
    .content-list li {
        font-size: 14px;
    }
    .subtitle-container {
        margin-bottom: 2%;
    }
    .subtitle-container .subtitle-en {
        font-size: 18px;
    }
    .content-list .other-item .other-item-title {
        font-size: 16px;
        margin-bottom: 0.1rem;
    }
    .content-list .other-item .other-item-info {
        font-size: 12px;
    }

    /* --------------
    ---- FOOTER ----
    --------------- */
    footer {
        padding: 12px 0;
    }

    /* Hide nav on timeline pages (mobile) — must be last to override */
    body.is-timeline nav {
        display: none !important;
    }
    body.is-timeline #home {
        min-height: auto;
    }

    /* Back to Home button (mobile timeline) */
    .back-to-home {
        display: flex;
        justify-content: center;
        padding: 20px 0 10px;
    }
    .back-to-home-link {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 28px;
        border-radius: 14px;
        background: #eef0f3;
        box-shadow: 4px 4px 8px #bec0c2, -4px -4px 8px #ffffff;
        font-size: 1rem;
        font-weight: 600;
        color: var(--accent);
        transition: box-shadow 0.25s, transform 0.25s;
    }
    .back-to-home-link:hover {
        transform: translateY(-2px);
        box-shadow: 6px 6px 12px #bec0c2, -6px -6px 12px #ffffff;
    }
    .back-to-home-link iconify-icon {
        font-size: 20px;
    }
    [data-theme="dark"] .back-to-home-link {
        background: var(--nav-bg);
        box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    }
    [data-theme="dark"] .back-to-home-link:hover {
        box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    }
}

/* ----- Utility ----- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
