/* ========================================== */
/* GENERAL & RESET                            */
/* ========================================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");


/* ========================================== */
/* COLOR THEMES (LIGHT & DARK)                */
/* ========================================== */
:root {
  /* Light Mode (Default) */
  --bg-color: white;
  --text-color: black;
  --p-text-color: rgb(85, 85, 85);
  
  --card-bg: rgb(250, 250, 250);
  --card-border: rgb(163, 163, 163);
  
  --btn-primary-bg: rgb(53, 53, 53);
  --btn-primary-text: white;
  
  --btn-secondary-bg: transparent;
  --btn-secondary-text: black;
  --btn-secondary-hover-bg: rgb(53, 53, 53);
  --btn-secondary-hover-text: white;
  
  --nav-bg: white;
  --shadow-color: rgba(0, 0, 0, 0.138);
  --modal-bg: white;
  
  --icon-filter: none;
  --link-hover: gray;
  --link-decoration: rgb(181, 181, 181);

  --dot-bg: #d0d0d0;
  --dot-active: #717171;
  --carousel-ctrl-bg: #f0f0f0;
  --carousel-ctrl-hover: #e5e5e5;

  /* LIGHT THEME -> TOGGLE IS DARK WITH LIGHT GLOW */
  --toggle-bg: #2b2b2b;
  --toggle-icon-color: #f1f1f1;
  --t-shadow-1: rgba(255, 255, 255, 0.4); 
  --t-shadow-2: rgba(0, 0, 0, 0.8);       
  --t-inset-1: rgba(255, 255, 255, 0.1);
  --t-inset-2: rgba(0, 0, 0, 0.8);
  --t-inset-3: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] {
  /* Dark Mode */
  --bg-color: #121212;
  --text-color: #f1f1f1;
  --p-text-color: #b3b3b3;
  
  --card-bg: #1e1e1e;
  --card-border: #444;
  
  --btn-primary-bg: #f1f1f1;
  --btn-primary-text: #121212;
  
  --btn-secondary-bg: transparent;
  --btn-secondary-text: #f1f1f1;
  --btn-secondary-hover-bg: #f1f1f1;
  --btn-secondary-hover-text: #121212;
  
  --nav-bg: #1a1a1a;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --modal-bg: #1e1e1e;
  
  --icon-filter: invert(1);
  --link-hover: #b3b3b3;
  --link-decoration: #666;

  --dot-bg: #444;
  --dot-active: #aaa;
  --carousel-ctrl-bg: #333;
  --carousel-ctrl-hover: #444;

  /* DARK THEME -> TOGGLE IS LIGHT WITH DARK SHADOW */
  --toggle-bg: #eaeaea;
  --toggle-icon-color: #2b2b2b;
  --t-shadow-1: rgba(0, 0, 0, 0.5);       
  --t-shadow-2: rgba(255, 255, 255, 0.6); 
  --t-inset-1: rgba(0, 0, 0, 0.2);
  --t-inset-2: rgba(255, 255, 255, 0.2);
  --t-inset-3: rgba(255, 255, 255, 0.8);
}

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

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: mandatory;
}

p {
  color: var(--p-text-color);
  transition: color 0.3s ease;
}

/* ========================================== */
/* TRANSITIONS                                */
/* ========================================== */
a,
.btn {
  transition: all 300ms ease;
}

