:root {
  --dark: #121621;
  --light: #eef1f7;
  --accent: #6fa8ff;
  --text-dark: #10131a;
  --text-light: #f7f8fb;
  --muted: #9aa4b2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  min-width: 320px;
  font-family: Inter, sans-serif;
  overflow: hidden;
}

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 3fr;
  background: linear-gradient(90deg, var(--dark) 25%, var(--light) 25%);
}

.left-panel,
.right-panel {
  height: 100%;
}

.left-panel {
  display: grid;
  place-items: center;
  padding: 2.5rem 1.8rem;
}

.identity-wrapper {
  display: flex;
  align-items: center;
  gap: 1.55rem;
}

.logo-badge {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: var(--text-light);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow: hidden;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arrow-menu {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%);
  min-width: 255px;
  padding: 1.15rem 2.7rem 1.15rem 1.15rem;
  backdrop-filter: blur(4px);
  display: grid;
  gap: 0.55rem;
}

.menu-item {
  background: transparent;
  border: none;
  color: var(--muted);
  text-align: left;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding: 0.32rem 0;
  cursor: pointer;
  transition: 180ms ease;
}

.menu-item:hover,
.menu-item.active {
  color: var(--text-light);
  transform: translateX(3px);
}

.project-group {
  display: grid;
  gap: 0.25rem;
}

.has-submenu {
  position: relative;
}

.has-submenu::after {
  content: '▸';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.7rem;
  transition: 180ms ease;
}

.project-group.expanded .has-submenu::after {
  transform: translateY(-50%) rotate(90deg);
  color: var(--text-light);
}

.submenu {
  display: grid;
  gap: 0.2rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: 220ms ease;
}

.project-group.expanded .submenu {
  max-height: 220px;
  opacity: 1;
  transform: translateY(0);
}

.submenu-item {
  background: transparent;
  border: none;
  color: #c3cbda;
  text-align: left;
  font-size: 0.84rem;
  padding: 0.18rem 0 0.18rem 0.9rem;
  cursor: pointer;
  transition: 180ms ease;
}

.submenu-item:hover,
.submenu-item.active {
  color: var(--text-light);
  transform: translateX(3px);
}

.right-panel {
  display: grid;
  place-items: center;
  padding: 2.6rem;
}

.content-card {
  width: min(540px, 90%);
  display: none;
  color: var(--text-dark);
}

.content-card.active {
  display: block;
}

.content-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.content-card h1.typing-cursor::after {
  content: '|';
  margin-left: 0.08em;
  opacity: 1;
  animation: title-cursor-blink 0.8s steps(1, end) infinite;
}

@keyframes title-cursor-blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.content-card p {
  line-height: 1.7;
  color: #3d4757;
  font-size: 1rem;
}

.project-item-title {
  margin-top: 1.15rem;
  font-size: 1.05rem;
  color: #1f2735;
}

.project-item-desc {
  margin-top: 0.5rem;
}

.project-link-btn {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(31, 39, 53, 0.22);
  color: #253044;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.72);
  transition: 180ms ease;
}

.project-link-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 39, 53, 0.35);
}

.lang-switch {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid #d6dce6;
  background: rgba(255, 255, 255, 0.75);
  padding: 0.16rem 0.4rem;
  border-radius: 999px;
}

.lang-label {
  color: var(--text-dark);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.lang-toggle {
  position: relative;
  width: 30px;
  height: 17px;
  display: inline-block;
  cursor: pointer;
}

.lang-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.lang-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e2;
  transition: 220ms ease;
}

.lang-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #ffffff;
  transition: 220ms ease;
}

.lang-toggle input:checked + .lang-slider {
  background: #6fa8ff;
}

.lang-toggle input:checked + .lang-slider::before {
  transform: translateX(13px);
}

.hamburger-btn {
  display: none;
}

.mobile-topbar {
  display: none;
}

@media (min-width: 901px) {
  .app {
    display: block;
    background: var(--light);
  }

  .left-panel,
  .right-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: min(1220px, 100vw);
    transform: translateX(-50%);
    background: transparent;
  }

  .left-panel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2.5rem clamp(2rem, 3vw, 3.8rem);
    z-index: 6;
    pointer-events: none;
  }

  .identity-wrapper {
    pointer-events: auto;
  }

  .right-panel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2.6rem clamp(2rem, 3vw, 3.4rem) 2.6rem clamp(34%, 36vw, 39%);
    z-index: 4;
    pointer-events: auto;
  }

  .logo-badge {
    border: 2px solid rgba(31, 39, 53, 0.28);
    color: #1f2735;
    background: rgba(255, 255, 255, 0.5);
  }

  .arrow-menu {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(16, 19, 26, 0.12);
    backdrop-filter: blur(14px) saturate(125%);
    box-shadow: 0 14px 36px rgba(16, 19, 26, 0.11);
  }

  .menu-item {
    color: #57647a;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .menu-item:hover,
  .menu-item.active {
    color: #1e2736;
  }

  .has-submenu::after {
    color: #69778e;
  }

  .project-group.expanded .has-submenu::after {
    color: #1e2736;
  }

  .submenu-item {
    color: #6e7b92;
  }

  .submenu-item:hover,
  .submenu-item.active {
    color: #1e2736;
  }

  .content-card {
    width: min(560px, 92%);
  }
}

