*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 15px;
  font-weight: 500;
}
body {
  font-family: "Instrument Sans", sans-serif;
  overflow: hidden;
  height: 100dvh;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── TWO COLORS ONLY ── */
:root {
  --A: #eef5e4;
  --B: #222220;
}

/* DARK: left = A (light), right = B (dark) */
[data-theme="dark"] {
  --L-bg: #eef5e4;
  --L-text: #222220;
  --L-sub: rgba(34, 34, 32, 0.55);
  --L-acc: rgba(34, 34, 32, 0.75);
  --L-line: rgba(34, 34, 32, 0.12);
  --L-quote-bg: #222220;
  --L-quote-t: #eef5e4;
  --L-soc-bg: #222220;
  --L-soc-t: #eef5e4;

  --R-bg: #222220;
  --R-text: #222220;
  --R-sub: #222220;
  --R-card: #eef5e4;
  --R-card2: #eef5e4;
  --R-border: #222220;
  --R-tag-bg: #eef5e4;
  --R-tag-bd: #222220;

  --R-dot-off: #eef5e4;
  --R-acc: #eef5e4;
}

/* LIGHT: left = B (dark), right = A (light) */
[data-theme="light"] {
  --L-bg: #222220;
  --L-text: #eef5e4;
  --L-sub: rgba(238, 245, 228, 0.55);
  --L-acc: rgba(238, 245, 228, 0.75);
  --L-line: rgba(238, 245, 228, 0.12);
  --L-quote-bg: #eef5e4;
  --L-quote-t: #222220;
  --L-soc-bg: #eef5e4;
  --L-soc-t: #222220;

  --R-bg: #eef5e4;
  --R-text: #eef5e4;
  --R-sub: #eef5e4;
  --R-card: #222220;
  --R-card2: #222220;
  --R-border: #eef5e4;
  --R-tag-bg: #222220;
  --R-tag-bd: #eef5e4;

  --R-dot-off: #222220;
  --R-acc: #222220;
}

/* ── PAGE ── */
.page {
  display: flex;
  width: 100%;
  height: 100dvh;
}

/* ════════════════ LEFT ════════════════ */
.left {
  width: 50%;
  flex-shrink: 0;
  background: var(--L-bg);
  color: var(--L-text);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  transition:
    background 0.3s,
    color 0.3s;
}
.left::-webkit-scrollbar {
  width: 4px;
}
.left::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.avail {
  text-align: center;
  font-size: 0.82rem;
  color: var(--L-sub);
  margin-bottom: 0.35rem;
  transition: color 0.3s;
}

.lname {
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 3vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--L-text);
  transition: color 0.3s;
}

.lrole {
  text-align: center;
  font-size: 0.88rem;
  color: var(--L-sub);
  margin-top: 0.3rem;
  transition: color 0.3s;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--L-line);
  margin: 0.9rem 0;
  transition: background 0.3s;
  flex-shrink: 0;
}

.sec-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--L-acc);
  margin-bottom: 0.7rem;
  flex-shrink: 0;
  transition: color 0.3s;
}
.sec-title::before,
.sec-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--L-acc);
  opacity: 0.35;
  transition: background 0.3s;
}

.about-text {
  font-size: 1rem;
  color: var(--L-sub);
  line-height: 1.85;
  text-align: justify;
  transition: color 0.3s;
}

.edu-card {
  display: flex;
  gap: 0.85rem;
}
.edu-bar {
  width: 4px;
  border-radius: 999px;
  background: var(--L-acc);
  flex-shrink: 0;
  transition: background 0.3s;
}
.edu-degree {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--L-text);
  transition: color 0.3s;
}
.edu-school {
  font-size: 0.9rem;
  color: var(--L-acc);
  margin-bottom: 0.15rem;
  transition: color 0.3s;
}
.edu-loc,
.edu-year {
  font-size: 0.8rem;
  color: var(--L-sub);
  line-height: 1.5;
  transition: color 0.3s;
}

/* quote + contact side by side */
.mid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  flex-shrink: 0;
}

.quote-box {
  background: var(--L-quote-bg);
  color: var(--L-quote-t);
  border-radius: 16px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition:
    background 0.3s,
    color 0.3s;
}
.quote {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 600;
}
.quote-sub {
  margin-top: 0.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  font-weight: 900;
}

.contact-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--L-acc);
  margin-bottom: 0.8rem;
  transition: color 0.3s;
}
.contact-group {
  margin-bottom: 0.6rem;
}
.contact-label {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--L-sub);
  margin-bottom: 0.18rem;
  transition: color 0.3s;
}
.contact-value {
  font-size: 0.8rem;
  color: var(--L-text);
  transition: color 0.3s;
}

/* bottom bar */
.bottom {
  margin-top: auto;
  border-top: 1px solid var(--L-line);
  padding-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  transition: border-color 0.3s;
}
.socials {
  display: flex;
  gap: 0.65rem;
}

.soc {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--L-soc-bg);
  color: var(--L-soc-t);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.2s,
    opacity 0.2s;
}
.soc svg {
  width: 20px;
  height: 20px;
}
.soc:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}
.theme-soc {
  margin-left: auto;
}

