/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Lora:wght@400;600&display=swap");

:root {
  --nav-height: 40px;
  /* New Resume-Inspired Theme Colors */
  --bg-color: #f8f4e9;
  --text-color: #3d403a;
  --accent-color: #5f6f52;
  --accent-light: #a9b4a2;
  /* Dark Mode Palette */
  --dark-bg-color: #2a2e2a;
  --dark-text-color: #e0e2d7;
}

body {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header nav nav"
    "main main main"
    "footer footer footer";
  background-color: var(--bg-color);
  font-family: "Lato", sans-serif; /* THEME CHANGE */
  color: var(--text-color); /* THEME CHANGE */
  transition: background-color 0.3s, color 0.3s;
}

a {
  text-decoration: none;
  color: inherit;
}

header {
  grid-area: header;
  font-size: 2vw;
  text-align: center;
  min-height: 10vh;
  display: none;
}

nav {
  grid-area: nav;
  padding: 20px 20px;
  height: var(--nav-height);
  display: flex; /* ADD */
  align-items: center; /* ADD */
  justify-content: flex-end; /* ADD */
}

main {
  grid-area: main;
}

footer {
  grid-area: footer;
  max-height: 20vh;
}

section {
  max-width: 100vw;
  max-height: max-content;
  padding: 0px 10px 30px 0px;
}

section p {
  font-size: 24px;
  color: var(--text-color); /* THEME CHANGE */
  font-weight: 300; /* THEME CHANGE */
  width: auto;
  padding-top: 0px;
}

section h2 {
  font-size: 22px;
  color: var(--text-color); /* THEME CHANGE */
  font-weight: 600; /* THEME CHANGE */
  padding-left: 40px;
  padding-top: 10px;
  font-family: "Lora", serif; /* THEME CHANGE */
}

/* >>> INTRO: lock h2 to original esosa-site behavior (scoped) <<< */
#intro h2 {
  font-size: 22px; /* same as section h2 base */
  padding-left: 40px; /* keep the left inset identical */
  padding-top: 10px;
  font-weight: 600;
  font-family: "Lora", serif;
}

section h3 {
  font-family: "Lora", serif; /* THEME CHANGE */
  font-size: 15px;
  font-variant: small-caps;
  font-weight: 600;
  color: var(--accent-color); /* THEME CHANGE */
  letter-spacing: 2px;
  margin: 0;
  padding: 0 20px 15px 35px; /* removed bottom padding so it doesn’t drag height */
  line-height: 1.2;
  display: flex;
  align-items: flex-start; /* make sure it hugs the top */
}

section h4 {
  font-size: 15px;
  font-weight: 700; /* THEME CHANGE */
  margin-top: 0;
  margin-bottom: -10px;
  color: var(--text-color); /* THEME CHANGE */
}

section h5 {
  font-size: 14px;
  font-weight: 600; /* THEME CHANGE */
  margin-top: 0;
  margin-bottom: 0; /* BUG FIX: Removed negative margin to help with arrow alignment */
  color: var(--text-color); /* THEME CHANGE */
}

.reveal {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.reveal.active {
  opacity: 1;
}

.dark-mode-button {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.dark-mode-button span {
  font-size: 19px;
  color: var(--text-color); /* THEME CHANGE */
  padding-bottom: 5px;
}

.dark-mode-button input {
  display: none;
}

.switch {
  display: inline-block;
  height: 25px;
  width: 45px;
  background-color: var(--accent-light); /* THEME CHANGE */
  border-radius: 40px;
  margin: 0 5px;
  position: relative;
  transition: all 0.3s;
}

.switch:hover {
  cursor: pointer;
}

.switch::after {
  content: "";
  display: inline-block;
  height: 19px;
  width: 19px;
  background-color: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 1px 2px 2px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.dark-mode-button input:checked + .switch {
  background-color: var(--accent-color); /* THEME CHANGE */
}

.dark-mode-button input:checked + .switch::after {
  left: 23.5px;
}

.dark-mode {
  background-color: var(--dark-bg-color); /* THEME CHANGE */
}

.dark-mode .switch {
  background-color: var(--accent-color); /* THEME CHANGE */
}

.dark-mode p,
.dark-mode .project p,
.dark-mode li,
.dark-mode h2,
.dark-mode h4,
.dark-mode h5,
.dark-mode .get,
.dark-mode .bright,
.dark-mode .bold,
.dark-mode #right a {
  color: var(--dark-text-color); /* THEME CHANGE */
}

.dark-mode span {
  color: var(--dark-text-color);
}

.dark-mode .pink,
.dark-mode #other h3 {
  /* BUG FIX: Recent Projects title color in dark mode */
  color: var(--accent-light); /* THEME CHANGE */
}

.dark-mode #other li {
  color: var(--accent-light); /* THEME CHANGE */
  background-color: transparent; /* THEME CHANGE */
  border: solid 1px var(--accent-light); /* THEME CHANGE */
}

