/* GENERAL */

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

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

p {
  color: rgb(85, 85, 85);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
}

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

a {
  color: black;
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: grey;
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: rgb(181, 181, 181);
}

.logo {
  font-size: 2rem;
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  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: black;
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

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

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

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

.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;
}

.hamburger-icon span:first-child {
  opacity: 1;
}

.hamburger-icon span:first-child {
  transform: none;
}

  section {
    padding-top: 0;
  }

  #profile {
    padding-top: 4rem;
    margin-top: 0;
  }

  #profile {
    flex-direction: column;
    gap: 2rem;
    height: auto;
    padding: 2rem 0;
    min-height: 100vh;
    justify-content: center;
  }

  .section__pic-container {
    height: 300px;
    width: 300px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  .section__text {
    padding: 0 1rem;
    text-align: center;
    margin-top: 2rem;
  }

  .section__text__p2 {
    font-size: 1.5rem;
    margin: 1rem 0;
  }

  .title {
    font-size: 2.5rem;
    margin: 1rem 0;
  }

  #socials-container {
    margin-top: 2rem;
    justify-content: center;
  }

  .logo {
    color: #333;
    font-weight: 600;
  }

  .three-dot-icon span {
    background-color: #333;
  }
}

/* Add this new section to prevent unwanted movements */
@media screen and (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  #hamburger-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform !important;
  }

  .hamburger-menu {
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    will-change: transform !important;
  }
}

/* Small Screen Adjustments */
@media only screen and (max-width: 480px) {
  #hamburger-nav {
    padding: 0.5rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .menu-links {
    right: 1rem;
    width: 160px;
  }

  .menu-links a {
    font-size: 1rem;
    padding: 0.7rem 0.8rem;
  }

  #profile {
    margin-top: 5rem;
    padding: 1rem 0;
  }

  .section__pic-container {
    height: 250px;
    width: 250px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  .section__text__p2 {
    font-size: 1.25rem;
  }

  .title {
    font-size: 2rem;
  }
}

/* Ensure hamburger is visible on all mobile devices */
@media only screen and (max-device-width: 768px) {
  #desktop-nav {
    display: none !important;
  }

  #hamburger-nav {
    display: flex !important;
  }

  .hamburger-menu {
    display: block !important;
  }

  .three-dot-icon {
    display: flex !important;
  }
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
  margin-top: 2rem;
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  padding-bottom: 0;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  overflow: hidden;
}

.section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

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

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

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

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

.btn-color-1,
.btn-color-2 {
  border: rgb(53, 53, 53) 0.1rem solid;
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: rgb(53, 53, 53);
  color: white;
}

.btn-color-1:hover {
  background: rgb(0, 0, 0);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1rem;
  margin-top: 0;
  height: fit-content;
  min-height: fit-content;
}

#about > .section__text__p1,
#about > .title {
  text-align: center;
  width: 100%;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}

.about-pic {
  display: none;
}

.arrow {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10;
}

.arrow:hover {
  transform: translateY(5px);
}

/* Section specific arrow positions */
#about .arrow {
  bottom: 2rem;
}

#experience .arrow {
  bottom: 2rem;
}

#skills .arrow {
  bottom: 2rem;
}

#achievements .arrow {
  bottom: 2rem;
}

#moments .arrow {
  bottom: 2rem;
}

#projects .arrow {
  bottom: 2rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: white;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  text-align: center;
}

.section-container {
  gap: 4rem;
  height: 80%;
}

#about .section-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* EXPERIENCE SECTION */

#experience {
  position: relative;
}

.experience-sub-title {
  color: rgb(85, 85, 85);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

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

article .icon {
  cursor: default;
}

/* PROJECTS SECTION */

#projects {
  position: relative;
}

.color-container {
  border-color: rgb(163, 163, 163);
  background: rgb(250, 250, 250);
}

.project-img {
  border-radius: 2rem;
  width: 90%;
  height: 90%;
}

