* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

body {
  background-color: #fff;
  color: #222;
  padding-top: 40px;
}

/* ---------- Intro Section ---------- */
.intro-section {
  display: flex;
  align-items: center;          /* Vertically center text and image */
  justify-content: center;      /* Center both horizontally in the page */
  gap: 120px;                    /* Reduce spacing between text and image */
  flex-wrap: wrap;              /* Allow wrapping on small screens */
  min-height: 35vh;             /* Keeps the section visually centered */
  margin-bottom: 30px;
  margin-top: 11px;
}

.intro-text {
  max-width: 400px;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}

.resume-link {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: #222;
  color: #fff;
  text-decoration: none;
  transition: background 0.3s ease;
}

.resume-link:hover {
  background-color: #555;
}

.hero-image {
  width: 200px;
  height: 200px;
  background-color: #d4d4d4;
  border-radius: 8px;
}


/* ---------- Cards ---------- */
.cards-section {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 50px;
  padding-left: 60px;
  padding-right: 60px;
  padding-bottom: 80px;
}

.card {
  width: 180px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  transition: all 0.3s ease;
  background-color: #f9f9f9;
  cursor: pointer;
  border: #F7CFD8 2px solid;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card p {
  padding: 10px 0;
  font-weight: 500;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}


/* ---------- Popup Modal ---------- */
.popup {
  display: none;
  position: fixed;
  top: 100px;
  left: 100px;
  width: 800px;
  height: 550px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  z-index: 1000;
  overflow: hidden;
}

.popup-header {
  background-color: #a9d8d3;
  color: #fff;
  padding: 12px 20px;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.popup-title {
  color: #fff;
  font-weight: 500;
}

.close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
}

.popup-content {
  padding: 20px;
  height: calc(100% - 50px);
  overflow-y: auto;
}

.popup-content p {
  margin: 10px;
  padding-left: 10px;
  padding-right: 10px;
}

/* grid container: centered and responsive */
.photo-grid {
  width: min(1200px, 96%);
  margin: 16px auto 80px;
  display: grid;
  gap: 20px;
  /* responsive columns: each card min 220px, stretch to available space */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  justify-items: center;
  padding: 8px;
}

.photo-grid img {
  width: 100%;
  border-radius: 6px;
  object-fit: cover;
}

/* each card has its own perspective (isolates 3D transform) */
.photo-card {
  width: 100%;               /* width is controlled by grid column */
  max-width: 320px;          /* prevents huge cards on wide screens */
  perspective: 1000px;       /* gives 3D effect */
  cursor: pointer;
}

/* inner element that rotates */
.photo-inner {
  width: 100%;
  height: 0;
  padding-bottom: 66.666%;    /* 3:2 aspect ratio (200x300 -> 66.66%) */
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.2,.9,.2,1);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(20,20,20,0.08);
  overflow: visible;
}

/* when the parent .photo-card has .is-flipped — only that card flips */
.photo-card.is-flipped .photo-inner {
  transform: rotateY(180deg);
}

