/* styles.css */

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

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* Prevent scrollbars if polaroids extend off-screen */
}

#experience {
  position: relative;
  width: 100vw;
  /* Full viewport width */
  padding: 0;
}


/* Z-index layers */
:root {
  --z-clouds: 1;
  --z-content: 2;
  --z-nav: 1000;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fcfbf4;
  color: #333;
}

nav {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #FF9dab, #FFB6C1);
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  z-index: var(--z-nav);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem !important;
  position: relative;
  padding: 0.3rem 0;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background-color: #f5d4f2;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

nav a:hover {
  transform: scale(1.05);
  color: #f98394;
}

nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.italic {
  font-style: italic;
}

nav a.active {
  color: #ff6a80;
  font-weight: bold;
}

.mobile-header-container {
  display: none;
}

/* Header section */
header {
  min-height: 100vh;
  background: linear-gradient(135deg, #FFB6C1, #FF9dab);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 0;
}

header h1,
header p,
header .scroll-down {
  position: relative;
  z-index: var(--z-content);
}

header h1 {
  font-size: 4rem;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid white;
  animation: typing 3s steps(30, end), blink 0.8s step-end infinite;
  max-width: 90vw;
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

header p {
  font-size: 1.8rem;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 2s ease-out forwards;
  animation-delay: 2s;
}

.scroll-down {
  margin-top: 30px;
  font-size: 5rem;
  cursor: pointer;
  animation: bounce 2s infinite;
  transition: transform 0.3s;
}

@media (max-width: 600px) {
  .scroll-down {
    font-size: 3rem;
    /* Smaller font size on mobile */
  }
}

.scroll-down:hover {
  transform: scale(1.2);
}

section {
  padding: 80px 20px;
  max-width: 900px;
  margin: auto;
  position: relative;
  z-index: var(--z-content);
  background: #fcfbf4;
}

section h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  text-align: center;
}

section p {
  line-height: 1.6;
  font-size: 1.1rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

#handles {
  padding-bottom: 120px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.heading {
  text-align: center;
}

.heading p {
  font-size: max(4vw, 32px);
  font-weight: bold;
  color: #FFB6C1;
  gap: max(2vh, 32px);
}

.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  min-height: max(40vh, 500px);
}

.insta-image {
  display: none;
  height: auto;
  width: 350px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .insta-image {
    display: block;
  }

  .contact-container {
    padding: 40px 0;
  }
}

.icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: max(5vw, 100px);
}

.icon-container a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s;
}

.icon-container p {
  color: white;
  font-size: calc(16px + 4vw);
  font-weight: bold;
}

.icon-container img {
  max-height: 8vw;
  max-height: calc(16px + 8vw);
  transition: transform 0.3s;
}

.icon-container a:hover img {
  transform: scale(1.1);
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.hamburger div {
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open div:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open div:nth-child(2) {
  opacity: 0;
}

.hamburger.open div:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: #FFB6C1;
  padding: 1rem;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-nav);
}

.mobile-menu.show {
  display: flex;
  animation: fadeInDown 0.3s ease-out;
}

.mobile-menu a {
  color: white;
  font-weight: bold;
  text-decoration: none;
  padding: 0.5rem 0;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-header {
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  margin-left: 10px;
}

@media (max-width: 800px) {
  nav {
    justify-content: space-between;
    align-items: center;
  }

  .desktop-link {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-header-container {
    display: block;
  }

  .heading p {
    text-align: center;
  }

  .icon-container {
    flex-direction: column;
    gap: 50px;
  }

  header h1 {
    font-size: 2.2rem;
    white-space: normal;
    border-right: none;
    animation: none;
  }
}

@media (min-width: 801px) {

  .mobile-menu,
  .hamburger,
  .mobile-header-container {
    display: none !important;
  }
}

#about-me {
  padding: 1rem 0;
  max-width: 100%;
}

.heading {
  margin-top: 3.5rem;
}

.about-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: nowrap;
  padding: 0 1rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.terminal-screen {
  position: relative;
  width: 60%;
  max-width: none;
}

.terminal-screen img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: none;
}

.about-text {
  position: absolute;
  top: 61%;
  left: 59%;
  transform: translate(-60%, -59%);
  color: #fff;
  text-align: left;
  font-size: clamp(0.8rem, 1.9vw, 1.3rem);
  width: 90%;
  font-family: "JetBrains Mono", "Fira Code", "Monaco", "Consolas", monospace;
  line-height: 1.4;
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
  padding: 0.5rem;
}

.profile-pic {
  width: 35%;
  max-width: 360px;
  height: auto;
  border-radius: 20px;
}

.about-text-mobile {
  display: none;
}

.about-text-desktop {
  display: block;
}

.about-text-medium {
  display: none;
}

/* Medium-large screens (1025px - 1280px): just decrease font size slightly */
@media (min-width: 1025px) and (max-width: 1600px) {
  .about-text {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    line-height: 1;
  }

  .about-text-mobile {
    font-size: clamp(0.6rem, 1.2vw, 0.9rem);
  }

  .profile-pic {
    width: 30%;
  }
}

/* Responsive tweak for medium screens (tablets, small laptops) */
@media (max-width: 1100px) {
  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .terminal-screen {
    width: 100%;
  }

  .about-text-medium {
    left: 50%;
    transform: translate(-50%, -59%);
    font-size: clamp(0.7rem, 1.8vw, 1.20rem);
    width: 90%;
    text-align: left;
  }

  .profile-pic {
    width: 70%;
    max-width: 300px;
    margin-top: 0.5rem;
  }
}


