* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --header-height: 70px;
    --page-bg: #F7EFE6;
    --font-sans: "sofia-pro-narrow", "Sofia Narrow", Arial, sans-serif;
}

html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: var(--header-height);
    background-color: var(--page-bg);
    overflow-x: hidden;
}

html:has(body.content-page) {
    scroll-snap-type: none;
}

body {
    background-color: var(--page-bg);
    font-family: var(--font-sans);
    overflow-x: hidden;
    max-width: 100%;
}

body > header {
    background-color: #FFC23D;
    color: #000000;
    height: var(--header-height);
    padding: 10px;
    font-family: var(--font-sans);
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar {
    width: 92%;
    margin: auto;
    height: 100%;
    border: 100px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
}

.top-bar-contents {
    height: 50px;
    display: flex;
    justify-content: right;
    align-items: center;
    gap: 20px;
}

.top-bar-contents a,
.top-bar-contents span {
    color: #000000;
    font-family: var(--font-sans);
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1;
}

.top-bar-contents a {
    text-decoration: none;
}

.top-bar-contents a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 0.28em;
    text-decoration-thickness: 2px;
}


/* .greeting-text {
    width: 92%;
    margin: auto;
    height: 100%;
    border: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: left;
    white-space: nowrap;
} */

.greeting {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 8rem;
    gap: 2rem; 
    font-family: var(--font-sans);
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
    height: calc(100vh - var(--header-height));
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.greeting-text {
    flex: 1;
    max-width: 600px;
    padding: 0 2rem;
}

.site-title {
    font-family: var(--font-sans);
    font-size: 1.65rem;
    font-weight: bold;
    color: inherit;
    text-decoration: none;
}

.greeting-text h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.greeting-text p {
    font-size: 1.2rem;
    line-height: 1.6;
}

.greeting-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.75rem;
}

.greeting-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.35rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    background: #FFC23D;
    border: 2px solid #000000;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.greeting-btn:hover {
    background: #000000;
    color: #FFC23D;
    transform: translateY(-1px);
}

.greeting-btn--outline {
    background: transparent;
    color: #000000;
}

.greeting-btn--outline:hover {
    background: #FFC23D;
    color: #000000;
}

.rinrada-pic {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

.rinrada-pic img {
    max-width: 400px;
    min-width: 100px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}



/* .rinrada-pic img{
    max-width: 70%;
    max-height: 70%;
    object-fit: cover;
    border-radius: 10%;
    padding: 50px;
    padding-left: 40%;
    border-radius: 15%;
} */

.whoru {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - var(--header-height));
    height: calc(100vh - var(--header-height));
    font-family: var(--font-sans);
    opacity: 1;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    padding: 2rem 1.5rem;
    max-width: none;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.whoru.visible {
    opacity: 1;
    transform: translateY(0);
}

.whoru-text {
    width: 100%;
    max-width: 1100px;
    padding: 0 1.5rem;
}

.whoru-text h1 {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    color: #000000;
    font-style: italic;
    margin: 0;
    line-height: 1.15;
}

.whoru-scroll-hint {
    margin: 1rem 0 0;
    font-family: var(--font-sans);
    font-size: 12pt;
    font-weight: 400;
    color: #333333;
}

.table-stage {
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: calc(100vh - var(--header-height));
    height: calc(100vh - var(--header-height));
    width: 100%;
    padding: 0.25rem 1rem 0.5rem;
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
}

.button-container {
    display: flex;
    justify-content: center;
}

.cta-button {
    background-color: #4169E1;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #2d4ba3;
}

.about-me {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem 1.5rem;
    font-family: var(--font-sans);
}

.about-me h1 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
}

.about-me p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-photo {
    display: flex;
    justify-content: center;
    padding: 1rem 2rem 2rem;
}

.about-photo-img {
    max-width: 360px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

#table-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: visible;
    background: transparent;
}

#item-tooltip {
    position: absolute;
    display: none;
    max-width: 240px;
    padding: 10px 14px;
    background: #ffffff;
    color: #333333;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 20;
    transform: translate(-50%, calc(-100% - 12px));
}

