/* ================================
   1. Theme & UI Scale Variables
   ================================ */
:root {
  --ui-scale: 0.5;

  --bg-color: #ffffff;
  --header-bg: #f0f0f0;
  --text-color: #333333;
  --border-color: #cccccc;
  --btn-hover: #e0e0e0;
  --card-bg: #ffffff;
  
  --accent-color: #333333;
  --font-family: sans-serif;
}

[data-theme="dark"] {
  --bg-color: #121212;
  --header-bg: #1e1e1e;
  --text-color: #ffffff;
  --border-color: #444444;
  --btn-hover: #333333;
  --card-bg: #222222;
}

/* Cyberpunk Mode Theme */
[data-theme="cyberpunk"] {
  --bg-color: #0d0221;
  --header-bg: #190533;
  --text-color: #00ffcc;
  --border-color: #ff007f;
  --btn-hover: #2b0a4d;
  --card-bg: #120326;
}

/* ================================
   2. Base Styles
   ================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family, sans-serif);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

/* ================================
   3. Scalable Header Navigation (Sticky)
   ================================ */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(3rem * var(--ui-scale)) calc(4rem * var(--ui-scale));
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  align-items: center;
  gap: calc(1.5rem * var(--ui-scale));
}

.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--text-color);
  background: none;
  border: none;
  padding: calc(0.5rem * var(--ui-scale)) calc(1rem * var(--ui-scale));
  font-size: calc(1.75rem * var(--ui-scale));
  border-radius: calc(6px * var(--ui-scale));
  cursor: pointer;
}

.btn:hover {
  background-color: var(--btn-hover);
}

.title-btn {
  font-size: calc(3.5rem * var(--ui-scale));
  font-weight: bold;
  padding-left: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  padding: calc(0.5rem * var(--ui-scale));
}

.icon-btn img {
  width: calc(32px * var(--ui-scale));
  height: calc(32px * var(--ui-scale));
  display: block;
}

[data-theme="dark"] .icon-btn img,
[data-theme="cyberpunk"] .icon-btn img {
  filter: invert(1);
}

/* ================================
   4. Scalable Main Content
   ================================ */
main {
  flex: 1;
  display: flex; 
  flex-direction: column;
  justify-content: center; 
  align-items: center;     
  width: 100%;
  padding: 0;
}

/* Centered styling for PAGE headings on other pages */
.page-title {
  text-align: center;
  font-size: calc(6rem * var(--ui-scale));
  padding: calc(4rem * var(--ui-scale)) 5%;
  color: var(--text-color);
  font-weight: bold;
}

/* ================================
   5. Larger Settings Box Layout (Fully Centered)
   ================================ */