.project-title {
  margin: 1rem;
  color: black;
}

.project-btn {
  color: black;
  border-color: rgb(163, 163, 163);
}

/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
  background: #f8fafc;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: rgb(53, 53, 53) 0.1rem solid;
  border-color: rgb(163, 163, 163);
  background: white;
  margin: 2rem auto;
  padding: 1rem;
  max-width: 800px;
  width: 90%;
}

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

.contact-info-container p {
  font-size: larger;
  margin: 0;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER SECTION */

/* MOMENTS SECTION */
#moments {
  position: relative;
  background: white;
  margin: 2rem 0;
  padding: 2rem 0;
}

.moments-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.moment-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  aspect-ratio: 1;
  cursor: pointer;
  background: white;
}

.moment-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.moment-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem 1.5rem 1.5rem;
  color: white;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

.moment-card:hover .moment-overlay {
  transform: translateY(0);
}

.moment-overlay h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.moment-overlay p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  margin: 0;
}

/* Media Queries for Moments Section */
@media screen and (max-width: 768px) {
  .moments-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .moment-overlay {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4));
  }
}

footer {
  background: white;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid #e2e8f0;
}

footer p {
  text-align: center;
}

/* SKILLS SECTION */

#skills {
  position: relative;
}

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin: 2rem 0;
}

.skills-category {
  width: 100%;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.skill-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
}

.skill-info {
  margin-bottom: 1rem;
}

.skill-info h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.skill-level {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.skill-tags span {
  background: #f1f5f9;
  color: #475569;
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ACHIEVEMENTS SECTION */

#achievements {
  position: relative;
}

.achievements-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.achievement-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-5px);
}