.social-footer {
  position: absolute;
  bottom: 1.2rem;
  right: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem;
  z-index: 12;
  pointer-events: auto;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  order: 1;
}

.social-footer .lang-switch {
  order: 2;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  background: rgba(18, 22, 33, 0.82);
  transition: 180ms ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.social-link svg {
  width: 17px;
  fill: #f0f3f8;
}

@media (max-width: 900px) {
  html,
  body {
    overflow: auto;
  }

  .app {
    display: block;
    min-height: 100dvh;
    min-width: 320px;
    height: auto;
    background: #e9edf4;
    padding-top: 74px;
    padding-bottom: 78px;
    overflow: visible;
  }

  .mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f141d;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 2.15rem;
    z-index: 20;
  }

  .mobile-current-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 170px);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f5f5f4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    text-align: center;
  }

  .mobile-logo {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: var(--text-light);
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    overflow: hidden;
  }

  .mobile-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .lang-switch {
    position: static;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    padding: 0.14rem 0.34rem;
    gap: 0.22rem;
    border-radius: 999px;
    z-index: auto;
  }

  .left-panel {
    display: block;
    height: auto;
    padding: 0;
  }

  .right-panel {
    height: auto;
    display: block;
    padding: 1.95rem 2.15rem 2.2rem;
  }

  .social-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: #0f141d;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 20;
    transform: none;
    justify-content: flex-end;
    align-items: center;
    padding: 0 0.9rem;
    gap: 0.7rem;
  }

  .content-card {
    width: min(680px, 100%);
    color: var(--text-dark);
    margin: 0 auto;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.85rem 0.58rem;
  }

  .content-card h1 {
    font-size: clamp(1.9rem, 4.8vw, 2.45rem);
    margin-bottom: 1.1rem;
    line-height: 1.2;
  }

  .content-card p {
    font-size: 0.97rem;
    line-height: 1.9;
  }

  .project-item-title {
    margin-top: 1.25rem;
    font-size: 1.03rem;
  }

  .content-card p {
    color: #3d4757;
  }

  .identity-wrapper {
    display: block;
    width: 100%;
  }

  .logo-badge {
    display: none;
  }

  .arrow-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    clip-path: none;
    width: 100%;
    min-width: 0;
    border-radius: 0;
    padding: 0.8rem 2.15rem 0.9rem;
    background: rgba(18, 22, 33, 0.92);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    max-height: 0;
    overflow: hidden;
    transition: 220ms ease;
    z-index: 19;
  }

  .app.menu-open .arrow-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    max-height: 420px;
  }

  .menu-item {
    text-align: left;
    color: #c8d1e0;
    font-size: 0.92rem;
    padding: 0.35rem 0;
  }

  .submenu-item {
    text-align: left;
    color: #b6c0d2;
    padding-left: 0.9rem;
  }

  .menu-item:hover,
  .menu-item.active,
  .submenu-item:hover,
  .submenu-item.active {
    color: #ffffff;
  }

  .hamburger-btn {
    width: 42px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 7px 9px;
    cursor: pointer;
    z-index: 6;
  }

  .hamburger-btn span {
    width: 100%;
    height: 2px;
    background: #f0f3f8;
    border-radius: 10px;
    transition: 200ms ease;
  }

  .app.menu-open .hamburger-btn span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .app.menu-open .hamburger-btn span:nth-child(2) {
    opacity: 0;
  }

  .app.menu-open .hamburger-btn span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .lang-label {
    color: #e9edf4;
    font-size: 0.6rem;
  }

  .lang-toggle {
    width: 28px;
    height: 16px;
  }

  .lang-slider::before {
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
  }

  .lang-toggle input:checked + .lang-slider::before {
    transform: translateX(12px);
  }

  .social-link {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.06);
  }

  .social-link svg {
    width: 15px;
  }
}

@media (max-width: 640px) {
  .app {
    padding-top: 68px;
    padding-bottom: 72px;
  }

  .mobile-topbar {
    height: 60px;
    padding: 0 1.58rem;
  }

  .arrow-menu {
    top: 60px;
    padding: 0.75rem 1.58rem 0.85rem;
  }

  .right-panel {
    padding: 1.7rem 1.58rem 1.95rem;
  }

  .content-card h1 {
    font-size: clamp(1.7rem, 8vw, 2.05rem);
    margin-bottom: 1rem;
    line-height: 1.18;
  }

  .content-card p {
    font-size: 0.9rem;
    line-height: 1.82;
  }

  .content-card {
    text-align: left;
    padding: 0.62rem 0.45rem;
  }

  .project-item-title {
    margin-top: 1.15rem;
    font-size: 0.97rem;
  }

  .lang-switch {
    padding: 0.13rem 0.3rem;
    gap: 0.2rem;
  }

  .menu-item {
    font-size: 0.88rem;
  }

  .submenu-item {
    font-size: 0.8rem;
  }

  .social-footer {
    height: 60px;
    padding: 0 0.72rem;
  }

  .social-icons {
    gap: 0.62rem;
  }

  .lang-label {
    font-size: 0.58rem;
  }

  .social-link {
    width: 31px;
    height: 31px;
  }
}