.dark-mode #made p {
  color: var(--dark-text-color); /* THEME CHANGE */
}

.dark-mode #icons svg,
.dark-mode .design svg,
.dark-mode .top svg,
dark-mode #up-arrow,
.dark-mode #made svg,
.dark-mode #left svg {
  fill: var(--accent-light); /* THEME CHANGE */
}

.dark-mode .proto-container div {
  background-color: var(--dark-bg-color); /* THEME CHANGE */
}

.dark-mode #right {
  border-bottom: 3px solid var(--accent-light); /* THEME CHANGE */
}

.dark-mode #right::before {
  /* BUG FIX: Email hover animation color */
  background-color: var(--accent-light);
}

.dark-mode #text a::after {
  border-bottom: 2px solid var(--accent-light); /* THEME CHANGE */
}

#greeting {
  transition: opacity 8s ease-in-out;
  margin-bottom: 1px;
  padding-bottom: 0;
  height: 45px;
}

.pointer {
  transition: transform 0.3s ease;
}

.pointer:hover {
  cursor: pointer;
}

#intro {
  display: flex;
  padding: 0;
  margin: 0;
  min-height: calc(100vh - var(--nav-height));
}

#intro p {
  line-height: 1.5;
  padding-left: 40px;
  font-size: 4vh;
  padding-top: 0;
  font-family: "Lora", serif; /* THEME CHANGE */
}

#intro-wrapper {
  max-height: 100%;
  padding: 5px 15px 0px 10px;
  display: flex;
  flex-direction: column;
  margin: 0;
  gap: 0px;
}

#intro span {
  font-weight: 600; /* THEME CHANGE */
}

.pink {
  color: var(--accent-color); /* THEME CHANGE */
}

#in-touch {
  display: flex;
  flex-direction: column;
  padding: 30px 35px;
  font-weight: 350;
  gap: 2.5px;
}

#in-touch .get {
  font-size: 2.4vh;
  font-weight: 300; /* THEME CHANGE */
  padding: 0;
  margin: 0;
}

#left {
  width: 100%;
  margin-top: 0px;
  display: flex;
  gap: 2vh;
}

#left svg {
  fill: var(--accent-color); /* THEME CHANGE */
}

#right {
  width: max-content;
  border-bottom: 3px solid var(--accent-color); /* THEME CHANGE */
  padding: 2px 3px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

#right a {
  color: var(--text-color); /* THEME CHANGE */
}

#right::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--accent-color); /* THEME CHANGE */
  transition: height 0.2s;
  z-index: -1;
}

#right:hover::before {
  height: 100%;
}

#right:hover a {
  color: var(--bg-color); /* THEME CHANGE */
}

/* Back-to-top arrow — original sizing */
#up svg {
  width: 15px;
  height: 20px;
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 100;
  padding: 10px;
  display: none;
  transition: transform 0.3s ease;
}
#up svg:hover {
  transform: translateY(-10px);
  cursor: pointer;
}
#up-arrow {
  fill: var(--accent-color); /* THEME CHANGE */
}

#background h3 {
  flex: 0 0 20%; /* left column (title) */
  margin: 0;
}

#background p {
  font-size: 15px;
  padding: 5px 40px 5px 65px;
  line-height: 24px;
  margin: 0;
}

.bold {
  font-weight: 600; /* THEME CHANGE */
}

#skills,
#view,
#other {
  padding-top: 50px;
}

#skills-container {
  display: flex;
  width: 100%;
  padding: 10px 20px;
  justify-content: flex-end;
  box-sizing: border-box;

  /* NEW: force side-1 and side-2 to align at top */
  align-items: flex-start;
}

