:root {
  --bg: #f5f9ff;
  --bg-soft: rgba(255, 255, 255, 0.74);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --line: rgba(82, 121, 164, 0.16);
  --line-strong: rgba(82, 121, 164, 0.28);
  --text: #17304d;
  --muted: #59718c;
  --accent: #63a7ff;
  --accent-deep: #2c7ae7;
  --accent-soft: rgba(99, 167, 255, 0.16);
  --shadow: 0 24px 60px rgba(74, 110, 153, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --max-width: 1600px;
  --header-offset: 112px;
  --card-padding: 48px;
  --card-padding-mobile: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--header-offset);
  background:
    radial-gradient(circle at top left, rgba(146, 202, 255, 0.35), transparent 28%),
    radial-gradient(circle at bottom right, rgba(125, 162, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.page-aura {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.aura-one {
  top: 84px;
  right: 10%;
  width: 280px;
  height: 280px;
  background: rgba(140, 197, 255, 0.32);
  animation: drift 12s ease-in-out infinite;
}

.aura-two {
  bottom: 10%;
  left: 6%;
  width: 240px;
  height: 240px;
  background: rgba(198, 223, 255, 0.48);
  animation: drift 14s ease-in-out infinite reverse;
}

.site-header,
.section-shell,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(90vw, var(--max-width));
  margin: 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7cc2ff, #2c7ae7);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 0.98rem;
}

.brand-copy span:last-child {
  color: var(--muted);
  font-size: 0.84rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

.language-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(233, 242, 255, 0.95);
  border: 1px solid var(--line);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.lang-btn.is-active {
  background: white;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(99, 167, 255, 0.2);
}

main {
  position: relative;
  z-index: 1;
  padding-bottom: 64px;
}

.section-shell {
  width: min(90vw, var(--max-width));
  margin: 0 auto;
  scroll-margin-top: calc(var(--header-offset) + 18px);
}

main > .section-shell + .section-shell {
  margin-top: clamp(30px, 5vw, 54px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: stretch;
  padding-top: clamp(18px, 4vw, 42px);
}

.hero-copy,
.hero-panel-card,
.about-card,
.project-card,
.stack-card,
.responsibility-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--card-padding);
  border-radius: var(--radius-xl);
}

.hero h1,
.section-heading h2 {
  margin: 0;
  letter-spacing: -0.045em;
}

.hero h1 {
  font-weight: 400;
  max-width: 12.5ch;
  font-size: clamp(2.45rem, 5vw, 4.35rem);
  line-height: 1.02;
}

.hero-text,
.section-description,
.about-card p,
.responsibility-card p,
.panel-grid p {
  color: var(--muted);
}

.hero-text {
  max-width: 60ch;
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  margin: 22px 0 0;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: clamp(0.95rem, 1.1vw, 1.08rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 800;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, #79bbff, #2c7ae7);
  color: white;
  box-shadow: 0 16px 28px rgba(44, 122, 231, 0.24);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.stat-card strong {
  display: block;
  font-size: 1.12rem;
}

.stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-panel {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.hero-panel-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--card-padding);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(234, 244, 255, 0.8)),
    linear-gradient(180deg, rgba(124, 194, 255, 0.16), transparent);
}

.panel-label,
.contact-label,
.project-type {
  margin: 0;
  font-size: clamp(0.88rem, 0.95vw, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--accent-deep);
  font-weight: 800;
}

.panel-grid {
  display: grid;
  gap: 20px;
  margin-top: 18px;
}

.panel-metric {
  display: block;
  font-size: 3rem;
  line-height: 0.95;
  letter-spacing: -0.08em;
  margin-bottom: 10px;
}

.hero-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-ribbon span,
.chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 0.88rem;
}

.section-heading {
  margin-bottom: clamp(22px, 3vw, 30px);
}

.section-heading h2 {
  max-width: 17ch;
  font-size: clamp(1.85rem, 3.1vw, 2.95rem);
  line-height: 1.08;
}

main > .section-shell:not(.hero) {
  padding: var(--card-padding);
  border-radius: 34px;
  border: 1px solid rgba(145, 184, 224, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.28)),
    rgba(244, 249, 255, 0.38);
  box-shadow: 0 18px 46px rgba(109, 145, 184, 0.08);
}

.section-description {
  max-width: 58ch;
  margin: 14px 0 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.about-card {
  padding: 28px;
  border-radius: var(--radius-lg);
}

.signal-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.signal-list li + li {
  margin-top: 10px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 30px 70px rgba(74, 110, 153, 0.16);
}

.project-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #dceeff, #f8fbff);
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-mockup {
  display: grid;
  place-items: center;
  padding: 22px;
  isolation: isolate;
}

.project-mockup::before,
.project-mockup::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  z-index: -1;
}

.project-mockup::before {
  width: 210px;
  height: 210px;
  top: -32px;
  right: -46px;
}

.project-mockup::after {
  width: 150px;
  height: 150px;
  bottom: -40px;
  left: -28px;
}

.project-mockup.resume {
  background: linear-gradient(135deg, #dff1ff, #f6fbff);
}

.project-mockup.events {
  background: linear-gradient(135deg, #e4f3ff, #edf7ff 45%, #d6ebff);
}

.project-mockup.pdf {
  background: linear-gradient(135deg, #edf7ff, #ffffff);
}

.project-mockup.whiteboard {
  background: linear-gradient(135deg, #dbeeff, #f5fbff);
}

.project-mockup.study {
  background: linear-gradient(135deg, #e8f4ff, #f9fcff);
}

.mockup-browser {
  width: min(100%, 320px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 44px rgba(66, 109, 161, 0.15);
  overflow: hidden;
}

.mockup-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 0;
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(99, 167, 255, 0.5);
}

.mockup-body {
  padding: 16px;
}

.mockup-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 800;
}

.mockup-title {
  font-size: 2rem;
  line-height: 0.95;
  margin: 10px 0 18px;
}

.mockup-lines {
  display: grid;
  gap: 9px;
}

.mockup-lines span {
  height: 10px;
  border-radius: 999px;
  background: rgba(112, 165, 238, 0.16);
}

.mockup-lines span:nth-child(1) {
  width: 100%;
}

.mockup-lines span:nth-child(2) {
  width: 82%;
}

.mockup-lines span:nth-child(3) {
  width: 67%;
}

.mockup-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mockup-pills span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(99, 167, 255, 0.12);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

.project-content {
  padding: 28px;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.project-content h3 {
  margin: 8px 0 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.project-description {
  margin: 16px 0 0;
  color: var(--muted);
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-features {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.project-features li + li {
  margin-top: 10px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  font-weight: 700;
}

.stack-grid,
.responsibility-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.stack-card,
.responsibility-card {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.stack-card h3,
.responsibility-card h3 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(130, 164, 203, 0.16);
  background: rgba(255, 255, 255, 0.74);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.tech-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(130, 164, 203, 0.28);
  background: rgba(255, 255, 255, 0.88);
}

.tech-icon {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.tech-icon[alt] {
  color: initial;
}

.tech-name {
  min-width: 0;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
}

.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.contact-card a[href^="https://github.com"] {
  font-size: 1.15rem;
  font-weight: 800;
}

.site-footer {
  width: min(90vw, var(--max-width));
  margin: clamp(36px, 6vw, 56px) auto 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chatbot-shell {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 1100;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 14px;
}

.chatbot-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7fc0ff, #2c7ae7);
  color: #fff;
  box-shadow: 0 20px 40px rgba(44, 122, 231, 0.26);
  cursor: pointer;
}

.chatbot-toggle:hover,
.chatbot-toggle:focus-visible {
  transform: translateY(-2px);
}

.chatbot-toggle-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  font-weight: 800;
}

.chatbot-toggle-label {
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.chatbot-panel {
  width: min(380px, calc(100vw - 28px));
  height: min(720px, 80vh);
  max-height: min(720px, 80vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.88)),
    rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(74, 110, 153, 0.2);
}

.chatbot-panel[hidden] {
  display: none !important;
}

.chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.chatbot-header-main {
  min-width: 0;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 1.18rem;
}

.chatbot-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
}

.chatbot-subtitle,
.chatbot-answer,
.chatbot-step {
  color: var(--muted);
}

.chatbot-subtitle,
.chatbot-step {
  margin: 8px 0 0;
  font-size: 0.92rem;
}

.chatbot-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px 18px;
}

.chat-message {
  display: grid;
  gap: 8px;
}

.chatbot-answer {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

.chatbot-answer {
  color: var(--text);
}

.chatbot-process {
  padding: 0;
  border: 1px solid rgba(82, 121, 164, 0.12);
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.72);
}

.chatbot-process-summary {
  padding: 9px 12px;
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 0.83rem;
  cursor: pointer;
  list-style: none;
}

.chatbot-process-body {
  padding: 0 12px 10px;
}

.chatbot-steps {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.chatbot-step {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}

.chatbot-step-icon {
  width: 18px;
  color: var(--accent-deep);
  font-weight: 800;
  flex: 0 0 auto;
}

.chatbot-step-label {
  min-width: 0;
}

.chatbot-input-area {
  position: sticky;
  bottom: 0;
  padding: 14px 18px 18px;
  background:
    linear-gradient(180deg, rgba(245, 249, 255, 0), rgba(245, 249, 255, 0.92) 24%, rgba(245, 249, 255, 0.98));
}

.chatbot-form {
  display: grid;
  gap: 12px;
}

.chatbot-input {
  width: 100%;
  min-height: 44px;
  max-height: 96px;
  resize: none;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

.chatbot-submit {
  justify-self: end;
  min-width: 108px;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7fc0ff, #2c7ae7);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.chatbot-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

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

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

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(12px, -14px, 0) scale(1.04);
  }
}

@media (max-width: 1199px) {
  :root {
    --card-padding: 32px;
  }

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

@media (max-width: 1080px) {
  .hero,
  .about-grid,
  .stack-grid,
  .responsibility-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    top: 10px;
    width: min(94vw, var(--max-width));
    border-radius: 28px;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 12px 14px;
  }

  .hero {
    padding-top: 10px;
  }

  .hero-copy,
  .hero-panel-card {
    padding: var(--card-padding);
  }

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

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .tech-list {
    grid-template-columns: 1fr;
  }

  .chatbot-panel {
    width: min(460px, calc(100vw - 32px));
  }
}

@media (max-width: 640px) {
  .section-shell,
  .site-header,
  .site-footer {
    width: min(94vw, var(--max-width));
  }

  :root {
    --card-padding: var(--card-padding-mobile);
  }

  .hero h1,
  .section-heading h2 {
    max-width: none;
  }

  .project-content,
  .about-card,
  .stack-card,
  .responsibility-card,
  .contact-card {
    padding: 22px;
  }

  main > .section-shell:not(.hero) {
    padding: var(--card-padding);
    border-radius: 28px;
  }

  .project-header {
    flex-direction: column;
  }

  .chatbot-shell {
    right: 12px;
    left: 12px;
    align-items: stretch;
  }

  .chatbot-panel {
    width: 100%;
    height: min(680px, 82vh);
    max-height: min(680px, 82vh);
  }

  .chatbot-input-area {
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .chatbot-toggle {
    align-self: flex-end;
  }
}

@media (max-width: 767px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
