/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    background: linear-gradient(to bottom right, #c583ff, #fcd08e);
}

/* Animations */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes swipeOutLeft {
    from { transform: translateX(0);     opacity: 1; }
    to   { transform: translateX(-100%); opacity: 0; }
}

@keyframes swipeOutRight {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

@keyframes swipeInFromRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes swipeInFromLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

/* Background circles */
#bg-circles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    animation: floatCircle linear infinite;
}

@keyframes floatCircle {
    0%   { transform: translateY(100vh) scale(0.8); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-20vh) scale(1.1); opacity: 0; }
}

/* Hamburger menu */
#hamburger-menu {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    transform: translateX(calc(-100% - 1rem));
    pointer-events: none;
    transition: transform 0.35s ease;
}

#hamburger-menu.visible {
    transform: translateX(0);
    pointer-events: all;
}

#hamburger-btn {
    width: 44px;
    height: 44px;
    background: #7b3f00;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
}

#hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburger-btn.open span:nth-child(2) { opacity: 0; }
#hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#hamburger-dropdown {
    list-style: none;
    background: #7b3f00;
    border-radius: 8px;
    margin-top: 0.4rem;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

#hamburger-dropdown.open {
    max-height: 300px;
}

#hamburger-dropdown li a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: white;
    text-decoration: none;
    font-family: 'Boogaloo', cursive;
    font-size: 1.1rem;
    transition: background 0.2s ease;
}

#hamburger-dropdown li a:hover,
#hamburger-dropdown li a.active {
    background: rgba(255, 255, 255, 0.15);
}

/* Header */
header {
    padding: 1rem 0;
}

nav {
    display: flex;
    align-items: center;
}


nav ul {
    display: flex;
    list-style: none;
    width: 100%;
}

nav ul li {
    flex: 1;
    text-align: center;
    opacity: 0;
    animation: fadeDown 1s ease forwards;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* unmerge delays: left-to-right (1→2→3→4) */
nav ul li:nth-child(1) { animation-delay: 0.0s; transition-delay: 0s; }
nav ul li:nth-child(2) { animation-delay: 0.1s;  transition-delay: 0.08s; }
nav ul li:nth-child(3) { animation-delay: 0.2s;  transition-delay: 0.16s; }
nav ul li:nth-child(4) { animation-delay: 0.3s;  transition-delay: 0.24s; }

nav a {
    display: block;
    color: #7b3f00;
    text-decoration: none;
    padding: 0.5rem 0;
    font-size: 25px;
    font-family: 'Boogaloo', cursive;
    transition: transform 0.2s ease;
    text-shadow:
        -3px -3px 0 white,
         3px -3px 0 white,
        -3px  3px 0 white,
         3px  3px 0 white,
        -3px  0   0 white,
         3px  0   0 white,
         0   -3px 0 white,
         0    3px 0 white,
        -2px -2px 0 white,
         2px -2px 0 white,
        -2px  2px 0 white,
         2px  2px 0 white;
}

nav a.active {
    font-weight: bold;
    font-size: 30px;
}

nav a:hover {
    transform: scale(1.1);
}

/* Main content */
main {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.tab-content {
    position: relative;
    overflow: hidden;
}

.tab-panel {
    display: none;
    width: 100%;
}

.tab-panel.active {
    display: block;
}

.tab-panel.fade-up {
    animation: fadeUp 1s ease forwards;
}

.tab-panel.swipe-out-left {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0;
    animation: swipeOutLeft 0.7s ease forwards;
}

.tab-panel.swipe-out-right {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0;
    animation: swipeOutRight 0.7s ease forwards;
}

.tab-panel.swipe-in-right {
    animation: swipeInFromRight 0.7s ease forwards !important;
}

.tab-panel.swipe-in-left {
    animation: swipeInFromLeft 0.7s ease forwards !important;
}

/* Home layout */
.home-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: center;
}

.home-layout img {
    flex: 0 0 300px;
    height: 600px;
    object-fit: cover;
    border-radius: 32px;
}

.home-text {
    flex: 0 0 700px;
    max-width: 700px;
}

.tagline {
    text-align: center;
    font-style: italic;
    margin-bottom: 1.25rem;
    color: #555;
    font-size: 14px;
}

.home-text h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
}

.home-text p {
    font-size: 22px;
    margin-bottom: 1rem;
}

/* Travel blog photo */
#tab-travel-blog {
    position: relative;
}

#tab-travel-blog > img {
    display: block;
    width: calc(100% + 2rem);
    margin-left: -2rem;
    -webkit-mask-image: linear-gradient(to right, transparent 20%, black 75%);
    mask-image: linear-gradient(to right, transparent 20%, black 75%);
}

.home-overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    padding: 1rem;
}

.home-overlay-text h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 35px;
    margin-bottom: 0.75rem;
}

.home-overlay-text p {
    margin-bottom: 1rem;
    font-size: 24px
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 3rem;
    margin-top: 5rem;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 8rem;
    width: 6px;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
}

.timeline-line-fill {
    width: 100%;
    height: 0%;
    background: white;
}

.timeline-entry {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    align-items: center;
    gap: 0.5rem;
    margin: 6rem 0;
}

.timeline-node {
    width: 40px;
    height: 40px;
    justify-self: center;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-node img {
    width: 40px;
    height: auto;
}

.timeline-date {
    color: white;
    font-size: 2rem;
    padding: 2rem;
    font-weight: bold;
    font-family: 'Raleway', sans-serif;
}

.timeline-entry.left .timeline-date { text-align: left; }
.timeline-entry.right .timeline-date { text-align: right; }

.timeline-subtext {
    font-size: 0.85rem;
    font-weight: normal;
    margin-top: 0.3rem;
}

.timeline-subtext a {
    color: white;
    text-decoration: underline;
}

.timeline-card {
    position: relative;
    min-height: 150px;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.45);
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: translate 1.2s ease, opacity 1.2s ease, scale 0.2s ease;
    text-decoration: none;
}