#types-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 83%;
  /* float: left;    */ /* ensures breathing room */
  box-sizing: border-box;
}

.types {
  width: 40%;
  height: 30%;
}

#skills ul {
  color: var(--text-color); /* THEME CHANGE */
  list-style: none;
  font-size: 13px;
  padding: 0;
  margin-bottom: 40px;
  font-weight: 300; /* THEME CHANGE */
  width: 70%;
}

#skills li {
  padding: 5px 0px;
}

#music-container {
  max-width: 100vw;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.proto-container {
  max-width: 100%;
  margin: 0;
  display: flex;
  padding: 0;
  justify-content: flex-end;
}

/* BUG FIX: Added padding for app images */
#view > .side-2 > .music-container > .proto-container {
  padding: 0 20px;
}

.proto-container img {
  padding: 0;
  margin: 0;
  width: 80%;
  height: auto;
}

/* BUG FIX: Centering for single app image (laptop) */
.proto-container div:only-child img {
  display: block;
  margin: 0 auto;
}

.proto-container div {
  width: 100%;
  background-color: var(--bg-color); /* THEME CHANGE */
  height: auto;
  padding: 0;
  margin: 0;
}

.design {
  font-size: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0px 50px 20px 50px;
}

.design p {
  font-size: 13px;
  padding: 0px;
  margin: 0;
  line-height: 1.7;
  max-width: 100%;
  font-weight: 300; /* THEME CHANGE */
}

.design svg,
.top svg {
  fill: var(--accent-color); /* THEME CHANGE */
}

.design:hover .pointer {
  transform: translateX(6px);
  cursor: pointer;
}

.project {
  display: flex;
  max-width: 100%;
  flex-direction: column;
  margin-bottom: 25px;
  padding: 5px 15px 0px 60px;
}

.project div {
  padding: 2px;
}

.top {
  display: flex;
  gap: 15px;
  width: 100%;
  align-items: center; /* BUG FIX: Vertical alignment for project title and arrow */
}

.top h5:hover {
  cursor: pointer;
}

.top:hover .pointer {
  transform: translateX(6px);
}

.middle {
  width: 100%;
}

.middle p {
  color: var(--text-color); /* THEME CHANGE */
  padding: 0;
  font-size: 13px;
  max-width: 85%;
  line-height: 22px;
  margin-top: 8px;
}

#other ul {
  display: inline-block;
  padding-left: 0;
  margin-top: 5px;
}

#other li {
  display: inline-block;
  color: var(--accent-color); /* THEME CHANGE */
  padding: 4px 8px;
  margin: 0px 4px 7px 0px; /* Adjusted margin */
  border: solid 1px var(--accent-color); /* THEME CHANGE */
  border-radius: 6%;
  font-size: 11px;
  font-weight: 600; /* THEME CHANGE */
}

.bottom {
  margin-top: 2px;
  max-width: 80%;
  width: 100%;
}

footer {
  display: flex;
  align-items: flex-end;
  padding-bottom: 8px;
  height: 25vh;
  margin-top: 80px;
}

.footer-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 35px 5px;
}

#made {
  color: var(--text-color); /* THEME CHANGE */
  padding: 0;
  margin: 0;
  width: 50%;
  height: 50%;
}

#made p {
  font-size: 15px;
  font-weight: 600; /* THEME CHANGE */
  line-height: 1.7;
  font-variant: small-caps; /* THEME CHANGE */
  text-align: center;
}

#made span {
  /* height: 10px;
  width: 10px;
  fill: var(--accent-color);  THEME CHANGE
  padding: 0px 4px;*/
  font-size: 20px;
}

#icons {
  display: flex;
  gap: 15px;
  width: max-content;
}

#icons svg {
  width: 20px;
  height: 20px;
  fill: var(--accent-color); /* THEME CHANGE */
}

#icons p {
  font-size: 10px;
  font-weight: 300; /* THEME CHANGE */
  color: var(--text-color); /* THEME CHANGE */
}

#text {
  gap: 25px;
  font-weight: 700; /* THEME CHANGE */
  font-size: 13px;
  font-variant: small-caps; /* THEME CHANGE */
  letter-spacing: 1px;
  display: none;
}

#text a {
  position: relative;
}