/* ════════════════ RIGHT ════════════════ */
.right {
  width: 50%;
  flex-shrink: 0;
  background: var(--R-bg);
  color: var(--R-text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    background 0.3s,
    color 0.3s;
}

/* scrollable inner wrapper */
.right-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.right-scroll::-webkit-scrollbar {
  width: 4px;
}
.right-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* SKILLS */
.skills-sec {
  padding: 1.75rem 2rem 1.5rem;
  border-bottom: 1px solid var(--R-border);
  flex-shrink: 0;
  transition: border-color 0.3s;
}

.r-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--R-acc);
  margin-bottom: 1rem;
  transition: color 0.3s;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.skill-card {
  background: var(--R-card);
  border: 1px solid var(--R-border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  transition:
    border-color 0.2s,
    background 0.3s;
}
.skill-card:hover {
  border-color: rgba(238, 245, 228, 0.22);
}
.skill-card.full {
  grid-column: 1 / -1;
}

.skill-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--R-sub);
  margin-bottom: 0.7rem;
  transition: color 0.3s;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--R-text);
  background: var(--R-tag-bg);
  border: 1px solid var(--R-tag-bd);
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  transition:
    background 0.18s,
    color 0.3s,
    border-color 0.3s;
}
.tag:hover {
  background: var(--R-card2);
}

/* PROJECTS */
.projects-sec {
  min-height: 0;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.projects-sec .r-title {
  margin-bottom: 0.9rem;
  flex-shrink: 0;
}

/* carousel */
.carousel-outer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.carousel-track-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  height: 100%;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.proj-card {
  flex: 0 0 calc(50% - 0.5rem);
  height: 100%;
  background: var(--R-card);
  border: 1px solid var(--R-border);
  border-radius: 18px;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition:
    border-color 0.2s,
    background 0.3s,
    transform 0.22s;
}
.proj-card:hover {
  transform: translateY(-3px);
  border-color: var(--R-card2);
}

.proj-top {
  display: flex;
  justify-content: end;
  align-items: center;
  flex-shrink: 0;
}

.proj-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--R-sub);
  opacity: 0.5;
  transition: color 0.3s;
}

.proj-links {
  display: flex;
  gap: 0.4rem;
}

.plink {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--R-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--R-sub);
  transition:
    border-color 0.2s,
    color 0.2s;
}
.plink svg {
  width: 13px;
  height: 13px;
}
.plink:hover {
  border-color: var(--R-text);
  color: var(--R-text);
}

.proj-title {
  font-family: "Playfair Display", serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--R-text);
  flex-shrink: 0;
  transition: color 0.3s;
}

.badge {
  display: inline-flex;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.48rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.16rem 0.38rem;
  border-radius: 5px;
  background: var(--R-tag-bg);
  border: 1px solid var(--R-tag-bd);
  color: var(--R-sub);
  margin-left: 0.35rem;
  vertical-align: middle;
  transition: 0.3s;
}

.proj-desc {
  font-size: 0.84rem;
  color: var(--R-sub);
  line-height: 1.8;
  flex: 1;
  transition: color 0.3s;
}

.proj-card .tags {
  flex-shrink: 0;
  margin-top: auto;
}

/* controls */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-shrink: 0;
}

.nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--R-card);
  border: 1px solid var(--R-border);
  color: var(--R-text);
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.3s;
}
.nav-btn:hover {
  background: var(--R-card2);
  border-color: var(--R-sub);
}

.dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--R-dot-off);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}
.dot.active {
  background: var(--R-dot-off);
  transform: scale(1.3);
}

/* FOOTER */
.footer {
  margin-top: auto;
  background: rgb(18, 18, 18);
  padding: 1.2rem;
  text-align: center;
  flex-shrink: 0;
}
.footer p {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  color: #eef5e4;
}

/* ════════════════ MOBILE ════════════════ */
@media (max-width: 860px) {
  body {
    overflow: hidden;
  }

  .page {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .page::-webkit-scrollbar {
    display: none;
  }

  .left,
  .right {
    flex: 0 0 100vw;
    width: 100vw;
    min-width: 100vw;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .left {
    overflow-y: auto;
    padding: 1.5rem;
  }
  .right {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .right-scroll {
    overflow: visible;
    flex: none;
    height: auto;
  }

  .mid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .skill-card.full {
    grid-column: auto;
  }

  .projects-sec {
    flex: none;
    height: auto;
    padding-bottom: 0;
  }
  .carousel-outer {
    flex: none;
    height: auto;
  }
  .carousel-track-wrap {
    overflow: hidden;
    height: 320px;
  }
  .proj-card {
    flex: 0 0 85%;
    height: 100%;
  }
  .proj-title {
    font-size: 1.2rem;
  }
  .soc {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .lname {
    font-size: 2rem;
  }
  .proj-card {
    flex: 0 0 91%;
  }
  .about-text,
  .proj-desc {
    font-size: 0.84rem;
  }
}