/* ========================================== */
/* NEUMORPHIC THEME SWITCH                    */
/* ========================================== */
.theme-toggle-wrapper {
  transform: scale(0.5); 
  height: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle {
  display: inline-block;
  position: relative;
  height: 100px;
  width: 100px;
}

.toggle:before {
  box-shadow: 0;
  border-radius: 84.5px;
  background: var(--toggle-bg);
  position: absolute;
  margin-left: -36px;
  margin-top: -36px;
  opacity: 0.1;
  height: 72px;
  width: 72px;
  left: 50%;
  top: 50%;
  content: ""; 
}

.toggle .button {
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 
    0 -10px 15px -1px var(--t-shadow-1), 
    inset 0 -3px 4px -1px var(--t-inset-1), 
    0 15px 25px -4px var(--t-shadow-2), 
    inset 0 3px 4px -1px var(--t-inset-2), 
    inset 0 0 5px 1px var(--t-inset-3), 
    inset 0 20px 30px 0 var(--t-inset-2);
  border-radius: 68.8px;
  position: absolute;
  background: var(--toggle-bg);
  margin-left: -34.4px;
  margin-top: -34.4px;
  display: block;
  height: 68.8px;
  width: 68.8px;
  left: 50%;
  top: 50%;
}

.toggle .label {
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--toggle-icon-color);
  pointer-events: none; 
  font-size: 35px; /* Scales the Unicode characters up to look like icons */
  font-weight: normal;
}

.toggle .label span {
  transition: opacity 300ms ease;
}

/* Icon Swapping Logic using CSS */
.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

.toggle input {
  opacity: 0;
  position: absolute;
  cursor: pointer;
  z-index: 1;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  margin: 0;
}

.toggle input:active ~ .button {
  filter: blur(0.5px);
  box-shadow: 
    0 12px 25px -4px var(--t-shadow-1), 
    inset 0 -8px 30px 1px var(--t-inset-3), 
    0 -10px 15px -1px var(--t-shadow-2), 
    inset 0 8px 25px 0 var(--t-inset-1), 
    inset 0 0 10px 1px var(--t-inset-2);
}

/* ========================================== */
/* NAVIGATION - DESKTOP                       */
/* ========================================== */
nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 10vh;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: var(--text-color);
  text-decoration: none;
  text-decoration-color: transparent;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--link-decoration);
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}

/* ========================================== */
/* NAVIGATION - HAMBURGER (MOBILE)            */
/* ========================================== */
#hamburger-nav {
  display: none;
  position: relative;
}

.hamburger-menu {
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  width: 100%;
  background-color: var(--nav-bg);
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 100;
  box-shadow: 0px 10px 15px var(--shadow-color);
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--link-decoration);
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 400px;
}

/* Hamburger Icon Animations */
.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}
.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}
.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}
.hamburger-icon span:first-child {
  transform: none;
  opacity: 1;
}

/* ========================================== */
/* GENERAL SECTIONS & ICONS                   */
/* ========================================== */
section {
  scroll-snap-align: start;
  padding-top: 5vh;
  height: 100vh;
  margin: 0 10rem;
  min-height: fit-content;
}

.icon, .contact-icon {
  cursor: pointer;
  height: 2.5rem;
  filter: var(--icon-filter);
  transition: filter 0.3s ease;
}

.section-subtitle {
  text-align: center;
  font-weight: 600;
}

.section-title {
  font-size: 4rem;
  text-align: center;
}

/* ========================================== */
/* HERO TEXT SQUISH                           */
/* ========================================== */
.profile-text-wrapper .section-subtitle {
  margin-bottom: -10px; /* Pulls the name up closer to 'Hello, I'm' */
}

.profile-text-wrapper .section-title {
  line-height: 0.9; /* Shrinks the invisible box around the big name */
  margin-bottom: -5px; /* Pulls the 'Game Dev' role up closer */
}

.profile-text-wrapper .profile-role {
  margin-top: 0; 
}

/* ========================================== */
/* BUTTONS                                    */
/* ========================================== */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 10rem;
  border-radius: 0.5rem;
}

.btn-primary {
  font-size: 1rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 0.1rem solid var(--btn-primary-bg);
}

.btn-primary:hover {
  cursor: pointer;
  transform: scale(1.05);
  opacity: 0.9;
}

.btn-secondary {
  font-size: 1rem;
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border: 0.1rem solid var(--btn-secondary-text);
}

.btn-secondary:hover {
  cursor: pointer;
  background: var(--btn-secondary-hover-bg);
  color: var(--btn-secondary-hover-text);
  border: 0.1rem solid var(--btn-secondary-hover-bg);
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  width: auto;
}
.theme-toggle:hover {
  transform: scale(1.1);
  background: none;
  border: none;
}