#text a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  border-bottom: 2px solid var(--accent-color); /* THEME CHANGE */
  opacity: 0;
  transition: opacity 0.4s ease;
}

#text a:hover::after {
  opacity: 1;
}

/* ALL ORIGINAL MEDIA QUERIES BELOW - UNCHANGED (except footer behavior you asked for) */

@media (min-width: 360px) and (max-width: 400px) {
  section h2 {
    font-size: 26px;
  }
  #intro h2 {
    font-size: 26px;
  } /* keep Intro identical */

  #intro p {
    line-height: 1.5;
    padding-left: 40px;
    font-size: 4.2vh;
    padding-top: 0;
  }
  #intro-wrapper {
    max-height: 100%;
    padding: 2px 15px 0px 10px;
  }
  #in-touch {
    display: flex;
    flex-direction: column;
    padding: 30px 35px;
    font-weight: 350;
    gap: 3px;
  }
  #in-touch .get {
    font-size: 2.1vh;
    font-weight: 360;
    padding: 0;
    margin: 0;
  }
  #left {
    width: 100%;
    margin-top: 0px;
    display: flex;
    gap: 2vh;
  }
  #right {
    width: max-content;
    padding: 2px 2px;
    position: relative;
    overflow: hidden;
  }
  #last-project {
    margin-bottom: 0px;
  }
}

@media (min-width: 400px) and (max-width: 550px) {
  section h2 {
    font-size: 27px;
  }
  #intro h2 {
    font-size: 27px;
  } /* keep Intro identical */

  #intro-wrapper {
    max-height: 100%;
    padding: 10px 30px 0px 15px;
    display: flex;
    flex-direction: column;
    gap: 5vh;
    margin: 0;
  }
  #intro p {
    line-height: 1.5;
    padding-left: 40px;
    font-size: 4vh;
    padding-top: 0;
  }
  #in-touch .get {
    font-size: 2.2vh;
    font-weight: 360;
    padding: 0;
    margin: 0;
  }
  #right {
    width: max-content;
    padding: 2px 2px;
    position: relative;
    overflow: hidden;
  }
  .project {
    display: flex;
    max-width: 100%;
    flex-direction: column;
    margin-bottom: 35px;
    padding: 5px 15px 0px 60px;
    gap: 5px;
  }
  .project div {
    padding: 2px;
  }
  section h5 {
    font-size: 15px;
  }
  .middle p {
    padding: 0;
    font-size: 13px;
    max-width: 85%;
    line-height: 22px;
    margin-top: 5px;
  }
  .bottom {
    margin-top: 0px;
  }
  #icons {
    display: flex;
    gap: 15px;
  }
  #icons svg {
    width: 22px;
    height: 22px;
  }
}

@media (min-width: 437px) {
  section h2 {
    padding-top: 0px;
  }
  #intro h2 {
    padding-top: 0px;
  } /* identical */

  #in-touch {
    display: flex;
    flex-direction: row;
    gap: 2vw;
    justify-content: flex-start;
    width: max-content;
    margin: 0;
  }
  /* FIX: prevent tiny "Get in touch" on ~500px wide screens */
  #in-touch .get {
    font-size: clamp(14px, 2.1vh, 18px);
    font-weight: 360;
    padding: 0;
    margin: 0;
    width: 100%;
  }
  #left {
    min-width: 45%;
    margin-bottom: 4px;
    display: flex;
    gap: 30px;
  }
  #right {
    min-width: max-content;
    padding: 2px 7px;
    position: relative;
    text-align: center;
  }
  #background p {
    font-size: 14px;
    padding: 5px 60px 5px 90px;
    line-height: 24px;
  }
  section h3 {
    padding-left: 50px;
    letter-spacing: 2px;
    padding-bottom: 15px;
  }
  section {
    padding: 0px 30px 30px 0px;
  }
  #skills ul {
    font-size: 13px;
    width: 60%;
  }
  #other {
    max-width: 100%;
    padding: 0px 20px 70px 0px;
    margin: 0;
  }
  .project {
    margin: 0;
    width: 88%;
  }
  /* FIX: remove accidental 7px text at this breakpoint */
  .middle p {
    padding: 0;
    line-height: 22px;
    font-size: 13px;
  }
  .project div {
    padding: 0px;
    max-width: 100%;
  }
  .middle {
    width: 100%;
  }
  .bottom {
    width: 75%;
  }
}

