:root {
  --bg-1: #e9f2ee;
  --bg-2: #f7f8f7;
  --panel: #ffffff;
  --ink: #1c2533;
  --muted: #677285;
  --line: #d6e5dd;
  --green: #39c79b;
  --green-strong: #2cb58b;
  --pink: #ff9fa1;
  --max: 1080px;
  --radius-xl: 24px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 35%, var(--bg-1) 100%);
}

h1, h2, h3, .brand { font-family: "Sora", sans-serif; letter-spacing: -0.02em; }
.section-inner { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

.decor {
  position: fixed;
  z-index: -1;
  border: 1px solid rgba(78, 202, 162, 0.45);
  border-radius: 24px;
}
.decor-left { width: 60px; height: 100px; left: -12px; top: 180px; transform: rotate(18deg); }
.decor-right { width: 70px; height: 120px; right: -14px; bottom: 120px; transform: rotate(-16deg); }

.hero-wrap { padding-top: 1.8rem; }
.top-nav {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.68rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  position: sticky;
  top: 1rem;
  z-index: 20;
  backdrop-filter: blur(7px);
}

.brand { text-decoration: none; color: var(--ink); font-size: 1rem; font-weight: 700; }
.menu { list-style: none; display: flex; gap: 1rem; }
.menu a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.menu a:hover, .menu a:focus-visible { color: var(--ink); }

.hire-btn, .btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.58rem 0.95rem;
  font-weight: 700;
  font-size: 0.88rem;
}
.hire-btn { background: var(--green); color: #fff; }
.hire-btn:hover, .hire-btn:focus-visible { background: var(--green-strong); }

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-weight: 700;
}