/* ========================================== */
/* HERO / PROFILE SECTION                     */
/* ========================================== */
#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 90vh;
  position: relative;
}

.profile-image-wrapper {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
}

.profile-text-wrapper {
  align-self: center;
  text-align: center;
}

.profile-role {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

#social-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ========================================== */
/* ABOUT SECTION                              */
/* ========================================== */
#about {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-pic {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content-wrapper {
  display: block;
}

.about-image-wrapper {
  float: left;
  height: 300px;
  width: 300px;
  margin: 0 1rem 1rem 0;
}

.about-info-wrapper {
  display: block;
}

.about-cards-wrapper {
  clear: both;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.info-card {
  padding: 2rem 1.5rem;
  height: 100%;
  min-height: 250px;
  min-width: 250px;
  background: var(--card-bg);
  border: 0.1rem solid var(--card-border);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  border-radius: 1rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.arrow {
  position: absolute;
  bottom: 2rem;
  right: -5rem;
}

.up-arrow {
  position: absolute;
  top: 2rem;
  right: -5rem;
}

/* ========================================== */
/* TEXT HIGHLIGHT EFFECTS                     */
/* ========================================== */
.Drop-Cap {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1;
  margin-right: 0.2rem;
  transition: color 0.3s ease;
}

.Bold-Nouns {
  font-weight: 600;
  color: var(--p-text-color);
  transition: color 0.3s ease;
}

/* ========================================== */
/* SKILLS SECTION                             */
/* ========================================== */
#skills {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.skills-wrapper {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.card-title {
  color: var(--p-text-color);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
  transition: color 0.3s ease;
}

.skills-grid {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
  margin-top: 1rem;
}

.skills-grid p {
  visibility: hidden;
}

.skill-item {
  display: flex;
  width: 10rem;
  justify-content: space-around;
  gap: 0.5rem;
}

.skill-item .icon {
  cursor: default;
}

/* ========================================== */
/* PROJECTS SECTION & CAROUSEL                */
/* ========================================== */
#projects {
  position: relative;
}

.carousel-viewport {
  display: flex;
  padding: 3rem 0 4.5rem 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 95%, transparent 100%);
}

.carousel-track {
  display: flex;
  gap: 2rem;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  white-space: nowrap;
}

.carousel-track.grabbing {
  cursor: grabbing;
  user-select: none;
}

.project-card {
  display: inline-flex;
  flex-shrink: 0;
  flex-direction: column;
  padding: 1.5rem;
  padding-bottom: 2rem;
  flex: 1;
  background: var(--card-bg);
  border: 0.1rem solid var(--card-border);
  text-align: center;
  transition:
    transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.6s ease-in-out, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  width: 500px;
  height: fit-content;
  box-shadow: 0px 0px 10px 5px var(--shadow-color);
  border-radius: 1rem;
  justify-content: space-evenly;
}

.project-card.active {
  transform: scale(1.08);
  opacity: 1;
  z-index: 2;
}

.project-card:not(.active) {
  transform: scale(0.85);
  opacity: 0.5;
  color: var(--p-text-color);
}

.project-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

.project-image-wrapper {
  width: 100%;
  height: 500px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 0.5rem;
}

.project-title {
  margin: 1rem;
  white-space: normal;
  color: var(--text-color);
}

.project-btn {
  display: flex;
  justify-self: center;
  justify-content: center;
  align-items: center;
  color: var(--btn-secondary-text);
  border-color: var(--card-border);
}

.project-card .btn-container {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s, opacity 0.3s ease-in-out;
}

.project-card.active .btn-container {
  visibility: visible;
  opacity: 1;
}

.carousel-navigation-dots {
  display: flex;
  justify-content: center;
  align-content: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  background-color: var(--dot-bg);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
  background-color: var(--dot-active);
  transform: scale(1.2);
}