@media (max-width: 435px) and (min-height: 750px) {
  :root {
    --nav-height: 80px;
  }

  #intro-wrapper {
    max-height: 100%;
    padding: 35px 30px 0px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
  }
  #intro p {
    line-height: 1.5;
    padding-left: 40px;
    font-size: 6.5vw;
    padding-top: 0;
  }
  nav {
    margin: 0;
    padding: 0;
  }
  .dark-mode-button {
    padding: 0;
  }

  section h2 {
    font-size: 2.5vh;
  }
  #intro h2 {
    font-size: 2.5vh;
  } /* identical */

  #right {
    width: max-content;
    padding: 2px 2px;
    position: relative;
    overflow: hidden;
  }
  #in-touch .get {
    font-size: 15px;
    font-weight: 360;
    padding: 0;
    margin: 0;
  }
}

@media (max-width: 550px) and (min-height: 1000px) {
  :root {
    --nav-height: 80px;
  }

  #intro-wrapper {
    max-height: 100%;
    padding: 90px 50px 0px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
  }
  #intro p {
    line-height: 1.5;
    padding-left: 40px;
    font-size: 24px;
    padding-top: 0;
  }
  nav {
    margin: 0;
    padding: 0;
  }
  .dark-mode-button {
    padding: 0;
  }

  section h2 {
    font-size: 2.5vh;
  }
  #intro h2 {
    font-size: 2.5vh;
  } /* identical */

  #right {
    width: max-content;
    padding: 2px 2px;
    position: relative;
    overflow: hidden;
  }
  #in-touch .get {
    font-size: 15px;
    font-weight: 360;
    padding: 0;
    margin: 0;
  }
  #left {
    width: 100%;
    margin-top: 0px;
    display: flex;
    gap: 1vh;
  }
}

@media (min-width: 500px) {
  section h2 {
    font-size: 26px;
  }
  #intro h2 {
    font-size: 26px;
  } /* identical */

  #intro-wrapper {
    max-height: 100%;
    padding: 20px 30px 90px 15px;
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin: 0;
  }
  #in-touch {
    display: flex;
    flex-direction: row;
    padding: 30px 35px;
    font-weight: 350;
    gap: 15px;
  }
  #intro p {
    line-height: 1.5;
    padding-left: 40px;
    font-size: 4.1vh;
    padding-top: 0;
  }
  #in-touch .get {
    font-size: 2.1vh;
    font-weight: 360;
    padding: 0;
    margin: 0;
  }
  #left {
    width: 50%;
    margin-top: 0px;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5vw;
  }
  #right {
    width: max-content;
    padding: 2px 2px;
    position: relative;
    overflow: hidden;
  }
  .design {
    padding: 0px 50px 20px 80px;
  }
  .project {
    display: flex;
    max-width: 100%;
    flex-direction: column;
    margin-bottom: 35px;
    padding: 5px 15px 0px 60px;
  }
  .project div {
    padding: 2px;
  }
  section h5 {
    font-size: 15px;
  }
  .middle p {
    padding: 0;
    font-size: 14px;
    max-width: 85%;
    line-height: 22px;
  }
  #icons {
    display: flex;
    gap: 15px;
  }
  #icons svg {
    width: 22px;
    height: 22px;
  }
}

@media (min-width: 600px) {
  :root {
    --nav-height: 80px;
  }
  #intro-wrapper {
    padding: 20px 60px 90px 30px;
  }
  /* FOOTER: keep icons visible until desktop — removed the old 600px toggle */
}

@media (min-width: 670px) {
  #background p {
    padding: 5px 30px 5px 100px;
    font-size: 14.5px;
  }
  #intro-wrapper {
    padding: 20px 80px 100px 60px;
  }
  #skills-container {
    padding-left: 25px;
  }
  #types-container {
    width: 90%;
  }
  .types {
    width: 25%;
  }
  #skills ul {
    width: 80%;
  }
  #skills li {
    padding: 4px 0px;
  }
  #dev-container {
    padding-left: 30px;
  }
  .middle p {
    margin-top: 10px;
  }
  footer {
    margin-top: 0px;
  }
  .footer-container {
    padding: 0px 5px 20px 10px;
    flex-direction: row;
    gap: 10px;
  }
  #made {
    padding-left: 50px;
    flex: 2;
  }
  #made p {
    width: 150px;
  }
  #icons {
    padding-right: 15px;
    gap: 30px;
    flex: 1;
  }
}