#item-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.table-nav-sidebar {
    position: absolute;
    top: 50%;
    right: 16px;
    z-index: 15;
    width: 168px;
    padding: 1rem 1.1rem 1.15rem;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 12px;
    font-family: var(--font-sans);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translate(12px, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.table-nav-sidebar.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
    pointer-events: auto;
}

.table-nav-sidebar-label {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a6a1a;
}

.table-nav-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.table-nav-sidebar-list li a {
    display: block;
    padding: 0.45rem 0.55rem;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.table-nav-sidebar-list li.is-active a {
    background: #FFC23D;
    color: #000000;
}

#table-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#table-controls {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#table-controls button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    background: #4CAF50;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
}

#table-controls button:hover {
    background: #45a049;
}

footer {
    text-align: center;
    padding: 1.5rem;
    font-family: var(--font-sans);
    color: #666;
}

.content-page {
    scroll-snap-type: none;
}

.content-page html,
html:has(.content-page) {
    scroll-snap-type: none;
}

.projects-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    font-family: var(--font-sans);
}

.projects-intro {
    margin-bottom: 2.5rem;
    text-align: center;
}

.projects-intro h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.projects-intro p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.project-window {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.75rem;
    align-items: center;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.project-window:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-window-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--page-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-window-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a7a68;
    font-size: 0.95rem;
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

.project-window-body {
    min-width: 0;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.project-title a,
.project-description a {
    color: inherit;
    text-decoration: none;
}

.project-title a:hover,
.project-description a:hover {
    text-decoration: underline;
}

.project-window-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.project-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1.25rem;
}

.project-tools {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0;
    margin: 0;
}

.project-tools li {
    font-size: 0.85rem;
    font-weight: 400;
    color: #1a1a1a;
    padding: 0.35rem 0.75rem;
    background-color: #FFC23D;
    border-radius: 6px;
}

/* —— Vertical timeline —— */
.timeline-section {
    --timeline-accent: #FFC23D;
    --timeline-ink: #1a1a1a;
    --timeline-line: #c4a574;
    background: var(--page-bg);
    padding: 4rem 1.5rem 5rem;
    font-family: var(--font-sans);
    scroll-snap-align: start;
    min-height: calc(100vh - var(--header-height));
    box-sizing: border-box;
}

.timeline-intro {
    text-align: center;
    padding: 0 0 2.5rem;
}

.timeline-intro h2 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--timeline-ink);
}

.timeline-rule {
    width: 56px;
    height: 4px;
    margin: 0.7rem auto 0.9rem;
    background: var(--timeline-accent);
}

.timeline-subtitle {
    margin: 0;
    font-size: 1.05rem;
    color: #333;
}

