/* Universal Zero Margin / Padding Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base Theme Variables applied to root <html> */
:root {
  --bg-color: #000000;
  --text-color: #f0f0f0;
  --muted-text: #888888;
  --accent-line: #ffffff;
  --track-line: rgba(255, 255, 255, 0.2);
  --ui-bg: rgba(20, 20, 20, 0.75);
  --ui-border: rgba(255, 255, 255, 0.2);
  --submenu-bg: #111111;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --slide-duration: 5000ms;
}

/* Light Theme Variables */
:root[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #0a0a0a;
  --muted-text: #555555;
  --accent-line: #000000;
  --track-line: rgba(0, 0, 0, 0.15);
  --ui-bg: rgba(245, 245, 245, 0.85);
  --ui-border: rgba(0, 0, 0, 0.15);
  --submenu-bg: #f9f9f9;
}

html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  overflow: hidden;
  position: relative;
  transition: background-color 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
}

/* Site Header */
.site-header {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 1000;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  color: var(--text-color);
  cursor: pointer;
  padding: 6px 12px;
  font-family: var(--font-family);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 2px;
  transition: all 0.25s ease;
  user-select: none;
}

.theme-toggle-btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.theme-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* Navigation Dropdown */
.nav-menu {
  list-style: none;
}

.menu-item {
  position: relative;
}

.menu-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-block;
  padding: 6px 14px;
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 2px;
  transition: opacity 0.2s ease;
}

.menu-link:hover {
  opacity: 0.8;
}

.caret {
  font-size: 0.6rem;
  margin-left: 2px;
}

.submenu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--submenu-bg);
  border: 1px solid var(--ui-border);
  list-style: none;
  min-width: 150px;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.submenu li a {
  display: block;
  padding: 10px 16px;
  color: var(--muted-text);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}

.submenu li a:hover {
  color: var(--text-color);
  background: var(--track-line);
}

.has-dropdown:hover .submenu {
  display: block;
}

/* Centered Viewport Image Display (Full-bleed Zero Margins) */
.viewport-stage {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
}

.slider-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  filter: grayscale(100%) contrast(105%);
  user-select: none;
  -webkit-user-drag: none;
}

/* Slim Bottom Progress Bar */
.progress-bar-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 2.5px;
  background-color: var(--track-line);
  z-index: 90;
  overflow: hidden;
  transition: background-color 0.35s ease;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background-color: var(--accent-line);
  transition: width 0.05s linear, background-color 0.35s ease;
}

/* Footer */
.site-footer {
  position: fixed;
  bottom: 14px;
  left: 0;
  width: 100vw;
  display: flex;
  justify-content: center;
  z-index: 80;
  pointer-events: none;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 5px 14px;
  border-radius: 2px;
  transition: all 0.35s ease;
}

.social-links a {
  color: var(--muted-text);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--text-color);
}

.divider {
  color: var(--muted-text);
  font-size: 0.72rem;
  opacity: 0.4;
}

/* Secondary Pages */
.content-wrapper {
  max-width: 580px;
  width: 90%;
  text-align: center;
  z-index: 10;
}

.page-title {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--text-color);
}

.text-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--muted-text);
  letter-spacing: 0.02em;
}

.text-body p {
  margin-bottom: 14px;
}

.inline-link {
  color: var(--text-color);
  text-decoration: underline;
  text-underline-offset: 4px;
}