@media (min-width: 790px) {
  section {
    display: flex;
    padding: 30px 5px 80px 0px;
    flex-direction: row;
    gap: 0px;
  }
  .side-1 {
    width: 26%;
  }
  .side-2 {
    width: 74%;
  }
  #intro-wrapper {
    padding: 10px 110px 80px 60px;
  }
  #music-container {
    flex-direction: row;
    padding: 0px 40px 0px 0px;
    gap: 0px;
  }
  .proto-container {
    flex: 3;
  }
  .design {
    flex: 1;
    padding: 0;
    gap: 10px;
  }
  #dev-container {
    padding-left: 50px;
    padding-top: 2px;
  }
  .middle p {
    max-width: 100%;
  }
  #background p {
    padding: 10px 50px 0px 50px;
  }
  section h3 {
    padding: 10px 0px 10px 10px;
    text-align: right;
    max-width: 75%;
    float: right;
  }
  #skills-container {
    padding: 10px 50px 0px 50px;
    justify-content: flex-start;
  }
  .types {
    width: 15%;
  }
  #skills ul {
    margin-bottom: 0px;
  }
  .design p {
    max-width: 85%;
  }
}

@media (min-width: 1020px) {
  :root {
    --nav-height: 85px;
  }
  section {
    padding: 30px 40px 150px 20px;
    gap: 20px;
  }
  #background,
  #skills,
  #view,
  #other {
    padding-left: 0px;
    padding-right: 0px;
  }
  #dev-container {
    padding-left: 0px;
  }
  #intro-wrapper {
    padding: 0px 150px 90px 60px;
    gap: 10px;
  }
  .bio {
    max-width: 650px;
  }
  #background p {
    padding: 10px 20px 15px 50px;
    max-width: 80%;
  }
  #music-container {
    gap: 10px;
  }
  .design {
    padding: 0vw 2vw;
  }
  .design p {
    max-width: 100%;
  }
  .middle p {
    max-width: 80%;
    margin-top: 0px;
    margin-bottom: 5px;
  }
  .bottom {
    margin-top: 0px;
  }

  /* Desktop footer toggle (match esosa-site): show link text, hide icons */
  #icons {
    display: none;
  }
  #text {
    display: flex;
    flex: 1;
    padding-right: 60px;
  }
}

@media (min-width: 1200px) {
  #background,
  #skills,
  #view,
  #other {
    padding-left: 180px;
    padding-right: 180px;
  }
}

@media (min-width: 600px) and (max-width: 850px) and (min-height: 1000px) {
  :root {
    --nav-height: 100px;
  }
  .dark-mode-button {
    padding: 0;
  }
  #intro-wrapper {
    padding: 120px 30px 0px 60px;
  }
  #intro p {
    font-size: 5vw;
    max-width: 65vw;
  }

  section h2 {
    font-size: 4.5vw;
  }
  #intro h2 {
    font-size: 4.5vw;
  } /* identical */

  #in-touch .get {
    font-size: 3.5vw;
  }
}

@media (min-width: 900px) {
  #music-container {
    gap: 0px;
  }
  .design p {
    padding: 10px 10px 0px 0px;
  }
  #in-touch svg {
    width: 20px;
  }
}

@media (min-width: 1020px) and (min-height: 1000px) {
  :root {
    --nav-height: 100px;
  }
  #intro-wrapper {
    padding: 150px 30px 160px 60px;
  }
  #intro p {
    max-width: 60vw;
  }
  nav {
    padding: 0;
  }
  .dark-mode-button {
    padding: 0;
  }
  #left {
    gap: 1vh;
  }
  #music-container {
    gap: 5px;
  }
  .proto-container {
    flex: 4;
  }
  .design {
    flex: 1;
  }
}

/* =========================
   INTRO — esosa-site exact
   ========================= */