.settings-box {
  width: 100%;
  max-width: 800px; 
  min-height: 480px; 
  border: 3px solid var(--text-color);
  border-radius: 16px;
  padding: 2.5rem; 
  background-color: var(--card-bg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-size: 20px; 
  margin: 2rem 0; 
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.settings-dropdown {
  padding: 0.75rem 1.25rem;
  font-size: 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.slider-container label, 
.slider-container span {
  font-size: 1.25rem;
  font-weight: 500;
}

.slider-container input[type="range"] {
  width: 280px; 
  height: 8px;
  accent-color: var(--text-color);
  cursor: pointer;
}

/* ================================
   6. Hero Layout for Page 1 (Edge-to-Edge & UI-Scaled)
   ================================ */
.hero-container {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  align-items: center;
  gap: calc(5rem * var(--ui-scale));
  
  background-color: var(--header-bg);
  
  width: 100vw;
  max-width: 100vw;
  border-radius: 0;
  
  margin: 0;
  padding: calc(4rem * var(--ui-scale)) calc(6rem * var(--ui-scale));
  min-height: 65vh; 
}

/* Left Text Box */
.hero-text-box {
  display: flex;
  flex-direction: column;
  max-width: 92%; 
  padding-left: calc(5rem * var(--ui-scale));
}

.hero-text-box p {
  font-size: calc(4.8rem * var(--ui-scale)); 
  line-height: 1.55;
  color: var(--text-color);
  margin: 0;
}

/* Right Image Box */
.hero-image-box {
  display: flex;
  justify-content: flex-end;
}

.hero-image-box img {
  width: 100%;
  max-width: calc(850px * var(--ui-scale)); 
  height: auto;
  object-fit: cover;
  display: block;
}

/* ================================
   7. Page 3 Specific Layout (Flipped Hero)
   ================================ */
.hero-container.flip-layout {
  grid-template-columns: 1fr 1.6fr;
}

.hero-container.flip-layout .hero-image-box {
  justify-content: flex-start;
}

.hero-text-box.unemployed-text {
  padding-left: 0;
  padding-right: calc(5rem * var(--ui-scale));
}

/* ================================
   8. Contact Me Page Pill Buttons
   ================================ */
.hero-container.contact-layout {
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-buttons-container {
  display: flex;
  flex-direction: column;
  gap: calc(2rem * var(--ui-scale));
  width: 100%;
  max-width: calc(900px * var(--ui-scale));
}

.contact-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: calc(2.2rem * var(--ui-scale)) calc(3rem * var(--ui-scale));
  background-color: var(--card-bg);
  color: var(--text-color);
  border: calc(3px * var(--ui-scale)) solid var(--text-color);
  border-radius: calc(60px * var(--ui-scale));
  font-size: calc(3rem * var(--ui-scale));
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s, transform 0.2s;
}

.contact-pill-btn:hover {
  background-color: var(--btn-hover);
  transform: scale(1.01);
}

/* ================================
   9. Advanced Settings Additions
   ================================ */
html.dyslexia-font body {
  letter-spacing: 0.05em;
  word-spacing: 0.1em;
  font-weight: 500;
}

html.hacker-mode body {
  background-color: #000000 !important;
  color: #00ff00 !important;
}
html.hacker-mode header, 
html.hacker-mode .settings-box, 
html.hacker-mode .hero-container {
  background-color: #051105 !important;
  border-color: #00ff00 !important;
  color: #00ff00 !important;
}
html.hacker-mode .btn, 
html.hacker-mode p, 
html.hacker-mode span, 
html.hacker-mode label {
  color: #00ff00 !important;
}

.checkbox-row {
  justify-content: space-between;
}
.checkbox-row input[type="checkbox"] {
  width: 24px;
  height: 24px;
  cursor: pointer;
}
.stats-row {
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
}

/* ================================
   10. Contact Email Logo Styling
   ================================ */
.email-logo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(1.5rem * var(--ui-scale));
}

.contact-logo {
  height: calc(2.2rem * var(--ui-scale));
  width: auto;
  object-fit: contain;
  display: block;
}

/* ================================
   11. Who I Am Page Text Scaling
   ================================ */
.who-i-am-text p {
  font-size: calc(3.2rem * var(--ui-scale)) !important; /* Smaller than default 4.8rem */
}

/* ================================
   12. Easter Egg Modal & Secret Button
   ================================ */

/* Make the settings box a positioning anchor for the invisible button */
.settings-box {
  position: relative; 
}

/* The Invisible Button */
.secret-trigger {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  cursor: default; /* Keeps it looking like normal background */
  background: transparent;
  border: none;
  outline: none;
  z-index: 10;
}

/* The Modal Overlay */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

/* The Modal Box */
.modal-box {
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: var(--text-color);
}

.modal-box h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.modal-box p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.8;
}

/* The 4-Digit Input Boxes */
.code-input-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2rem;
}

.code-input {
  width: 60px;
  height: 80px;
  font-size: 2.5rem;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  outline: none;
  transition: border-color 0.2s;
  font-family: monospace;
}

.code-input:focus {
  border-color: var(--text-color);
}

.close-modal-btn {
  border: 2px solid var(--border-color);
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
}

/* Quick animation for incorrect code */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.error-shake {
  animation: shake 0.2s ease-in-out;
  border-color: red !important;
}