.timeline-items {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-items::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: var(--timeline-line);
    transform: translateX(-50%);
    pointer-events: none;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 72px 1fr;
    align-items: center;
    column-gap: 1.25rem;
    padding: 1.25rem 0;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) .timeline-card {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-icon {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
}

.timeline-item:nth-child(even) .timeline-card {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
    text-align: left;
}

.timeline-item:nth-child(even) .timeline-icon {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
}

.timeline-card {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 1.1rem 1.15rem 1.2rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.timeline-date {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a6a1a;
}

.timeline-title {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--timeline-ink);
    line-height: 1.25;
}

.timeline-copy {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #444;
}

.timeline-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid var(--timeline-accent);
    background: var(--timeline-ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 0 0 3px rgba(255, 194, 61, 0.35);
    overflow: hidden;
    z-index: 1;
}

.timeline-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-icon--amber {
    background: var(--timeline-accent);
    color: var(--timeline-ink);
}

.timeline-icon--camera {
    background: #2a2a2a;
}

.timeline-icon--dark {
    background: #1a1a1a;
}

.timeline-icon--accent {
    background: var(--timeline-accent);
    color: var(--timeline-ink);
}

@media screen and (max-width: 1024px) {
    .greeting {
        padding: 2rem 2.5rem;
    }

    .greeting-text {
        padding: 0 1rem;
    }

    .rinrada-pic {
        padding: 0 1rem;
    }
}

@media screen and (max-width: 900px) {
    :root {
        --header-height: 108px;
    }

    body > header {
        height: auto;
        min-height: 56px;
        padding: 0.75rem 1rem;
    }

    .top-bar {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        white-space: normal;
    }

    .site-title {
        font-size: 2rem;
        display: block;
        width: 100%;
        margin: 0;
        padding-bottom: 0.15rem;
        text-align: center;
    }

    .top-bar-contents {
        height: auto;
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
        padding-top: 0.15rem;
    }

    .top-bar-contents a,
    .top-bar-contents span {
        font-size: 0.78rem;
    }
}

@media screen and (max-width: 768px) {
    .greeting {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
        justify-content: center;
        padding: 1.5rem 1.25rem;
        gap: 1.5rem;
        height: auto;
        min-height: calc(100svh - var(--header-height));
    }

    .greeting-text {
        max-width: 100%;
        padding: 0;
        width: 100%;
    }

    .greeting-text p {
        font-size: 1rem;
    }

    .greeting-actions {
        justify-content: center;
    }

    .greeting-btn {
        font-size: 0.9rem;
        padding: 0.65rem 1.1rem;
    }

    .rinrada-pic {
        width: 100%;
        max-width: 280px;
        padding: 0;
    }

    .rinrada-pic img {
        max-width: 100%;
    }

    .whoru {
        height: auto;
        min-height: calc(100svh - var(--header-height));
        padding: 2rem 1.25rem;
    }

    .whoru-text {
        padding: 0;
    }

    .table-stage {
        height: auto;
        min-height: calc(100svh - var(--header-height));
        padding: 0.5rem 0.75rem 1rem;
        overflow: visible;
    }

    #table-container {
        min-height: calc(100svh - 120px);
    }

    #table-controls {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }

    #table-controls button {
        font-size: 0.8rem;
        padding: 7px 10px;
    }

    .table-nav-sidebar {
        top: 12px;
        bottom: auto;
        right: 10px;
        left: auto;
        width: min(148px, calc(100% - 20px));
        transform: translateY(-8px);
    }

    .table-nav-sidebar.is-visible {
        transform: translateY(0);
    }

    .table-nav-sidebar-list li a {
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }

    .timeline-section {
        min-height: auto;
        padding: 3rem 1.25rem 4rem;
    }

    .timeline-intro {
        padding-bottom: 2rem;
    }

    .timeline-items {
        padding-left: 0;
        padding-right: 0;
    }

    .timeline-items::before {
        left: 28px;
        transform: none;
    }

    .timeline-item {
        grid-template-columns: 56px 1fr;
        column-gap: 0.85rem;
        padding: 0.85rem 0;
    }

    .timeline-item:nth-child(odd) .timeline-card,
    .timeline-item:nth-child(even) .timeline-card {
        grid-column: 2;
        grid-row: 1;
        justify-self: stretch;
        text-align: left;
        max-width: none;
    }

    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
    }

    .timeline-icon {
        width: 48px;
        height: 48px;
        font-size: 0.8rem;
        border-width: 3px;
    }

    .timeline-card {
        padding: 1rem;
    }

    .about-me {
        padding: 2rem 1.25rem 1rem;
    }

    .about-me h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .about-me p {
        font-size: 1rem;
    }

    .about-photo {
        padding: 1rem 1.25rem 2rem;
    }

    .about-photo-img {
        max-width: min(100%, 320px);
    }

    .project-window {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding-bottom: 2rem;
    }

    .projects-page {
        padding: 2rem 1.25rem 3rem;
    }

    .projects-intro {
        margin-bottom: 2rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    footer {
        padding: 1.25rem 1rem;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .top-bar-contents {
        gap: 0.4rem 0.65rem;
    }

    .top-bar-contents a,
    .top-bar-contents span {
        font-size: 0.72rem;
    }

    .greeting-text h1 {
        font-size: clamp(1.75rem, 9vw, 2.25rem);
    }

    .greeting-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .greeting-btn {
        width: 100%;
    }

    .whoru-text h1 {
        font-size: clamp(1.75rem, 8vw, 2.75rem);
    }

    #item-tooltip {
        max-width: min(240px, calc(100vw - 2rem));
    }
}