/* base */
#intro {
  display: flex;
  padding: 0;
  margin: 0;
  min-height: calc(100vh - var(--nav-height));
}
#intro h2 {
  /* "Hello!" */
  font-size: 22px;
}
#intro p {
  /* bio line */
  line-height: 1.5;
  padding-left: 40px;
  font-size: 4vh;
  padding-top: 0;
}
#intro-wrapper {
  max-height: 100%;
  padding: 5px 15px 0 10px;
  display: flex;
  flex-direction: column;
  margin: 0;
  gap: 0;
}

/* contact row */
#in-touch {
  display: flex;
  flex-direction: column;
  padding: 30px 35px;
  font-weight: 350;
  gap: 2.5px;
  align-items: flex-start;
}
#in-touch .get {
  font-size: 2.4vh;
  font-weight: 300;
  padding: 0;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap; /* keep "Get in touch" on one line */
}
#left {
  width: auto;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 2vh;
}
#left svg {
  fill: var(--accent-color);
}

#right {
  width: max-content;
  border-bottom: 3px solid var(--accent-color);
  padding: 2px 3px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
#right a {
  color: var(--text-color);
}
#right::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--accent-color);
  transition: height 0.2s;
  z-index: -1;
}
#right:hover::before {
  height: 100%;
}
#right:hover a {
  color: var(--bg-color);
}

/* -----------------
   360–400 (iPhone 8)
   ----------------- */
@media (min-width: 360px) and (max-width: 400px) {
  #intro h2 {
    font-size: 26px;
  }
  #intro-wrapper {
    padding: 2px 15px 0 10px;
  }
}

/* -----------------------
   400–550 (iPhone 8 Plus)
   ----------------------- */
@media (min-width: 400px) and (max-width: 550px) {
  #intro h2 {
    font-size: 27px;
  }
  #intro-wrapper {
    padding: 10px 30px 0 15px;
  }
}

/* -------------------------
   437+ (tablet portrait step)
   ------------------------- */
@media (min-width: 437px) {
  #intro h2 {
    font-size: 6vw;
  } /* intentionally big 437–499 */
  #intro-wrapper {
    padding: 5px 30px 0 15px;
    justify-content: space-evenly;
  }
  #in-touch {
    flex-direction: row;
    gap: 10px;
    align-items: center;
  }
  #left {
    width: auto; /* no min-width to avoid wrapping */
    gap: 2vw;
  }
  /* keep readable at this step */
  #in-touch .get {
    font-size: clamp(14px, 2.1vh, 18px);
  }
}

/* --------
   500+
   -------- */
@media (min-width: 500px) {
  #intro h2 {
    font-size: 26px;
  }
  #intro-wrapper {
    padding: 20px 30px 90px 15px;
  }
  #in-touch {
    flex-direction: row;
    gap: 15px;
  }
  #in-touch .get {
    font-size: 2.1vh;
  }
}

/* --------
   600+
   -------- */
@media (min-width: 600px) {
  #intro h2 {
    font-size: 28px;
  }
  #intro-wrapper {
    padding: 20px 60px 90px 30px;
  }
  #in-touch .get {
    font-size: 2.2vh;
  }
}

/* --------
   670+
   -------- */
@media (min-width: 670px) {
  #intro h2 {
    font-size: 28px;
  }
  #intro-wrapper {
    padding: 20px 80px 100px 60px;
  }
  #in-touch .get {
    font-size: 2.3vh;
  }
}

/* --------
   790+
   -------- */
@media (min-width: 790px) {
  #intro h2 {
    font-size: 32px;
  }
  #intro-wrapper {
    padding: 10px 110px 80px 60px;
  }
  #in-touch .get {
    font-size: 2.5vh;
  }
}

/* --------
   1020+
   -------- */
@media (min-width: 1020px) {
  #intro h2 {
    font-size: 36px;
  }
  #intro-wrapper {
    padding: 0 150px 90px 60px;
  }
  #intro p {
    line-height: 1.7;
    font-size: 4.4vh;
  }
  #in-touch .get {
    font-size: 2.2vh;
  }
}

/* ---------------------------------
   Tall phones (≥750h, ≤435w)
   --------------------------------- */
@media (max-width: 435px) and (min-height: 750px) {
  #intro h2 {
    font-size: 2.5vh;
  }
  #intro-wrapper {
    padding: 35px 30px 0 15px;
    justify-content: space-between;
  }
}

/* ------------------------------------
   Very tall small screens (≥1000h, ≤550w)
   ------------------------------------ */