.hero {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(170deg, rgba(232, 243, 237, 0.95) 0%, rgba(244, 247, 246, 0.96) 60%, rgba(255, 255, 255, 0.96) 60%);
  padding: 2.1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 480px;
}
.hero-copy h1 { font-size: clamp(1.95rem, 4vw, 3.3rem); line-height: 1.08; max-width: 12ch; }
.hero-copy p { margin-top: 0.8rem; color: var(--muted); max-width: 43ch; }
.hero-actions { margin-top: 1rem; display: flex; gap: 0.6rem; }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--green-strong); }
.btn-soft { border: 1px solid #f2bdbf; background: #fff; color: #d06669; }

.hero-photo { position: relative; min-height: 350px; display: grid; place-items: center; }
.hero-photo img, .about-photo img { width: min(90%, 300px); border-radius: 18px; object-fit: cover; position: relative; z-index: 3; }

.shape { position: absolute; border-radius: 20px; }
.shape-red { width: 220px; height: 250px; background: var(--pink); transform: rotate(-8deg); z-index: 1; }
.shape-green { width: 130px; height: 92px; background: #66d8b6; transform: rotate(-20deg); right: 44px; bottom: 58px; z-index: 2; }
.shape-line { width: 185px; height: 230px; border: 2px solid #68c8ab; background: transparent; transform: rotate(12deg); top: 32px; left: 110px; z-index: 1; }
.shape-red.small { width: 180px; height: 200px; transform: rotate(-16deg); }

.about-block, .experience-block { background: #f7f8f7; padding: 3rem 0; overflow: hidden; }
.education-block, .contact-block, .projects-block { background: #eaf2ee; padding: 3rem 0; overflow: hidden; }

.about-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; align-items: center; gap: 1.4rem; }
.about-photo { position: relative; min-height: 290px; display: grid; place-items: center; }
.about-copy h2, .section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.about-copy p, .section-head p { margin-top: 0.7rem; color: var(--muted); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto; }

.edu-chat {
  margin: 1rem auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 680px;
  padding: 0.9rem;
  box-shadow: 0 8px 18px rgba(24, 33, 48, 0.05);
}
.chat-year { display: inline-block; background: #e8faf3; color: #1d926e; border-radius: 999px; padding: 0.2rem 0.6rem; font-weight: 700; font-size: 0.8rem; }
#chat-text { margin-top: 0.45rem; color: var(--ink); min-height: 1.4rem; }

.edu-scroller {
  margin-top: 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 0.8rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  scroll-snap-type: x mandatory;
}
.edu-scroller::-webkit-scrollbar { height: 8px; }
.edu-scroller::-webkit-scrollbar-thumb { background: #b6cbc0; border-radius: 999px; }

.edu-card {
  scroll-snap-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.edu-card h3 { color: #e06f70; font-size: 1.05rem; }
.edu-card p { margin-top: 0.35rem; font-weight: 700; }
.edu-card span { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.92rem; }
.edu-card.is-active { border-color: #8ed7be; box-shadow: 0 14px 26px rgba(36, 110, 84, 0.12); transform: translateY(-4px); }

.xp-timeline {
  margin: 1.3rem auto 0;
  max-width: 920px;
  position: relative;
  padding: 1rem 0;
}
.xp-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background: #d2e5dc;
  border-radius: 999px;
  overflow: hidden;
}
.xp-progress {
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, #41cba0, #2ea985);
  border-radius: 999px;
}
.xp-item { width: 50%; padding: 0.6rem 1.1rem; position: relative; }
.xp-item.left { margin-right: auto; text-align: right; }
.xp-item.right { margin-left: auto; text-align: left; }

.xp-dot {
  position: absolute;
  top: 1.2rem;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid #41caa0;
  box-shadow: 0 0 0 0 rgba(65, 202, 160, 0.5);
  animation: pulse 1.6s infinite;
}
.xp-item.left .xp-dot { right: -8px; }
.xp-item.right .xp-dot { left: -8px; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(65, 202, 160, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(65, 202, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(65, 202, 160, 0); }
}

.xp-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.95rem;
}
.xp-card h3 { font-size: 1rem; }
.xp-card p { margin-top: 0.45rem; color: var(--muted); }

.projects-head {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
.projects-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.projects-head p { color: var(--muted); margin-top: 0.45rem; }
.projects-head code { background: #fff; padding: 0.1rem 0.4rem; border-radius: 6px; border: 1px solid var(--line); }

.project-showcase {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.project-column {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.project-column-center {
  padding-top: clamp(3.2rem, 8vw, 5.3rem);
}

.project-column .project-tile.is-upper {
  margin-top: 0;
}

.project-tile,
.project-feature {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(243, 250, 247, 0.92) 100%);
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(21, 41, 48, 0.07);
}

.project-feature {
  min-height: 470px;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.project-feature .project-image {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.55rem;
}

.project-tile {
  min-height: 140px;
  padding: 0.8rem;
  display: grid;
  gap: 0.4rem;
}

.project-tile .project-image {
  width: 100%;
  max-height: 72px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e3ece7;
  background: #fff;
  padding: 0.35rem;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.project-num {
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1;
}
.project-num.pink { color: #f08f90; }
.project-num.green { color: #39c79b; }
.project-logo { font-size: 0.76rem; color: #697487; text-transform: uppercase; letter-spacing: 0.04em; }
.project-title { font-size: 1.02rem; line-height: 1.32; }
.project-summary { color: var(--muted); font-size: 0.9rem; }
.project-detail, .project-extra { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.project-client,
.project-product {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7e7de;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #4b5d72;
  background: #f8fcfa;
  margin-right: 0.35rem;
}

.project-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.project-tags span {
  border: 1px solid #d3e5dc;
  border-radius: 999px;
  padding: 0.2rem 0.52rem;
  font-size: 0.76rem;
  color: #556479;
  background: #f8fcfa;
  font-weight: 700;
}

.project-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.project-link,
.project-readmore {
  color: #233045;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.38rem 0.62rem;
  background: #f3f8f6;
  border: 1px solid #d6e8df;
  cursor: pointer;
}

.project-readmore {
  color: #1f8c6c;
}

.project-link:hover,
.project-link:focus-visible,
.project-readmore:hover,
.project-readmore:focus-visible {
  background: #eaf7f1;
  border-color: #abdcc8;
}

.project-extra {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.project-tile.expanded .project-extra,
.project-feature.expanded .project-extra {
  max-height: 140px;
  opacity: 1;
}


.ticker-block {
  background: #f7f8f7;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
  overflow: hidden;
}

.ticker {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 0.65rem;
  padding: 0.7rem;
  animation: tickerMove 28s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfe2d8;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: #f4fbf7;
  color: #2f3c4d;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.ticker-track span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  margin-right: 0.45rem;
}

@keyframes tickerMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.contact-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 1rem;
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 0.75rem;
}

.contact-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.7rem;
  align-items: start;
}

.ci-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.ci-icon-green { background: var(--green); }
.ci-icon-pink { background: #f28f94; }

.contact-item h3 { font-size: 1.08rem; }
.contact-item p { color: var(--muted); margin-top: 0.2rem; font-size: 0.93rem; }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.contact-form h3 {
  background: var(--green);
  color: #fff;
  padding: 0.95rem 1rem;
  font-size: 1rem;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0.75rem 1rem 0;
}

.input-row.single { grid-template-columns: 1fr; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.62rem;
  font-family: inherit;
  font-size: 0.94rem;
  background: #fbfcfb;
}

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-form button {
  margin: 0.75rem 1rem 1rem;
  width: calc(100% - 2rem);
  border: 0;
  border-radius: 10px;
  padding: 0.72rem;
  background: #f28f94;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.site-footer {
  background: #f7f8f7;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  padding-bottom: 9.5rem;
  position: relative;
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.4rem;
  padding-bottom: 1rem;
}

.footer-top h3 { font-size: 1.5rem; margin-bottom: 0.45rem; }
.footer-top article:nth-child(2) h3,
.footer-top article:nth-child(3) h3 { font-size: 1.2rem; }
.footer-top p { color: #6f778a; }
.footer-top a { color: #2aa681; text-decoration: none; font-weight: 700; }

.footer-social { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.footer-social a {
  color: #4c5567;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.85rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-bottom p { color: #6f778a; font-size: 0.92rem; }
.footer-links a { color: #4b5568; text-decoration: none; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.45s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.magic-cursor-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.mountain-line-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 360px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.52;
}

.foreground-mountain-layer {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  height: 62vh;
  pointer-events: none;
  z-index: 12;
  opacity: 0.5;
}

.magic-cursor-core,
.magic-cursor-ring,
.magic-cursor-spark {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 999px;
  will-change: transform, opacity;
}

.magic-cursor-core {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: radial-gradient(circle, #ffffff 0%, #4ae0b2 62%, rgba(74, 224, 178, 0.18) 100%);
  box-shadow: 0 0 16px rgba(74, 224, 178, 0.78);
}

.magic-cursor-ring {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1.5px solid rgba(57, 199, 155, 0.62);
  box-shadow: 0 0 20px rgba(57, 199, 155, 0.22);
  transition: transform 0.18s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.magic-cursor-ring.is-active {
  transform: scale(1.35);
  border-color: rgba(242, 143, 148, 0.85);
}

.magic-cursor-spark {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 174, 170, 0.72) 55%, rgba(255, 174, 170, 0) 100%);
}

@keyframes spark-fade {
  0% {
    opacity: 0.95;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .magic-cursor-layer {
    display: none;
  }
}

@media (max-width: 980px) {
  .hero, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .xp-line { left: 18px; transform: none; }
  .xp-item, .xp-item.left, .xp-item.right { width: 100%; margin: 0; padding-left: 2.2rem; text-align: left; }
  .xp-item .xp-dot, .xp-item.left .xp-dot, .xp-item.right .xp-dot { left: 10px; right: auto; }
  .projects-head { flex-direction: column; align-items: flex-start; }
  .project-showcase { grid-template-columns: 1fr; }
  .project-column-center { padding-top: 0; }
  .project-feature { min-height: auto; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .top-nav { grid-template-columns: auto auto auto; }
  .menu-toggle { display: inline-flex; }
  .menu {
    position: absolute;
    right: 1rem;
    top: 4.1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    min-width: 180px;
    box-shadow: 0 12px 24px rgba(20, 30, 45, 0.12);
  }
  .menu.is-open { display: flex; }
  .hire-btn { display: none; }
  .hero { padding: 1.3rem; }
  .input-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

