* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    color: #6b4f2c;
    text-align: center;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    z-index: 0;

    background: linear-gradient(180deg, #fffaee, #fff4dd, #ffefcb, #fcefd4);
    background-size: 400% 400%;
    animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    position: relative;
}

.left-side {
    display: flex;
    align-items: center;
    gap: 20px;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

#logo img {
    height: 70px;
    width: auto;
}

#profile-menu img {
    height: 70px;
    width: auto;
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-icon {
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 6px;
    z-index: 1;
}

.profile-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
}

#profile-menu {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

#profile-menu .dropdown {
    top: 100%;
    margin-top: 5px;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.dropdown {
    display: none;
    position: absolute;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-top: 8px;
    min-width: 150px;
    text-align: left;
}

.dropdown a {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    font-family: 'Handlee', cursive;
}

.dropdown a:hover {
    background: #f5f5f5;
}

#profile-menu:hover .dropdown {
    display: block;
}

#login-register {
    position: static;
    font-size: 1.2rem;
    text-align: left;
    line-height: 1.4;
}

#login-register div {
    margin: 3px 0;
}

#login-register a {
    font-family: 'Sawarabi Mincho', serif;
    text-decoration: none;
    color: #6b4f2c;
    font-weight: 300;
    transition: color 0.2s ease-in-out;
}

#login-register a:hover {
    color: #5a4326;
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    margin: 0;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

h1 a {
    text-decoration: none;
    color: #6b4f2c;
    transition: color 0.2s ease-in-out;
}

h1 a:hover {
    color: #5a4326;
}

/* menu */
.menu {
    list-style-type: none;
    padding: 0;
    text-align: center;
    margin-top: 20px 0;
}

.menu li {
    display: inline-block;
    margin: 0 12px;
}

.menu li a {
    font-size: 1.5rem;
    font-family: 'Gochi Hand', cursive;
    text-decoration: none;
    color: #6b4f2c;
    font-weight: normal;
    padding: 8px 12px;
    position: relative;
    transition: color 0.3s ease;
}

.menu li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #5a4326;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu li a:hover {
    color: #5a4326;
    text-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.menu li a:hover::after {
    width: 100%;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

main h2 {
    font-family: 'Pacifico', cursive;
    font-size: 2.5rem;
    font-weight: 100;
    margin-bottom: 15px;
    color: #6b4f2c;
}

h3 {
    font-family: 'Gochi Hand', cursive;
    font-size: 2rem;
    font-weight: normal;
    color: #6b4f2c;
    margin: 20px 0 10px;
}

h4 {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.8rem;
    font-weight: 100;
    color: #6b4f2c;
    margin: 20px 0 10px;
}

p {
    font-family: 'Handlee', cursive;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #6b4f2c;
    max-width: 700px;
    margin: 10px auto;
    text-align: center;
}

section {
    margin-bottom: 40px;
}

.staff {
    list-style-type: none;
    padding-left: 0;
    margin: 10px auto;
    max-width: 700px;
    text-align: center;
}

.staff li {
    margin-bottom: 8px;
    font-family: 'Handlee', cursive;
    font-size: 1.2rem;
    color: #6b4f2c;
}

.fun-facts {
    list-style-type: none;
    padding-left: 0;
    margin: 10px auto;
    max-width: 700px;
    text-align: center;
}

.fun-facts li {
    margin-bottom: 8px;
    font-family: 'Handlee', cursive;
    font-size: 1.2rem;
    color: #6b4f2c;
}

.milestones {
    list-style-type: none;
    padding-left: 0;
    margin: 10px auto;
    max-width: 700px;
    text-align: center;
}

.milestones li {
    margin-bottom: 8px;
    font-family: 'Handlee', cursive;
    font-size: 1.2rem;
    color: #6b4f2c;
}

.description {
    font-family: 'Handlee', cursive;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 20px;
    line-height: 1.6;
    color: #6b4f2c;
}

:root{
  --center-width: 600px;
  --sidebar-w: 220px;
  --sidebar-gap: 60px;
}

.history-layout {
  position: relative;
  max-width: calc(var(--center-width) + 2*(var(--sidebar-w) + var(--sidebar-gap)));
  margin: 0 auto 24px;
  padding: 20px;
  text-align: center;
}

.main-content {
  width: var(--center-width);
  margin: 0 auto;
}

.sidebar {
  position: absolute;
  top: 20px;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.sidebar.left {
  left: calc(50% - (var(--center-width) / 2) - var(--sidebar-gap) - var(--sidebar-w));
}
.sidebar.right {
  left: calc(50% + (var(--center-width) / 2) + var(--sidebar-gap));
}

/* people cards */
.person {
  text-align: center;
  background: none;
  padding: 0;
  max-width: 220px;
}

.person img {
  width: 100%;
  max-width: 160px;
  border-radius: 50%;
  margin-bottom: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.person h5 {
  font-family: 'Great Vibes', cursive;
  margin: 0 0 4px 0;
  font-size: 1.45rem;
  color: #6b4f2c;
  white-space: nowrap;
}

.person p {
  font-family: 'Handlee', cursive;
  font-size: 1rem;
  color: #6b4f2c;
  line-height: 1.35;
  margin: 0 auto;
  max-width: 190px;
}

#time {
    font-family: 'Pacifico', cursive;
    font-size: 2rem;
    margin-bottom: 8px;
    color: #333;
}

#date {
    font-family: 'Gochi Hand', cursive;
    font-size: 1.5rem;
    color: #333;
}

#footer {
    background: transparent;
    padding: 20px 0;
    font-family: 'Handlee', cursive;
    color: #6b4f2c;
    flex-shrink: 0;
    align-items: center;
    text-align: left;
}

#footer .footer-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

#footer p {
    margin: 5px 0;
    color: #6b4f2c;
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: none;
}

#footer .footer-left,
#footer .footer-center,
#footer .footer-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

#footer .footer-center {
    flex: 0 0 80px;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
}

#footer .footer-left,
#footer .footer-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

#footer p,
#footer .footer-left,
#footer .footer-right {
    font-size: 1rem;
    line-height: 1.2;
    margin: 2px 0;
    color: #6b4f2c;
}

#footer .footer-left {
    align-items: flex-start;
    text-align: left;
    font-size: 1rem;
    color: #6b4f2c;
}

#footer .footer-right {
    align-items: flex-end;
    text-align: right;
    font-size: 1rem;
    color: #6b4f2c;
}

#footer .footer-icon {
    width: 50px;
    height: auto;
    margin-left: 130px;
}

#footer a {
    color: #6b4f2c;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease-in-out;
}

#footer a:hover {
    color: #5a4326;
}

@media screen and (max-width: 768px) {
    #footer .footer-inner {
        flex-direction: column;
        padding: 0 20px;
        gap: 15px;
    }

    #footer .footer-left,
    #footer .footer-center,
    #footer .footer-right {
        align-items: center;
        text-align: center;
    }

    .history-layout {
        max-width: 100%;
        padding: 12px;
    }
    .main-content {
        width: 100%;
        margin: 0 auto;
    }
    .sidebar {
        position: static;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 16px;
        margin-bottom: 12px;
    }
    .person { max-width: 160px; }
    .person img { max-width: 120px; }
    .person p { max-width: 140px; font-size: 0.95rem; }

    .header {
        flex-direction: column;
        padding: 10px 20px;
    }

    .left-side {
        position: static;
        transform: none;
        margin-bottom: 10px;
        justify-content: center;
        gap: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    #login-register {
        text-align: center;
    }

    .menu li {
        display: block;
        margin-bottom: 8px;
    }
}