@media (max-width: 550px) and (min-height: 1000px) {
  #intro h2 {
    font-size: 2.5vh;
  }
  #intro-wrapper {
    padding: 90px 50px 0 15px;
    justify-content: space-between;
  }
}

/* ---------------------------------------------------
   Tall tablets / portrait laptops (≥600w ≤850w ≥1000h)
   --------------------------------------------------- */
@media (min-width: 600px) and (max-width: 850px) and (min-height: 1000px) {
  #intro h2 {
    font-size: 4.5vw;
  }
  #intro-wrapper {
    padding: 120px 30px 0 60px;
    justify-content: space-between;
  }
  #intro p {
    font-size: 5vw;
    max-width: 65vw;
  }
  #in-touch .get {
    font-size: 3.5vw;
  }
}

/* --------------------------------
   Very tall desktops (1020w+ 1000h+)
   -------------------------------- */
@media (min-width: 1020px) and (min-height: 1000px) {
  #intro h2 {
    font-size: 2.8vw;
  }
  #intro-wrapper {
    padding: 150px 30px 160px 60px;
    justify-content: space-between;
  }
  #intro p {
    line-height: 1.6;
    font-size: 3vw;
    max-width: 60vw;
  }
  #in-touch .get {
    font-size: 1.8vw;
  }
}

/* APPS: smaller mockups + more space from edges */
#view > .side-2 > .music-container > .proto-container {
  justify-content: center;
  gap: clamp(16px, 3vw, 48px); /* space between the two phones */
  padding: 0 clamp(24px, 6vw, 96px); /* bigger left/right gutters */
}

#view > .side-2 > .music-container > .proto-container img {
  width: clamp(200px, 22vw, 320px); /* smaller, responsive phones */
  height: auto;
}

/* 1020–1199px had zero section padding; restore gutters so nothing hugs edges */
@media (min-width: 1020px) and (max-width: 1199px) {
  #view {
    padding-left: 80px;
    padding-right: 80px;
  }
}

/* Optional: a little tighter on very small screens */
@media (max-width: 600px) {
  #view > .side-2 > .music-container > .proto-container {
    padding: 0 28px;
    gap: 20px;
  }
  #view > .side-2 > .music-container > .proto-container img {
    width: 70%;
    max-width: 320px;
  }
}

/* ===== Base emoji styling ===== */
.emoji-icon {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s ease;
  font-size: 22px; /* default size (projects) */
}

/* ===== Construction sign (no hover effects) ===== */
#last-project .construction {
  font-size: 22px;
  pointer-events: none;
  cursor: default;
  transform: none !important;
}

#last-project h5 {
  pointer-events: none;
}
/* ===== "Get in touch" (left) — nudge right ===== */
#left .emoji-icon {
  font-size: 28px;
  cursor: pointer;
}
#left .emoji-icon:hover,
#left:hover .emoji-icon {
  transform: translateX(6px);
}

/* ===== Recent Projects — nudge right on link or icon hover ===== */
.project .top a .emoji-icon {
  transform: translateX(0);
}
.project .top a:hover .emoji-icon,
.project .top .emoji-icon:hover {
  transform: translateX(6px) !important;
}

/* ===== Back to top (up) — fixed, nudge up ===== */
#up .emoji-icon {
  font-size: 28px;
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 100;
  padding: 4px;
  cursor: pointer;
}
#up .emoji-icon:hover {
  transform: translateY(-8px);
}

/* ===== Responsive sizes for #up and #left ===== */
@media (max-width: 500px) {
  #up .emoji-icon,
  #left .emoji-icon {
    font-size: 24px;
  }
}
@media (max-width: 350px) {
  #up .emoji-icon,
  #left .emoji-icon {
    font-size: 22px;
  }
}

@media (max-width: 500px) {
  #made span {
    font-size: 24px;
  }
}
@media (max-width: 350px) {
  #made span {
    font-size: 22px;
  }
}

/* Projects: nudge 👉 when hovering the H5 link */
.project .top a:first-of-type:hover ~ a .emoji-icon,
.project .top a:first-of-type:focus-visible ~ a .emoji-icon {
  transform: translateX(6px) !important;
}

/* Ensure the arrow is transformable + animated */
.project .top a:last-of-type .emoji-icon {
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.3s ease;
}
