/* # id . class* /
/* Theme System (Light / Dark)*/

/* Default fallback (light) */
html {
    background-color: #ffffff;
    color: #000000;
}

/* -------------------- Light Theme -------------------- */
html[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #000000;
    --border-color: #dddddd;
    --header-bg: #ffffff;
}

/* -------------------- Dark Theme -------------------- */
html[data-theme="dark"] {
    --bg-color: #0f0f0f;
    --text-color: #eaeaea;
    --border-color: #2a2a2a;
    --header-bg: #151515;
}

/* -------------------- Global Theme Usage -------------------- */

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* smooth color transition for elements */
body,
.global-header {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

/* Header */

.global-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    max-width: 1100px;
    margin: auto;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-color);
}

.header-logo img {
    height: 28px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
}

.nav-icon {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
}

.nav-icon img {
    height: 20px;
}

/* -------------------- Global Header -------------------- */
.global-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.header-inner {
  max-width: 1100px;
  margin: auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.header-logo img {
  width: 28px;
  height: 28px;
}

/* Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-nav .nav-link {
  font-size: 15px;
  opacity: 0.9;
  text-decoration: none;
}

.header-nav .nav-link:hover {
  text-decoration: underline;
}

/* Icon buttons (GitHub, future theme toggle, etc.) */
.nav-icon {
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
}

.nav-icon img {
  width: 20px;
  height: 20px;
}

.nav-icon:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Main content */
.main {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

.main #page-title {
    font-size: clamp(24px, 5vw, 38px); /* responsive font size */
    text-align: center;
    padding-top: 10px;
    padding-left: 20px;   /* dynamic horizontal padding */
    padding-right: 20px;  /* dynamic horizontal padding */
}

.main #page-title #description {
    font-size: clamp(14px, 2.5vw, 18px); /* responsive description */
    text-align: center;
}

.main a {
    color: inherit;
    text-decoration: none;
}

.main a:hover {
    text-decoration: underline;
    cursor: pointer;
}

#Section {
    text-align: center;
}

#Section .SubSection {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

footer {
    margin-top: 40px;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

/* Icon link */
.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon-link img {
    width: 16px;
    height: 16px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .icon-link {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .icon-link img {
        width: 48px;
        height: 48px;
        display: block;
    }
}
/* -------------------- Theme Transition Overlay -------------------- */

.theme-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 9999;
    pointer-events: none;
    transform: translateX(-100%);
}

/* wipe animation */
.theme-transition-overlay.active {
    animation: themeSwipe 0.6s ease forwards;
}

@keyframes themeSwipe {
    0% {
        transform: translateX(-100%);
    }
    45% {
        transform: translateX(0%);
    }
    55% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}
