/* --- 1. Variables --- */
:root {
  --light-bg: #ffffff;
  --light-text-main: #222222;
  --light-text-context: #666666;
  --light-accent: #3a70ff;
  --dark-bg: #1a1a1a;
  --dark-text-main: #e0e0e0;
  --dark-text-context: #888888;
  --dark-accent: #66ccff;
  --dark-border-device: #444444;
  --light-device-screen-bg: #efefef;
  --dark-device-screen-bg: #2b2b2b;
}
/* --- Footer -- */
.social-links i {
  font-size: 2rem;
}
/* --- 2. Base & Dark Mode --- */
body {
  background-color: var(--light-bg);
  color: var(--light-text-main);
  /* Use a fallback font stack */
  font-family: "Roboto Mono", monospace;
  padding: 3rem;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}
body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text-main);
}
body.dark-mode .minimal-context,
body.dark-mode .project-detail {
  color: var(--dark-text-context);
}
body.dark-mode .minimal-link {
  color: var(--dark-accent);
}
body.dark-mode .minimal-link:hover {
  color: var(--dark-text-main);
}
body.dark-mode .minimal-header,
body.dark-mode .minimal-section-title {
  color: var(--dark-text-main);
}

/* --- 3. Typography & Links --- */
.minimal-header {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.minimal-context {
  font-size: 1.1rem;
  color: var(--light-text-context);
  margin-bottom: 3rem;
}
.minimal-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}
.minimal-link {
  color: var(--light-accent);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 700;
}
.minimal-link:hover {
  color: #000000;
}
body.dark-mode .minimal-link:hover {
  color: var(--dark-text-main); /* Ensure dark mode link hover is visible */
}

/* --- 4. Lists & Grid Layout --- */
.minimal-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 1rem;
  justify-content: center; /* Center items on smaller screens */
}
.minimal-list li {
  padding: 0;
  width: 100%;
  max-width: 300px;
  margin-bottom: 0;
}
.project-thumbnail-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.project-thumbnail-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
  text-align: center;
  margin-top: 0.5rem;
}
.project-detail {
  color: var(--light-text-context);
  font-style: italic;
  display: block;
  line-height: 1.3;
  text-align: center;
}

/* --- 5. Apps Grid Responsiveness --- */
/* Use max-width on LI for consistent size, but allow flex-basis */
#apps-list li,
#projects-list-top li,
#projects-list-hidden li {
  flex-basis: 300px; /* Provides a base size */
  flex-grow: 1;
  max-width: 380px; /* Allow wider on larger screens */
}

/* --- 6. General Media/Device Wrapper --- */
.device-wrapper {
  display: block;
  overflow: hidden;
  width: 100%;
}
.device-wrapper img,
.device-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- 7. iOS/App Styles (Realistic Phone) --- */
.ios-wrapper {
  max-width: 300px;
  padding: 1px;
  border-radius: 40px;
  position: relative;
  aspect-ratio: 9 / 19;
  margin: 0 auto;
  border: 4px solid #111;
  background-color: #333;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset,
    0 0 0 2px rgba(0, 0, 0, 0.3) inset, 0 20px 40px rgba(0, 0, 0, 0.4);
}
body.dark-mode .ios-wrapper {
  border: 4px solid #fff;
  background-color: #555;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1) inset,
    0 0 0 2px rgba(255, 255, 255, 0.2) inset, 0 20px 40px rgba(0, 0, 0, 0.6);
}
.ios-wrapper .screen-content {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 25px;
  position: relative;
  background-color: var(--light-device-screen-bg);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) inset;
}
body.dark-mode .ios-wrapper .screen-content {
  background-color: var(--dark-device-screen-bg);
}
.ios-wrapper .screen-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 30px;
  background: #111;
  border-radius: 0 0 15px 15px;
  z-index: 10;
}

/* --- 8. Desktop Styles (Realistic Monitor) --- */
.desktop-wrapper {
  height: 180px;
  max-width: 400px;
  border-radius: 8px;
  position: relative;
  padding: 2px;
  margin: 0 auto;
  background-color: #222;
  border: 1px solid #000;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
/* Monitor stand styles remain valid and unchanged */

/* --- 9. Toggle Buttons & Header --- */
#more-projects-button {
  display: block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: 1px solid var(--light-text-context);
  border-radius: 5px;
  color: var(--light-text-main);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
  margin-right: auto;
}
#more-projects-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: var(--light-text-main);
}
body.dark-mode #more-projects-button {
  border-color: var(--dark-text-context);
  color: var(--dark-text-main);
}
body.dark-mode #more-projects-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--dark-text-main);
}
.dark-mode-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 5px;
  border: 1px solid var(--light-text-context);
  background-color: transparent;
  color: var(--light-text-main);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
  z-index: 100;
}
body.dark-mode .dark-mode-toggle {
  border-color: var(--dark-text-context);
  color: var(--dark-text-main);
}
.profile-image {
  height: 200px;
  border-radius: 50%;
  margin-bottom: 20px;
  object-fit: cover;
  border: 4px solid var(--light-bg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-left: auto;
  margin-right: auto;
}
header {
  text-align: center;
}
body.dark-mode .profile-image {
  border: 4px solid var(--dark-bg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --- 10. Ko-fi Button Styling --- */
.ko-fi-img {
  height: 36px;
  border: 0;
  display: inherit;
}
