:root {
  --bg: #030712;
  --panel: rgba(9, 17, 32, 0.72);
  --panel-strong: rgba(12, 24, 45, 0.88);
  --line: rgba(157, 187, 255, 0.18);
  --text: #f2f7ff;
  --muted: #a9b7cc;
  --soft: #6f8099;
  --blue: #5a93ff;
  --cyan: #35d8ef;
  --violet: #9474ff;
  --radius: 18px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.78) 46%, rgba(3, 7, 18, 0.5)),
    linear-gradient(180deg, rgba(3, 7, 18, 0.3), rgba(3, 7, 18, 0.98)),
    url("assets/hero-premium-star.png") center / cover no-repeat;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(120, 160, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 55% 45%, #000, transparent 78%);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 70px);
  background: linear-gradient(to bottom, rgba(3, 7, 18, 0.86), transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(139, 173, 255, 0.42);
  border-radius: 10px;
  background: rgba(17, 31, 58, 0.72);
  box-shadow: inset 0 0 20px rgba(90, 147, 255, 0.18);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 13, 26, 0.62);
  backdrop-filter: blur(18px);
}

.top-nav a {
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--text);
  background: rgba(90, 147, 255, 0.18);
}

.top-nav .nav-message {
  color: #ecf5ff;
  background: linear-gradient(135deg, rgba(77, 140, 255, 0.28), rgba(53, 216, 239, 0.14));
}

.floating-message {
  position: fixed;
  right: clamp(18px, 3vw, 42px);
  bottom: clamp(18px, 4vw, 40px);
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px 0 14px;
  border: 1px solid rgba(139, 184, 255, 0.4);
  border-radius: 999px;
  color: #f6fbff;
  background: rgba(8, 18, 36, 0.78);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42), 0 0 28px rgba(77, 140, 255, 0.22);
  backdrop-filter: blur(18px);
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.floating-message::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(53, 216, 239, 0.9);
}

.floating-message:hover {
  transform: translateY(-3px);
  border-color: rgba(53, 216, 239, 0.7);
  background: rgba(12, 28, 56, 0.9);
}

body.on-contact .floating-message {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
}

.side-progress {
  position: fixed;
  right: clamp(18px, 4vw, 46px);
  top: 50%;
  z-index: 25;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #c9d8f4;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
}

.side-progress i {
  display: block;
  width: 2px;
  height: 152px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(157, 187, 255, 0.18);
}

.side-progress b {
  display: block;
  width: 100%;
  height: 16.66%;
  border-radius: inherit;
  background: linear-gradient(var(--blue), var(--cyan));
  box-shadow: 0 0 18px rgba(53, 216, 239, 0.8);
  transition: height 0.35s ease;
}

.snap-container {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.snap-container::-webkit-scrollbar {
  display: none;
}

.section {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: 112px clamp(22px, 8vw, 128px) 52px;
  scroll-snap-align: start;
  overflow: hidden;
}

.section-inner {
  position: relative;
  z-index: 2;
  width: min(1160px, 100%);
  margin: auto;
}

.hero {
  align-items: center;
}

.hero::after,
.section::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  right: -12vw;
  bottom: -24vh;
  width: 52vw;
  height: 52vw;
  border: 1px solid rgba(122, 167, 255, 0.16);
  box-shadow: inset 0 0 120px rgba(35, 106, 255, 0.12);
}

.section::before {
  top: 16%;
  right: 12%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(55, 143, 255, 0.18), transparent 64%);
}

.hero-media {
  position: absolute;
  inset: 0 0 0 43%;
  z-index: 0;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg), rgba(3, 7, 18, 0.48) 38%, transparent 74%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.08), rgba(3, 7, 18, 0.72));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.hero-inner {
  margin-left: 0;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 16px;
  color: #8bb8ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(66px, 12vw, 138px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.28;
}

.role-title {
  margin-bottom: 18px;
  color: #dbe8ff;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 800;
}