.achievement-icon {
  background: #f1f5f9;
  padding: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-icon .icon {
  width: 2rem;
  height: 2rem;
}

.achievement-content {
  flex: 1;
}

.achievement-content h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.achievement-content p {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.achievement-date {
  font-size: 0.9rem;
  color: #94a3b8;
  font-weight: 500;
}

/* NAVIGATION UPDATES */
.nav-content {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.quick-contact {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-link .icon {
  width: 1.2rem;
  height: 1.2rem;
}

/* FOOTER UPDATES */
footer {
  background: white;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid #e2e8f0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: #334155;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer-section .nav-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-section .nav-links a {
  color: #64748b;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.footer-section .nav-links a:hover {
  color: #334155;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact .contact-link {
  color: #64748b;
  font-size: 1rem;
}

.footer-contact .contact-link:hover {
  color: #334155;
}

.footer-section p {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.footer-bottom p {
  color: #64748b;
  font-size: 0.9rem;
}

/* Media Queries for Navigation */
@media screen and (max-width: 1200px) {
  .quick-contact span {
    display: none;
  }
  
  .quick-contact {
    gap: 1rem;
  }
}

@media screen and (max-width: 768px) {
  .nav-content {
    gap: 1.5rem;
  }
  
  .quick-contact {
    display: none;
  }
}

/* FEEDBACK SECTION */
#feedback {
  position: relative;
  background: #f8fafc;
  padding: 2rem 0;
}

.feedback-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.feedback-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.feedback-text {
  padding-right: 2rem;
}

.feedback-text h2 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.feedback-text p {
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.feedback-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
}

.feature .icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
}

.feature h3 {
  color: var(--text);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.feature p {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0;
}

.form-container {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  width: 100%;
}

/* Form Styles */
.form-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  background: #f1f5f9;
  padding: 0.5rem;
  border-radius: 0.5rem;
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: #334155;
}

.tab-btn.active {
  background: #334155;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form {
  display: none;
}

.form.active {
  display: block;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form button[type="submit"] {
  width: 100%;
  margin-top: 1rem;
}

/* Media Queries for Feedback and Contact Sections */
@media screen and (max-width: 1024px) {
  .feedback-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 0 1rem;
  }

  .feedback-text {
    padding-right: 0;
    text-align: center;
  }

  .feedback-features {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media screen and (max-width: 768px) {
  .feedback-container {
    padding: 0 1rem;
  }

  .feedback-content {
    gap: 2rem;
  }

  .feedback-features {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 1.5rem;
  }

  .contact-info-upper-container {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .contact-info-container {
    margin: 0.5rem;
  }

  .contact-info-container p {
    font-size: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .feedback-text h2 {
    font-size: 1.5rem;
  }

  .feedback-text p {
    font-size: 1rem;
  }

  .form-container {
    padding: 1rem;
  }

  .contact-info-container {
    flex-direction: column;
    text-align: center;
  }
}

/* CHATBOT STYLES */
.chat-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #f472b6 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}

.chat-toggle:hover {
  transform: scale(1.1) rotate(-8deg);
}

.chat-toggle::before {
  content: "Ask me";
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #334155;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

.chat-toggle:hover::before {
  opacity: 1;
}

/* New robot icon style */
.robot-icon {
  width: 36px;
  height: 36px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.robot-svg {
  width: 36px;
  height: 36px;
  display: block;
}

/* Add a little bounce animation */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.chat-toggle:hover .robot-svg {
  animation: bounce 0.5s;
}

/* Remove old robot-head, robot-eye, robot-mouth styles for a cleaner look */
.robot-head, .robot-eye, .robot-mouth {
  display: none !important;
}

.chat-container {
  position: fixed;
  bottom: 5rem;
  right: 2rem;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-container.active {
  display: flex;
}

.chat-header {
  background: #334155;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 80%;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.message.bot {
  background: #f1f5f9;
  align-self: flex-start;
  border-bottom-left-radius: 0.2rem;
}

.message.user {
  background: #334155;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0.2rem;
}

.chat-input {
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.5rem;
}

.chat-input input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.chat-input input:focus {
  outline: none;
  border-color: #334155;
}

.chat-input button {
  padding: 0.8rem 1.5rem;
  background: #334155;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.chat-input button:hover {
  background: #475569;
}

@media screen and (max-width: 768px) {
  .chat-container {
    width: calc(100% - 2rem);
    height: 60vh;
    bottom: 5rem;
    right: 1rem;
  }
}

/* Media Queries for Arrows */
@media screen and (max-width: 768px) {
  .arrow {
    right: 1rem;
    bottom: 1rem;
    width: 2rem;
    height: 2rem;
  }
}

/* Mobile-First Media Queries */
@media screen and (max-width: 768px) {
  /* Navigation */
  #desktop-nav {
    display: none;
  }

  #hamburger-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: white;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1000;
  }

  .hamburger-menu {
    position: relative;
    margin-left: auto;
  }

  .menu-links {
    right: 0;
    left: auto;
    min-width: 150px;
  }

  /* Sections */
  section {
    margin: 0 1rem;
    padding: 2rem 0;
    height: auto;
    min-height: 100vh;
  }

  /* Profile Section */
  #profile {
    flex-direction: column;
    gap: 2rem;
    height: auto;
    padding: 2rem 0 1rem 0;
    margin-top: 6rem;
    margin-bottom: 0;
    min-height: auto;
    justify-content: center;
  }

  .section__pic-container {
    height: 300px;
    width: 300px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  .section__text {
    padding: 0 1rem;
    text-align: center;
    margin-top: 2rem;
  }

  .section__text__p2 {
    font-size: 1.5rem;
    margin: 1rem 0;
  }

  .title {
    font-size: 2.5rem;
    margin: 1rem 0;
  }

  #socials-container {
    margin-top: 2rem;
    justify-content: center;
  }

  /* About Section */
  #about {
    padding-top: 0.5rem;
    padding-bottom: 2rem;
    margin-top: 0;
    min-height: auto;
  }

  .about-containers {
    flex-direction: column;
    gap: 1.5rem;
  }

  .about-details-container {
    padding: 0 1rem;
  }

  /* Experience Section */
  .article-container {
    gap: 1.5rem;
    justify-content: center;
  }

  article {
    width: 100%;
    max-width: 200px;
  }

  /* Projects Section */
  .details-container {
    padding: 1rem;
  }

  .project-img {
    width: 100%;
    height: auto;
  }

  /* Skills Section */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skill-card {
    padding: 1.2rem;
  }

  /* Achievements Section */
  .achievements-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .achievement-card {
    padding: 1.2rem;
  }

  /* Moments Section */
  .moments-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .moment-overlay {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4));
  }

  /* Contact Section */
  .contact-info-upper-container {
    flex-direction: column;
    padding: 1rem;
  }

  .contact-info-container {
    flex-direction: column;
    text-align: center;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-section .nav-links {
    align-items: center;
  }

  /* Chat Widget */
  .chat-container {
    width: calc(100% - 2rem);
    height: 70vh;
    bottom: 5rem;
    right: 1rem;
  }

  .chat-toggle {
    width: 50px;
    height: 50px;
  }

  .robot-icon {
    width: 30px;
    height: 30px;
  }
}

/* Additional Mobile Optimizations */
@media screen and (max-width: 480px) {
  /* Typography */
  .title {
    font-size: 2rem;
  }

  .section__text__p2 {
    font-size: 1.25rem;
  }

  .experience-sub-title {
    font-size: 1.5rem;
  }

  /* Spacing */
  section {
    margin: 0 0.5rem;
    padding: 1.5rem 0;
  }

  /* Buttons */
  .btn {
    width: 100%;
    max-width: 200px;
  }

  .btn-container {
    flex-direction: column;
    align-items: center;
  }

  /* Cards */
  .details-container,
  .skill-card,
  .achievement-card {
    padding: 1rem;
  }

  /* Navigation */
  .logo {
    font-size: 1.5rem;
  }

  /* Social Icons */
  .icon {
    height: 1.5rem;
  }

  /* Chat Widget */
  .chat-toggle::before {
    display: none;
  }

  .section__pic-container {
    height: 250px;
    width: 250px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
}

/* Touch Device Optimizations */
@media (hover: none) {
  .btn:hover,
  .details-container:hover,
  .skill-card:hover,
  .achievement-card:hover {
    transform: none;
  }

  .moment-card:hover .moment-img {
    transform: none;
  }

  .moment-overlay {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4));
  }
}

/* High-DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .section__pic-container img,
  .about-pic,
  .project-img,
  .moment-img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  .details-container,
  .skill-card,
  .achievement-card,
  .chat-container {
    background-color: #ffffff !important;
  }

  .menu-links {
    background-color: #ffffff !important;
  }

  .chat-input input {
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  .message.bot {
    background-color: #f1f5f9 !important;
  }
}

/* Scroll Animation Classes */
.reveal {
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Different animation directions */
.reveal-left {
  transform: translateX(-50px);
}

.reveal-right {
  transform: translateX(50px);
}

.reveal-up {
  transform: translateY(50px);
}

.reveal-down {
  transform: translateY(-50px);
}

/* Animation delays */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

/* Tic Tac Toe Game Styles */
.game-container {
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
}

.game-status {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #2c3e50;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
  background: #34495e;
  padding: 12px;
  border-radius: 1rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cell {
  aspect-ratio: 1;
  background: #ecf0f1;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.cell:hover {
  background: #ffffff;
  transform: scale(1.02);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cell.x {
  color: #e74c3c;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.cell.o {
  color: #3498db;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.cell.winning {
  background: #2ecc71;
  color: white;
  animation: winner 0.5s ease-in-out;
}

@keyframes winner {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

#restartButton {
  margin-top: 1rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  background: #34495e;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#restartButton:hover {
  background: #2c3e50;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive Game Styles */
@media screen and (max-width: 768px) {
  .game-container {
    padding: 1rem;
    margin: 1rem;
  }

  .game-status {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .cell {
    font-size: 2.5rem;
  }
}