/* Responsive tweak for small screens */
@media (max-width: 650px) {
  .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .terminal-screen {
    width: 100%;
  }

  /* Adjusts the shared about-text styles */
  .about-text {
    left: 50%;
    transform: translate(-50%, -59%);
    text-align: left;
    width: 90%;
    font-size: clamp(0.8rem, 2vw, 1.1rem);
  }

  .about-text-desktop {
    display: none;
  }

  .about-text-mobile {
    display: block;
    position: absolute;
    top: 56%;
    left: 50%;
    transform: translate(-50%, -59%);
    color: #fff;
    text-align: left;
    font-size: clamp(0.7rem, 1.4vw, 0.9rem);
    width: 90%;
    font-family: "JetBrains Mono", "Fira Code", "Monaco", "Consolas", monospace;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    padding: 0.5rem;
  }

  .profile-pic {
    width: 80%;
    max-width: 300px;
    margin-top: 0.5rem;
  }
}

#experience {
  padding: 5rem 1rem;
  background-color: transparent;
}

.experience-layout {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 25px;
  overflow-x: visible;
}

.experience-container {
  width: 90%;
  max-width: 1050px;
  padding: 30px 20px 20px;
  border: 2px solid #FFB6C1;
  border-radius: 12px;
  background-color: transparent;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.experience-entry {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
}

.experience-left {
  flex-basis: 25%;
  padding-right: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  line-height: 1.2;
}

.experience-date {
  font-size: 1rem;
  font-weight: bold;
  text-align: right;
  transform: translateY(5.6px);
  white-space: nowrap;
}

.experience-divider {
  width: 1px;
  background-color: #ff6a80;
  height: 100%;
  position: absolute;
  left: calc(20% + 2.9rem);
  transform: translateX(-50%);
}

.experience-right {
  flex-basis: 68%;
  padding-left: 2rem;
}

.experience-right p:first-child {
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.experience-right p a {
  text-decoration: none;
  color: inherit;
}

.experience-right p a:hover {
  text-decoration: underline;
}

.skills {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  background-color: #ff6a80;
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

.polaroid {
  display: none;
  position: absolute;
  top: 40px;
  width: 525px;
  z-index: 5;
  padding: 0;
  transition: all 0.3s ease;
}

.polaroid-left {
  left: -398px;
}

.polaroid-right {
  right: -405px;
}

/* Responsive */
@media (max-width: 800px) {
  .experience-entry {
    flex-direction: column;
  }

  .experience-left {
    flex-basis: 100%;
    padding-right: 0;
    justify-content: flex-start;
    margin-bottom: 10px;
  }

  .experience-date {
    font-size: 0.95rem;
    text-align: left;
    transform: none;
  }

  .experience-divider {
    display: none;
  }

  .experience-right {
    flex-basis: 100%;
    font-size: 0.95rem;
  }
}

@media (min-width: 1000px) {
  .polaroid {
    display: block;
  }
}

@media screen and (min-width: 1300px) and (max-width: 1500px) {

  .polaroid {
    display: block;
    width: 400px;
    top: 30px;
  }

  .polaroid-left {
    left: -280px;
  }

  .polaroid-right {
    right: -285px;
  }
}

@media screen and (min-width: 900px) and (max-width: 1300px) {

  .polaroid {
    display: block;
    width: 340px;
    top: 30px;
  }

  .polaroid-left {
    left: -230px;
  }

  .polaroid-right {
    right: -235px;
  }
}


/* Projects Grid */
.projects-container {
  background-image: url('index/pink_background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 3rem 3rem;
  border-radius: 15px;
  margin-top: 2rem;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}

.project-image {
  height: 180px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  color: #FF6A80;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.project-info p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Project Modal */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
}

.modal-content {
  background-color: #fcfbf4;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 1200px;
  border-radius: 20px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.4s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

/* Updated animation to work with centered positioning */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    top: calc(50% + 20px);
  }

  to {
    opacity: 1;
    top: 50%;
  }
}

.close-modal {
  position: sticky;
  top: 20px;
  float: right;
  right: 25px;
  color: #FF6A80;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10;
  background-color: rgba(252, 251, 244, 0.8);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-left: 10px;
}

.close-modal:hover {
  color: #ff3352;
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 4rem;
}

.modal-header h2 {
  color: #FF6A80;
  font-size: 2rem;
  margin: 0;
}

.modal-links {
  display: flex;
  gap: 1rem;
}

.modal-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #333;
  background-color: #f0f0f0;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  transition: all 0.3s;
  font-size: 1rem;
}

.modal-link:hover {
  background-color: #FF9dab;
  color: white;
}

.modal-icon {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.modal-image {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: inline-block;
  width: auto;
  height: auto;
}

.modal-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.modal-images-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-description h3 {
  color: #FF6A80;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.modal-description p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-description ul {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.modal-description li {
  margin-bottom: 0.5rem;
}

.project-meta {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.meta-item {
  margin-bottom: 0.3rem;
}

/* Responsive adjustments */
@media (max-width: 1000px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
  }

  .modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .modal-links {
    font-size: 0.8rem;
    width: 80%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}

.footer {
  padding: 15px 0;
  text-align: center;
  background-color: #FF9DAB;
  width: 100%;
}

.copyright {
  color: white;
  font-size: 14px;
  font-weight: 300;
  margin: 0;
}