.hero-desc,
.section-copy p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(157, 187, 255, 0.24);
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #4d8cff, #8f70ff);
  box-shadow: 0 20px 46px rgba(77, 140, 255, 0.32);
}

.button.ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 78px);
}

.section-copy.narrow {
  max-width: 760px;
}

.intro-grid,
.skill-grid {
  display: grid;
  gap: 16px;
}

.intro-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.project-card,
.skill-card,
.experience-card,
.contact-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(12, 24, 45, 0.82), rgba(5, 10, 22, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.info-card,
.skill-card {
  min-height: 278px;
  padding: 18px;
  border-radius: var(--radius);
}

.info-card img,
.skill-card img {
  width: 100%;
  height: 118px;
  margin-bottom: 18px;
  border: 1px solid rgba(157, 187, 255, 0.16);
  border-radius: 14px;
  object-fit: cover;
}

.info-card p,
.skill-card p,
.project-card p,
.experience-card p,
.experience-card li {
  color: var(--muted);
  line-height: 1.72;
}

.experience-card {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 38px;
  margin-top: 36px;
  padding: 32px;
  border-radius: 22px;
}

.experience-time {
  display: grid;
  align-content: start;
  gap: 12px;
}

.experience-time span {
  color: #8bb8ff;
  font-weight: 800;
}

.experience-time strong {
  font-size: 28px;
}

.experience-time small {
  color: var(--muted);
  font-size: 15px;
}

.experience-card ul,
.project-card ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 18px;
}

.projects .section-copy {
  margin-bottom: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 16px;
}

.project-focus-grid {
  display: grid;
}

.projects-focus .section-copy {
  max-width: 940px;
}

.project-card {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  border-color: rgba(90, 147, 255, 0.45);
  transform: translateY(-3px);
}

.project-card.featured {
  grid-row: span 2;
  grid-template-columns: 1fr;
}

.project-focus-grid .project-card.featured {
  grid-row: auto;
  grid-template-columns: minmax(420px, 0.82fr) minmax(0, 1fr);
  align-items: center;
  padding: 18px;
}

.project-card img {
  width: 100%;
  height: 164px;
  border: 1px solid rgba(157, 187, 255, 0.16);
  border-radius: 14px;
  object-fit: cover;
}

.project-card.featured img {
  height: 184px;
}