/* two sides */
.photo-front, .photo-back {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* front = image (visible initially) */
.photo-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* back = description */
.photo-back {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, #f0f6f3 0%, #e8f1ee 100%);
  color: #222;
  text-align: center;
  transform: rotateY(180deg);   /* flipped back side */
  font-size: 15px;
  line-height: 1.4;
}

/* optional subtle hover lift (doesn't trigger flip) */
.photo-card:hover .photo-inner {
  transform: translateY(-6px);
  transition: transform 0.25s ease;
}

/* prevent the hover-lift from conflicting when flipped */
.photo-card.is-flipped:hover .photo-inner {
  transform: rotateY(180deg) translateY(-6px);
}

/* responsive tweaks */
@media (max-width: 480px) {
  .photo-back { font-size: 14px; padding: 14px; }
}


/* ---------- Footer ---------- */
footer {
  width: 100%;
  background: #222;
  color: #fff;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
  padding: 15px 8%;
  align-items: center;
  gap: 30px;
}

footer h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

footer a {
  color: #fff;
  text-decoration: none;
}

.footer-left, .footer-right {
  flex: 1 1 300px;
  margin-left: 150px;
}

.footer-left p {
  margin-bottom: 12px;
  line-height: 1.5;
}

.social-links {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

.social-links img {
  width: 26px;
  height: 26px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.social-links img:hover {
  transform: scale(1.1);
  filter: brightness(0.8) invert(1);
}

/* Message form */

.footer-right {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.footer-header button {
  background: #00adb5;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.footer-header button:hover {
  background: #00979e;
}

/* Form layout */
.footer-right form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-right input,
.footer-right textarea {
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
}


@media (max-width: 768px) {
  footer {
    flex-direction: column;
    text-align: center;
  }

  .footer-left, .footer-right {
    flex: 1 1 100%;
  }

  .social-links {
    justify-content: center;
  }
}

/* ---------- Slider Switch ---------- */
.slider-switch {
  position: relative;
  width: 260px;
  margin: 0 auto 24px;
  background: #f2f2f2;
  border-radius: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.switch-btn {
  flex: 1;
  z-index: 2;
  border: none;
  background: none;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  color: #555;
  transition: color 0.3s ease;
}

.switch-btn.active {
  color: #fff;
}

.slider-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: #00adb5;
  border-radius: 30px;
  transition: transform 0.3s ease;
  z-index: 1;
}

/* Move slider when origami selected */
.slider-switch.origami .slider-bg {
  transform: translateX(100%);
}

/* ---------- Grid Visibility ---------- */
.hidden {
  display: none;
}

.active {
  display: grid;
}

/* Book popup stuff */

.popup-tabs {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
.tab-btn {
  padding: 10px 25px;
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
}
.tab-btn.active {
  border-bottom: 2px solid #88c9c9;
}

.book-card {
  display: flex;
  width: 400px;
  border: 1px solid #aaa;
  padding: 15px;
  border-radius: 6px;
}
.image-placeholder {
  width: 120px;
  height: 150px;
  background: #ccc;
  margin-right: 12px;
}
.review {
  font-size: .9rem;
}
.review .more { display: flex; }
.review.expanded .more { display: inline; }
.review.expanded.short { display: none; }

/* Make scrollable */
.scroll-area {
  max-height: 65vh;
  overflow-y: auto;
  padding: 20px;
}

.book-card {
  display: flex;
  border: 1px solid #aaa;
  padding: 15px;
  margin-bottom: 18px;
  border-radius: 6px;
  background: #fff;
}

.image-placeholder {
  width: 120px;
  height: 150px;
  background: #ccc;
  margin-right: 12px;
  flex-shrink: 0;
}

/* Fixed Left Side Panel */
.side-panel {
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 84vh;
    background: #e0e0e0;
    padding: 40px 20px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.side-panel h2 {
    margin-bottom: 30px;
    font-size: 20px;
    font-weight: 600;
    margin-left: 20px;
}

.project {
    margin-bottom: 30px;
    margin-left: 20px;
}

.project .title {
    font-size: 16px;
    font-weight: 600;
    margin-left: 20px;
}

.project .desc {
    font-size: 13px;
    color: #555;
    margin-left: 20px;
}

/* Push main content to the right */
.main-content {
    margin-left: 220px; /* same width as side panel */
}

/* Flip for resume */
.flip-container {
  position: relative;
  width: 100%;
  min-height: 80vh;
  perspective: 1200px;     /* enables 3D flip */
}

.flip-panel {
  position: absolute;
  width: 100%;
  backface-visibility: hidden;
  transition: transform 0.8s ease-in-out;
}

.flip-panel.front {
  transform: rotateY(0deg);
}

.flip-panel.back {
  transform: rotateY(180deg);
}

.flip-container.flipped .front {
  transform: rotateY(-180deg);
}

.flip-container.flipped .back {
  transform: rotateY(0deg);
}

/* Resume styling */
/* Wrapper */
.resume-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px;
  font-family: "Inter", sans-serif;
  color: #222;
}

/* Home Button */
.resume-home-btn {
  float: right;
  padding: 8px 20px;
  background: #d9d9d9;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 20px;
}

/* Header */
.resume-header {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  margin-bottom: 60px;
}

.resume-photo {
  width: 180px;
  height: 180px;
  background: #d3d3d3;
}

.resume-title h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.about-text {
  max-width: 600px;
  line-height: 1.6;
}

/* GRID */
.resume-grid {
  display: grid;
  grid-template-columns: 150px 1fr 200px;
  gap: 40px;
}

/* LEFT COLUMN (Labels) */
.labels {
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-top: 10px;
}

.section-spacer {
  height: 140px;
}

/* MIDDLE COLUMN (Main content) */
.content .experience-row {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.logo {
  width: 40px;
  height: 40px;
  background: #d3d3d3;
  border-radius: 6px;
}

.item-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.item-duration {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.item-list {
  font-size: 14px;
  line-height: 1.5;
  margin-left: 18px;
}

.item-description {
  font-size: 14px;
  margin-top: 8px;
}

/* RIGHT COLUMN (Skills + Languages) */
.side-title {
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.skill-category {
  font-size: 13px;
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 500;
}

.side-list {
  font-size: 14px;
  margin-left: 18px;
  line-height: 1.6;
}


