/* Recreation of mavlonov.framer.website
   Breakpoints: desktop >= 1200px, tablet 810–1199px, mobile < 810px */

:root {
  --text: #000;
  --muted: #666;
  --line: rgba(0, 0, 0, 0.08);
  --side: #f4f4f4;
  --blue: #006eff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11';
}

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

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

button {
  font: inherit;
  color: inherit;
}

/* ------------------------------ Typography ------------------------------ */

.h1 {
  font-size: 35px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.lead,
.body {
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
}

.u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.label,
.client-name {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
}

.label-sm {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.06px;
  color: #6b6b6b;
}

/* -------------------------------- Sidebar ------------------------------- */

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 240px;
  background: var(--side);
  padding: 24px 12px;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 10;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.profile,
.m-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile {
  padding: 0 8px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-name {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.profile-role {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.side-nav {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.nav-item .icon {
  flex-shrink: 0;
}

.nav-item:hover {
  color: var(--text);
}

.nav-item.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.nav-label {
  white-space: nowrap;
}

/* --------------------------------- Main --------------------------------- */

.main {
  margin-left: 240px;
  min-height: 100vh;
}

.container {
  max-width: 660px;
  margin: 0 auto;
  padding: 123px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.m-head {
  display: none;
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* -------------------------------- Buttons ------------------------------- */

.btns {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 11px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  letter-spacing: -0.03em;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
}

.btn-primary {
  padding: 9px 16px;
  color: #fff;
  background: linear-gradient(180deg, #000 0%, #4a4a4a 100%);
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-secondary {
  padding: 8px 16px;
  color: #000;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  box-shadow: 0 0 0 1px rgba(18, 17, 30, 0.08), 0 1px 2px 0 rgba(18, 17, 30, 0.2);
}

.btn-secondary:hover {
  box-shadow: 0 0 0 1px rgba(18, 17, 30, 0.12), 0 2px 4px 0 rgba(18, 17, 30, 0.18);
}

.btn .icon {
  width: 20px;
  height: 20px;
}

/* --------------------------------- Home --------------------------------- */

.clients {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  gap: 16px;
}

.client-desc {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.works {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.works img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--side);
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Padding + equal negative margin: the hover fill extends around the block
   while logos stay aligned with the section label. */
.project {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  margin: -12px;
  border-radius: 16px;
  transition: background-color 0.2s;
}

.project:hover {
  background: var(--side);
}

.project-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--side);
}

.project-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-name {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project-desc {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--muted);
}

/* ------------------------------ Experience ------------------------------ */

.xp-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.xp {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.xp-top {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.xp-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xp-head img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.xp-head h5,
.tpl-title h5 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.kv {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kv-row {
  display: flex;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

.kv-k {
  width: 60px;
  flex-shrink: 0;
  color: var(--muted);
}

.kv-v {
  flex: 1;
  min-width: 0;
}

.xp-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.xp-imgs img {
  width: 100%;
  aspect-ratio: 193 / 419;
  object-fit: cover;
  border-radius: 16px;
  background: var(--side);
}

/* --------------------------------- Blog --------------------------------- */

.posts {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.cover,
.post-cover {
  position: relative;
  overflow: hidden;
  background: var(--side);
}

.cover {
  aspect-ratio: 318 / 209;
  border-radius: 16px;
}

.cover::after,
.post-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

.cover img,
.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .cover img {
  transform: scale(1.03);
}

.post-card h2 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.post-card p {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card time {
  display: block;
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* Post */

.post {
  display: flex;
  flex-direction: column;
}

.back {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  color: var(--blue);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.back-icon {
  width: 24px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back:hover {
  opacity: 0.75;
}

.post-date {
  margin-top: 20px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.post-title {
  margin-top: 16px;
}

.post-excerpt {
  margin-top: 14px;
}

.post-cover {
  margin-top: 20px;
  aspect-ratio: 660 / 377;
  border-radius: 24px;
}

.post-cover::after {
  border-color: var(--line);
}

.rt {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.rt > * + * {
  margin-top: 16px;
}

.rt h2,
.rt h3,
.rt h4 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.rt > h2,
.rt > h3,
.rt > h4 {
  margin-top: 40px;
}

.rt > ul,
.rt > ol,
.rt > img {
  margin-top: 24px;
}

.rt > :first-child {
  margin-top: 0;
}

.rt h2 {
  font-size: 24px;
}

.rt h3 {
  font-size: 20px;
}

.rt h4 {
  font-size: 18px;
}

.rt ul,
.rt ol {
  padding-left: 20px;
}

.rt li p {
  margin: 0;
}

.rt img {
  width: 100%;
  height: auto;
}

.rt a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rt blockquote {
  padding-left: 16px;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

/* ------------------------------- Templates ------------------------------ */

.tpl-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.tpl {
  display: flex;
  flex-direction: column;
}

.tpl > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--side);
}

.tpl-title {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.tpl-title h5:last-child {
  flex-shrink: 0;
}

.tpl .lead {
  margin-top: 16px;
}

.tpl .btns {
  margin-top: 16px;
}

/* -------------------------------- Sports -------------------------------- */

.pbs-section {
  gap: 16px;
}

.pbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.pbs .kv-k {
  width: 120px;
}

.story {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

.story h3 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.story-img {
  width: 100%;
  object-fit: cover;
  background: var(--side);
}

/* -------------------------------- Connect ------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.input {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font);
  font-size: 14px;
  line-height: 18px;
  color: var(--text);
  outline: none;
  transition: box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder {
  color: #999;
}

.input:focus {
  box-shadow: inset 0 0 0 1px var(--blue);
}

.select-wrap {
  position: relative;
  display: block;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select.input {
  padding-right: 40px;
  cursor: pointer;
}

select.input:invalid {
  color: var(--muted);
}

.textarea {
  height: 100px;
  resize: vertical;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.submit {
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-size: 15px;
  line-height: 21px;
  font-weight: 500;
  letter-spacing: -0.03em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit:hover {
  opacity: 0.85;
}

.form-error {
  color: #d92d20;
  font-size: 14px;
}

.success {
  height: 368px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ------------------------------ Bottom nav ------------------------------ */

.bottom-nav {
  display: none;
}

/* ================================ Tablet ================================ */

@media (max-width: 1199.98px) {
  .sidebar {
    width: 76px;
  }

  .profile {
    padding: 0;
    justify-content: center;
  }

  .profile .profile-text,
  .nav-label {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
  }

  .main {
    margin-left: 76px;
  }

  .container {
    max-width: 756px;
    padding: 123px 48px 80px;
  }

  .h1 {
    line-height: 1.2;
  }
}

/* ================================ Mobile ================================ */

@media (max-width: 809.98px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .container {
    padding: 80px 20px calc(120px + env(safe-area-inset-bottom));
  }

  .m-head {
    display: flex;
    margin-bottom: -24px;
  }

  .h1 {
    font-size: 29px;
    line-height: 1.2;
  }

  .clients {
    gap: 12px 16px;
  }

  .client-name {
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
  }

  .client-desc {
    display: none;
  }

  .xp {
    padding: 20px;
  }

  .xp-imgs {
    gap: 8px;
  }

  .xp-imgs img {
    border-radius: 8px;
  }

  .posts {
    gap: 32px;
  }

  .post-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cover {
    aspect-ratio: 335 / 220;
  }

  .post-cover {
    border-radius: 16px;
  }

  .pbs {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pbs .kv-k {
    width: 140px;
  }

  .bottom-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 20;
    display: flex;
    height: 52px;
    padding: 4px;
    border-radius: 60px;
    background: #efefef;
    max-width: 420px;
    margin: 0 auto;
  }

  .bottom-nav a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    color: var(--muted);
    transition: background-color 0.2s, color 0.2s;
  }

  .bottom-nav a.active {
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  }
}