.project-focus-grid .project-card.featured img {
  height: 430px;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.project-detail-grid div {
  padding: 12px;
  border: 1px solid rgba(157, 187, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.project-detail-grid strong,
.project-detail-grid span {
  display: block;
}

.project-detail-grid strong {
  margin-bottom: 6px;
  color: #8bb8ff;
  font-size: 12px;
}

.project-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.secondary-project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.secondary-project-grid .project-card {
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 310px;
}

.secondary-project-grid .project-card img {
  height: 100%;
  min-height: 260px;
}

.card-head span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(139, 184, 255, 0.18);
  border-radius: 999px;
  color: #8bb8ff;
  background: rgba(90, 147, 255, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.link-row a {
  padding: 9px 12px;
  border: 1px solid rgba(157, 187, 255, 0.22);
  border-radius: 999px;
  color: #dce8ff;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 800;
}

.skill-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.contact {
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.64)),
    radial-gradient(circle at 78% 35%, rgba(53, 216, 239, 0.14), transparent 36%);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(420px, 0.68fr);
  align-items: center;
  gap: clamp(34px, 5.5vw, 76px);
}

.contact-stack {
  display: grid;
  gap: 14px;
}

.contact-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
}

.contact-card div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(157, 187, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.contact-card a {
  display: block;
  margin-top: 8px;
  font-size: clamp(18px, 1.7vw, 24px);
  font-weight: 800;
  word-break: break-word;
}

.contact-card span,
.contact-card small {
  color: var(--muted);
}

.contact-card small {
  grid-column: 1 / -1;
  padding: 0 2px;
}

.message-card {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(12, 24, 45, 0.82), rgba(5, 10, 22, 0.72));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.featured-message {
  position: relative;
  overflow: hidden;
  border-color: rgba(53, 216, 239, 0.34);
  background:
    linear-gradient(145deg, rgba(18, 35, 65, 0.92), rgba(6, 13, 28, 0.9)),
    radial-gradient(circle at 88% 8%, rgba(77, 140, 255, 0.24), transparent 34%);
}

.featured-message::before {
  content: "Message";
  position: absolute;
  top: 18px;
  right: 20px;
  color: rgba(139, 184, 255, 0.28);
  font-size: 12px;
  font-weight: 800;
}

.form-head {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.form-head strong {
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.1;
}

.form-head span,
.message-card label span,
.form-status {
  color: var(--muted);
  font-size: 13px;
}

.message-card label {
  display: grid;
  gap: 7px;
}

.message-card input,
.message-card textarea {
  width: 100%;
  border: 1px solid rgba(157, 187, 255, 0.18);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  font: inherit;
  outline: none;
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.message-card input:focus,
.message-card textarea:focus {
  border-color: rgba(90, 147, 255, 0.72);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(90, 147, 255, 0.12);
}

.message-card .button {
  justify-self: stretch;
  border: 0;
  cursor: pointer;
}

.message-card .button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-status {
  min-height: 18px;
  margin: 0;
}

.stats-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(14px);
}

.stats-panel[hidden] {
  display: none;
}

.stats-card {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(157, 187, 255, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(12, 24, 45, 0.94), rgba(5, 10, 22, 0.92)),
    url("assets/hero-premium-star.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.stats-card h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.stats-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(157, 187, 255, 0.22);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat-item,
.message-item {
  border: 1px solid rgba(157, 187, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  padding: 13px;
  overflow-wrap: anywhere;
}

.stat-item span,
.message-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-item strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(20px, 2.4vw, 26px);
}

.message-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.message-item strong {
  display: block;
  margin-bottom: 6px;
}

.message-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

footer {
  position: absolute;
  right: clamp(22px, 8vw, 128px);
  bottom: 26px;
  left: clamp(22px, 8vw, 128px);
  display: flex;
  justify-content: space-between;
  color: var(--soft);
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

.delay-1 {
  transition-delay: 0.1s;
}

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

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

.delay-4 {
  transition-delay: 0.34s;
}

@media (max-width: 1080px) {
  body {
    overflow: auto;
  }

  .snap-container {
    scroll-snap-type: y proximity;
  }

  .side-progress {
    display: none;
  }

  .split-layout,
  .contact-inner,
  .experience-card,
  .project-grid,
  .project-focus-grid .project-card.featured,
  .secondary-project-grid,
  .secondary-project-grid .project-card {
    grid-template-columns: 1fr;
  }

  .intro-grid,
  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card.featured {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 18px 20px;
  }

  .top-nav {
    display: none;
  }

  .section {
    min-height: auto;
    padding: 104px 20px 74px;
  }

  .hero {
    min-height: 100vh;
  }

  .hero-media {
    inset: 38% 0 0 0;
    opacity: 0.58;
  }

  .hero-media::after {
    background:
      linear-gradient(180deg, var(--bg), rgba(3, 7, 18, 0.64) 42%, rgba(3, 7, 18, 0.9)),
      linear-gradient(90deg, rgba(3, 7, 18, 0.72), transparent);
  }

  h1 {
    font-size: clamp(58px, 19vw, 92px);
  }

  h2 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .role-title {
    font-size: 20px;
  }

  .hero-desc,
  .section-copy p {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .intro-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-card img,
  .project-card.featured img {
    height: 190px;
  }

  .project-focus-grid .project-card.featured img,
  .secondary-project-grid .project-card img {
    height: 190px;
    min-height: 190px;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .experience-card,
  .contact-card,
  .message-card {
    padding: 22px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  footer {
    position: static;
    padding: 0 20px 24px;
  }
}