.timeline-entry.left .timeline-card  { translate: -60px 0; }
.timeline-entry.right .timeline-card { translate: 60px 0; }

.timeline-card.visible {
    translate: 0 0;
    opacity: 1;
}

.timeline-card:hover {
    scale: 1.03;
}

.timeline-card h3 {
    color: white;
    font-size: 1.8rem;
}

.timeline-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s ease;
}

.timeline-card:hover::before {
    background: rgba(255, 255, 255, 0.15);
}

.timeline-card:hover {
    cursor: pointer;
}

.timeline-card.coming-soon,
.project-card.coming-soon {
    filter: grayscale(0.75) brightness(0.7);
    overflow: hidden;
}

.coming-soon-banner {
    position: absolute;
    top: 22px;
    right: -32px;
    width: 130px;
    background: #cc0000;
    color: white;
    text-align: center;
    font-family: 'Boogaloo', cursive;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.3rem 0;
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 2;
}

.timeline-entry.left .timeline-card::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border: 12px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.45);
}

.timeline-entry.right .timeline-card::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border: 12px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.45);
}

/* Timeline end */
.timeline-end {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.timeline-arrow-down {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 16px solid white;
}

.timeline-continued {
    color: white;
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    margin-top: 0.75rem;
}

/* Projects page */
.projects-links {
    margin-top: 1.5rem;
}

.projects-links .contact-links {
    width: auto;
    max-width: 500px;
}

.project-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    width: 80%;
    min-height: 150px;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.45);
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
}

.project-card h3 {
    color: white;
    font-size: 1.8rem;
}

.project-card:hover {
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0);
    transition: background 0.3s ease;
}

.project-card:hover::before {
    background: rgba(255, 255, 255, 0.15);
}

/* Contact layout */
.contact-layout {
    display: flex;
    gap: 3rem;
    align-items: stretch;
    margin-top: 1.5rem;
    justify-content: center;
}

/* Contact form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 840px;
    background: #d0eaf8;
    padding: 1.5rem;
    border-radius: 16px;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 1rem;
    font-weight: bold;
}

.contact-form input,
.contact-form textarea {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    background: white;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    align-self: flex-start;
    padding: 0.6rem 1.4rem;
    background: #7b3f00;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Boogaloo', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease, outline-offset 0.1s ease;
}

.contact-form button:hover {
    background: #5a2d00;
}

.contact-form button:focus-visible {
    outline: 3px solid #a855f7;
    outline-offset: 3px;
}

/* CV section */
.cv-preview {
    display: block;
    width: 50%;
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
}

.cv-download {
    display: block;
    margin-top: 1rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.6rem 1.4rem;
    background: #7b3f00;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-family: 'Boogaloo', cursive;
    font-size: 1.1rem;
    width: fit-content;
    transition: background 0.2s ease;
}

.cv-download:hover {
    background: #5a2d00;
}

.cv-download:focus-visible {
    outline: 3px solid #a855f7;
    outline-offset: 3px;
}

/* Contact links */
.contact-links {
    list-style: none;
    background: #d0eaf8;
    padding: 1.5rem;
    border-radius: 16px;
    width: 840px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-links li {
    font-size: 1.2rem;
    font-family: 'Raleway', sans-serif;
    color: #3b2a5e;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(100, 80, 160, 0.25);
}

.contact-links li:last-child {
    border-bottom: none;
}

.contact-links a {
    color: #7b3f00;
    text-decoration: none;
    font-weight: 600;
}

.contact-links a:hover {
    color: #a855f7;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.footer-links a {
    padding: 0.4rem 1rem;
    background: #7b3f00;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-family: 'Boogaloo', cursive;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.footer-links a:hover {
    background: #5a2d00;
}

.footer-links a:focus-visible {
    outline: 3px solid #a855f7;
    outline-offset: 3px;
}

/* ── Responsive ── */

/* Small-medium: typical laptops (1366px etc.) */
@media (max-width: 1200px) {
    .home-text {
        flex: 1 1 auto;
        max-width: 100%;
    }
    .contact-form,
    .contact-links {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
    }
}

/* Tablet / small laptop */
@media (max-width: 900px) {
    .home-layout {
        flex-direction: column;
        align-items: center;
    }
    .home-layout img {
        flex: none;
        width: 220px;
        height: 380px;
        margin-left: 0;
    }
    .home-text {
        flex: none;
        max-width: 100%;
        margin-left: 0;
    }
    .contact-layout {
        flex-direction: column;
    }
    .contact-form,
    .contact-links {
        width: 100%;
    }
    nav a { font-size: 18px; }
    nav a.active { font-size: 22px; }
    .home-overlay-text p { font-size: 16px; }
    .timeline-date {
        font-size: 1.3rem;
        padding: 0.75rem;
    }
}

/* Mobile */
@media (max-width: 600px) {
    main { padding: 1rem; }
    nav a { font-size: 12px; padding: 0.3rem 0; }
    nav a.active { font-size: 15px; }
    .home-overlay-text {
        width: 60%;
        padding: 0.5rem;
    }
    .home-overlay-text h2 { font-size: 20px; }
    .home-overlay-text p {
        font-size: 11px;
        margin-bottom: 0.5rem;
    }
    .timeline { padding: 1rem; }
    .timeline-entry { grid-template-columns: 1fr 28px 1fr; }
    .timeline-date {
        font-size: 0.85rem;
        padding: 0.3rem;
    }
    .cv-preview { width: 90%; }
    .footer-links {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}