.carousel-controls {
  display: flex;
  align-content: center;
  justify-content: center;
  gap: 20px;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.prev-button,
.next-button {
  background-color: var(--carousel-ctrl-bg);
  border: 1px solid var(--card-border);
  padding: 12px 20px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 5px var(--shadow-color);
  height: 25px;
  width: 25px;
  border-radius: 50%;
}

.prev-button:hover,
.next-button:hover {
  background-color: var(--carousel-ctrl-hover);
  box-shadow: 0 4px 10px var(--shadow-color);
  transform: scale(1.1);
}

/* ========================================== */
/* CONTACT SECTION                            */
/* ========================================== */
#contact {
  display: flex;
  position: relative;
  justify-content: center;
  flex-direction: column;
  height: 80vh;
}

.contact-box {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: 0.1rem solid var(--card-border);
  background: var(--card-bg);
  margin: 2rem auto;
  padding: 0.5rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-item p {
  font-size: larger;
}

.contact-email-icon {
  height: 2.5rem;
}

/* ========================================== */
/* FOOTER                                     */
/* ========================================== */
footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}

/* ========================================== */
/* EXPANDED PROJECT MODALS / OVERLAYS         */
/* ========================================== */
.project-details-expanded {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 90%;
  max-height: 90%;
  height: 90%;
  z-index: 1000;
}

.modal-inner-content {
  background-color: var(--modal-bg);
  border: 2px solid var(--text-color);
  padding: 2rem;
  box-shadow: 0 4px 15px var(--shadow-color);
  border-radius: 1rem;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.modal-inner-content::-webkit-scrollbar {
  display: none;
}
.modal-inner-content {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.project-details-expanded h3 {
  font-size: 2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-color);
}

.project-details-expanded p {
  margin-bottom: 1rem;
}

.project-details-expanded ul {
  list-style: disc;
  margin-left: 2rem;
  margin-right: 2rem;
  margin-bottom: 1.5rem;
}

.project-details-expanded li {
  margin-bottom: 0.5rem;
  color: var(--p-text-color);
}

.close-expanded-btn {
  display: block;
  margin: 2rem auto 0;
  width: 10rem;
  font-size: 1.1rem;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 999;
  display: none;
}

.project-images {
  display: flex;
  cursor: grab;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0 1rem;
  user-select: none;
  transition: transform 0.4s ease-out;
}

.project-images.grabbing {
  cursor: grabbing;
}

.project-expanded-img {
  display: block;
  width: 900px;
  height: 500px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.close-icon {
  position: absolute;
  top: -50px;
  right: -15px;
  z-index: 1001;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--text-color);
  border: 2px solid var(--bg-color);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.close-icon span {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  background-color: var(--bg-color);
}

.close-icon span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-icon span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.close-icon:hover {
  background-color: #ff2e2e;
  border-color: #ff2e2e;
  transform: scale(1.1);
}
.close-icon:hover span {
  background-color: white;
}

.modal-quick-stats {
  list-style: none;
  margin-left: 0;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.modal-quick-stats li {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.modal-divider {
  margin-bottom: 1.5rem;
  border: none;
  border-top: 1px solid var(--card-border);
}

.modal-text-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.modal-deep-dive {
  list-style: disc;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.modal-deep-dive li {
  margin-bottom: 0.8rem;
  color: var(--p-text-color);
  line-height: 1.6;
}

.modal-btn-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-viewport {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent -5%, black 10%, black 90%, transparent 105%);
}

/* ========================================== */
/* FULLSCREEN IMAGE LIGHTBOX                  */
/* ========================================== */
#fullscreen-lightbox {
  border: none;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  margin: auto; /* This magically centers the dialog! */
  padding: 0;
  overflow: hidden;
}

#fullscreen-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

#lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain; /* Ensures the image never squishes or distorts */
  border-radius: 0.5rem;
  display: block;
}

/* Adjust the close button so it sits neatly in the top right corner of the screen */
#fullscreen-lightbox .close-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}
